浏览代码

Merge branch 'stats#15' into 'master'

Added extra data and a new field

See merge request interlink-sa/flowdat3/modules/ftth!189
Jean Sumara Leopoldo 5 年之前
父节点
当前提交
6ed463181e

+ 1 - 0
src/RadiusBundle/Admin/NASAdmin.php

@@ -54,6 +54,7 @@ class NASAdmin extends BaseAdmin
     protected function configureFormFields(FormMapper $formMapper)
     {
         $formMapper
+            ->add('executeSnmp')
             ->add('description')
             ->add('host')
             ->add('snmpComunity')

+ 23 - 1
src/RadiusBundle/Entity/NAS.php

@@ -94,6 +94,11 @@ class NAS implements TenancyIdTraitInterface, DeviceInterface, LocationInterface
      */
     private $acctEnabled;
 
+    /**
+     * @ORM\Column(type="boolean", nullable=true, columnDefinition="BOOLEAN DEFAULT TRUE")
+     */
+    protected $executeSnmp = true;
+
     /**
      * @return string
      */
@@ -262,6 +267,22 @@ class NAS implements TenancyIdTraitInterface, DeviceInterface, LocationInterface
         return $this;
     }
 
+    /**
+     * @return bool
+     */
+    public function isExecuteSnmp()
+    {
+        return $this->executeSnmp;
+    }
+
+    /**
+     * @param bool $executeSnmp
+     */
+    public function setExecuteSnmp($executeSnmp)
+    {
+        $this->executeSnmp = $executeSnmp;
+    }
+
     /**
      * @return array
      */
@@ -279,7 +300,8 @@ class NAS implements TenancyIdTraitInterface, DeviceInterface, LocationInterface
             'snmpVersion' => $this->snmpVersion, 
             'radiusPassword' => $this->radiusPassword,
             'acctEnabled' => $this->acctEnabled, 
-            'description' => $this->description
+            'description' => $this->description,
+            'executeSnmp' => $this->executeSnmp
         );
 
         if ($this->model) {

+ 1 - 0
src/RadiusBundle/Resources/translations/RadiusBundle.es.yml

@@ -61,6 +61,7 @@ form:
     label_acct_enabled: Cuenta Habilitada
     label_extra_data: Extra Data
     label_library: Librería
+    label_execute_snmp: Consultar SNMP
 
 list:
     label__action: Acciones