Procházet zdrojové kódy

FD3-296 Se agregó campo enable en OLT, OLTAdmin y OLTType. Traducciones

Guillermo Espinoza před 7 roky
rodič
revize
374bc21a65

+ 8 - 5
src/FTTHBundle/Admin/OLTAdmin.php

@@ -37,6 +37,7 @@ class OLTAdmin extends WorkflowBaseAdmin
             ->add('snmpCommunity')
             ->add('sshUser')
             ->add('sshPass')
+            ->add('enable')
 //            ->add('workflow')
             ->add('currentState','string', array('template' => 'WorkflowBundle:Workflow:base_list_field_current_state.html.twig'))
             ->add('_action', 'with-workflow-action', array(
@@ -58,16 +59,17 @@ class OLTAdmin extends WorkflowBaseAdmin
         $formMapper
                 ->tab('default')
                     ->with('')
-            ->add('name')
-            ->add('model')
+                        ->add('name')
+                        ->add('model')
                     ->end()
                 ->end()
                 ->tab('configuration')
                     ->with('OLT')
-            ->add('ip')
-            ->add('snmpCommunity')
-            ->add('sshUser')
+                        ->add('ip')
+                        ->add('snmpCommunity')
+                        ->add('sshUser')
                         ->add('sshPass')
+                        ->add('enable')
                     ->end()
                 ->end()
                 ->tab('stats')
@@ -96,6 +98,7 @@ class OLTAdmin extends WorkflowBaseAdmin
                     ->add('snmpCommunity')
                     ->add('sshUser')
                     ->add('sshPass')
+                    ->add('enable')
                 ->end()
             ->end()   
             ->tab('Log')

+ 27 - 2
src/FTTHBundle/Entity/OLT.php

@@ -140,7 +140,12 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
      * @ORM\Column(type="integer", options={"unsigned":true, "default":5})
      */
     protected $timeOnuStats = 5;
-
+    
+    /**
+     * @ORM\Column(type="string", nullable=true)
+     */
+    protected $enable;
+    
 
     /**
      * @return string
@@ -454,5 +459,25 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
     {
         return $this->timePonStats;
     }
+    
+    /**
+     * @return string
+     */
+    public function getEnable() 
+    {
+        return $this->enable;
+    }
+
+    /**
+     * @param string $enable
+     * 
+     * @return $this
+     */
+    public function setEnable($enable) 
+    {
+        $this->enable = $enable;
+        
+        return $this;
+    }   
 
-}
+}

+ 1 - 0
src/FTTHBundle/Form/OLTType.php

@@ -30,6 +30,7 @@ class OLTType extends AbstractType
             ->add('timeOnuStats')
             ->add('extraData')
             ->add('tenancyId')
+            ->add('enable')
         ;
     }
     

+ 4 - 0
src/FTTHBundle/Resources/translations/FTTHBundle.es.yml

@@ -100,6 +100,7 @@ form:
     label_time_olt_octets: Tráfico de OLT
     label_map: Mapa
     label_client: Cliente
+    label_enable: Enable
 
 list:
     label_id: Id
@@ -135,6 +136,7 @@ list:
     label_onus: ONUs
     label_extra_data: Extra Data
     label_library: Librería
+    label_enable: Enable
 
 show:
     label_id: Id
@@ -170,6 +172,8 @@ show:
     label_onus: ONUs
     label_extra_data: Extra Data
     label_library: Librería
+    label_enable: Enable
+    
 helps:
     check_address: Verifique la dirección para el cálculo de distancias.
 error: