浏览代码

Revert insert onus without service ports

Jean Sumara 5 年之前
父节点
当前提交
c0697baab3
共有 2 个文件被更改,包括 37 次插入1 次删除
  1. 36 0
      src/FTTHBundle/Admin/ONUAdmin.php
  2. 1 1
      src/FTTHBundle/EventListener/ONUSubscriber.php

+ 36 - 0
src/FTTHBundle/Admin/ONUAdmin.php

@@ -321,6 +321,31 @@ class ONUAdmin extends WorkflowBaseAdmin
                         ],
                         ],
                     ))
                     ))
                 ->end()
                 ->end()
+                ->with('ZTE', ['class' => "col-md-12 {$hidden['ZTE']} olt_mark ZTE"])
+                    ->add('vlan', null, [
+                        'disabled' => $disabled,
+                        'attr' => [
+                            'readonly' => $readonly,
+                        ],
+                    ])
+                    ->add('vlanProfile', null, $optionsZTEV4)
+                    ->add('tcontprofile', null, [
+                        'disabled' => $disabled,
+                        'attr' => [
+                            'readonly' => $readonly,
+                        ],
+                    ])
+                ->end()
+                ->with("FiberLink | FiberHome", ['class' => "col-md-12 olt_mark FiberLink FiberHome"])
+                    ->add('vlans', null, array(
+                        'required' => false,
+                        'multiple' => true,
+                        'disabled' => $disabled,
+                        'attr' => [
+                            'readonly' => $readonly,
+                        ],
+                    ))
+                ->end()
                 ->with('Extra')
                 ->with('Extra')
                     ->add('extraData')
                     ->add('extraData')
                 ->end()
                 ->end()
@@ -550,6 +575,17 @@ class ONUAdmin extends WorkflowBaseAdmin
                         'by_reference' => false,
                         'by_reference' => false,
                     ))
                     ))
                 ->end()
                 ->end()
+                ->with('ZTE', ['class' => "col-md-12 {$hidden['ZTE']} olt_mark ZTE"])
+                    ->add('vlan')
+                    ->add('vlanProfile', null, $optionsZTEV4)
+                    ->add('tcontprofile')
+                ->end()
+                ->with('FiberLink', ['class' => "col-md-12 {$hidden['FiberLink']} olt_mark FiberLink"])
+                    ->add('vlans', null, array(
+                        'required' => false,
+                        'multiple' => true,
+                    ))
+                    ->end()
             ->end()
             ->end()
             ->tab('Log')
             ->tab('Log')
                 ->with('Log')
                 ->with('Log')

+ 1 - 1
src/FTTHBundle/EventListener/ONUSubscriber.php

@@ -300,7 +300,7 @@ class ONUSubscriber implements EventSubscriber
             
             
             if (isset($model_extra_data['auto-create-service-ports']) and 
             if (isset($model_extra_data['auto-create-service-ports']) and 
                 $model_extra_data['auto-create-service-ports'] === true and count($sp) == 0
                 $model_extra_data['auto-create-service-ports'] === true and count($sp) == 0
-                and count($vlans) and $onu->getNap()->getOlt()->getMark() == "Huawei") {
+                and count($vlans)) {
                 $olt = $onu->getNAP()->getOLT();
                 $olt = $onu->getNAP()->getOLT();
                 
                 
                 // Se buscan los ServicePort utilizados en la OLT
                 // Se buscan los ServicePort utilizados en la OLT