浏览代码

Quite algunos campos de OLT y ModeloOLT

Luciano Andrade 8 年之前
父节点
当前提交
8582a9e322

+ 4 - 21
src/FTTHBundle/Admin/OLTAdmin.php

@@ -17,15 +17,11 @@ class OLTAdmin extends BaseAdmin
     {
     {
         $datagridMapper
         $datagridMapper
             ->add('name')
             ->add('name')
-            ->add('mark')
+            ->add('model')
             ->add('ip')
             ->add('ip')
             ->add('snmpCommunity')
             ->add('snmpCommunity')
             ->add('sshUser')
             ->add('sshUser')
             ->add('sshPass')
             ->add('sshPass')
-            ->add('firmware')
-            ->add('libraryVersion')
-            ->add('executeSnmp')
-            ->add('model')
         ;
         ;
     }
     }
 
 
@@ -36,16 +32,11 @@ class OLTAdmin extends BaseAdmin
     {
     {
         $listMapper
         $listMapper
             ->add('name')
             ->add('name')
-            ->add('mark')
+            ->add('model')
             ->add('ip')
             ->add('ip')
             ->add('snmpCommunity')
             ->add('snmpCommunity')
             ->add('sshUser')
             ->add('sshUser')
             ->add('sshPass')
             ->add('sshPass')
-            // ->add('firmware')
-            // ->add('libraryVersion')
-            ->add('executeSnmp')
-            ->add('model')
-            ->add('workflow')
             ->add('currentState')
             ->add('currentState')
             ->add('_action', null, array(
             ->add('_action', null, array(
                 'actions' => array(
                 'actions' => array(
@@ -64,15 +55,11 @@ class OLTAdmin extends BaseAdmin
     {
     {
         $formMapper
         $formMapper
             ->add('name')
             ->add('name')
-            ->add('mark')
+            ->add('model')
             ->add('ip')
             ->add('ip')
             ->add('snmpCommunity')
             ->add('snmpCommunity')
             ->add('sshUser')
             ->add('sshUser')
             ->add('sshPass')
             ->add('sshPass')
-            ->add('firmware')
-            ->add('libraryVersion')
-            ->add('executeSnmp')
-            ->add('model')
         ;
         ;
     }
     }
 
 
@@ -83,15 +70,11 @@ class OLTAdmin extends BaseAdmin
     {
     {
         $showMapper
         $showMapper
             ->add('name')
             ->add('name')
-            ->add('mark')
+            ->add('model')
             ->add('ip')
             ->add('ip')
             ->add('snmpCommunity')
             ->add('snmpCommunity')
             ->add('sshUser')
             ->add('sshUser')
             ->add('sshPass')
             ->add('sshPass')
-            ->add('firmware')
-            ->add('libraryVersion')
-            ->add('executeSnmp')
-            ->add('model')
         ;
         ;
     }
     }
 }
 }

+ 4 - 4
src/FTTHBundle/Admin/OLTModelAdmin.php

@@ -17,7 +17,7 @@ class OLTModelAdmin extends BaseAdmin
     {
     {
         $datagridMapper
         $datagridMapper
             ->add('name')
             ->add('name')
-            ->add('workflow')
+            ->add('props')
         ;
         ;
     }
     }
 
 
@@ -28,7 +28,7 @@ class OLTModelAdmin extends BaseAdmin
     {
     {
         $listMapper
         $listMapper
             ->add('name')
             ->add('name')
-            ->add('workflow')
+            ->add('props')
             ->add('_action', null, array(
             ->add('_action', null, array(
                 'actions' => array(
                 'actions' => array(
                     'show' => array(),
                     'show' => array(),
@@ -46,7 +46,7 @@ class OLTModelAdmin extends BaseAdmin
     {
     {
         $formMapper
         $formMapper
             ->add('name')
             ->add('name')
-            ->add('workflow')
+            ->add('props')
         ;
         ;
     }
     }
 
 
@@ -57,7 +57,7 @@ class OLTModelAdmin extends BaseAdmin
     {
     {
         $showMapper
         $showMapper
             ->add('name')
             ->add('name')
-            ->add('workflow')
+            ->add('props')
         ;
         ;
     }
     }
 }
 }

+ 0 - 122
src/FTTHBundle/Entity/OLT.php

@@ -29,13 +29,6 @@ class OLT
      */
      */
     protected $name;
     protected $name;
 
 
-    /**
-     * @var string $mark
-     *
-     * @ORM\Column(type="string", length=255, nullable=true, unique=false)
-     */
-    protected $mark;
-
     /**
     /**
      * @var string $ip
      * @var string $ip
      * 
      * 
@@ -65,13 +58,6 @@ class OLT
      */
      */
     protected $sshPass;
     protected $sshPass;
 
 
-    /**
-     * @var string $firmware
-     *
-     * @ORM\Column(type="string", length=255, nullable=true, unique=false)
-     */
-    protected $firmware;
-
     /**
     /**
      * @var string $libraryVersion
      * @var string $libraryVersion
      *
      *
@@ -79,13 +65,6 @@ class OLT
      */
      */
     protected $libraryVersion;
     protected $libraryVersion;
 
 
-    /**
-     * @var boolean $executeSnmp
-     * 
-     * @ORM\Column(type="boolean", nullable=true, options={"default":true})
-     */
-    protected $executeSnmp = true;
-    
     /**
     /**
      * @ORM\ManyToOne(targetEntity="OLTModel", inversedBy="olts", fetch="EXTRA_LAZY")
      * @ORM\ManyToOne(targetEntity="OLTModel", inversedBy="olts", fetch="EXTRA_LAZY")
      * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="SET NULL")
      * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="SET NULL")
@@ -129,14 +108,6 @@ class OLT
         return $this->name;
         return $this->name;
     }
     }
 
 
-    /**
-     * @return string
-     */
-    public function getMark()
-    {
-        return $this->mark;
-    }
-
     /**
     /**
      * @return string
      * @return string
      */
      */
@@ -169,30 +140,6 @@ class OLT
         return $this->sshPass;
         return $this->sshPass;
     }
     }
 
 
-    /**
-     * @return string
-     */
-    public function getFirmware()
-    {
-        return $this->firmware;
-    }
-
-    /**
-     * @return string
-     */
-    public function getLibraryVersion()
-    {
-        return $this->libraryVersion;
-    }
-
-    /**
-     * @return boolean
-     */
-    public function getExecuteSnmp()
-    {
-        return $this->executeSnmp;
-    }
-
     /**
     /**
      * @return int
      * @return int
      */
      */
@@ -212,17 +159,6 @@ class OLT
         return $this;
         return $this;
     }
     }
 
 
-    /**
-     * @param string $mark
-     * @return $this
-     */
-    public function setMark($mark)
-    {
-        $this->mark = $mark;
-
-        return $this;
-    }
-
     /**
     /**
      * @param string $ip
      * @param string $ip
      * @return $this
      * @return $this
@@ -267,39 +203,6 @@ class OLT
         return $this;
         return $this;
     }
     }
 
 
-    /**
-     * @param string $firmware
-     * @return $this
-     */
-    public function setFirmware($firmware)
-    {
-        $this->firmware = $firmware;
-
-        return $this;
-    }
-
-    /**
-     * @param string $libraryVersion
-     * @return $this
-     */
-    public function setLibraryVersion($libraryVersion)
-    {
-        $this->libraryVersion = $libraryVersion;
-
-        return $this;
-    }
-
-    /**
-     * @param boolean $executeSnmp
-     * @return $this
-     */
-    public function setExecuteSnmp($executeSnmp)
-    {
-        $this->executeSnmp = $executeSnmp;
-
-        return $this;
-    }
-    
     /**
     /**
      * @param ONU $onu
      * @param ONU $onu
      * @return OLT
      * @return OLT
@@ -359,29 +262,4 @@ class OLT
 
 
         return $this;
         return $this;
     }
     }
-
-    public function getWorkflow() 
-    {
-        if($this->model) {
-            $model = $this->model;
-            if($model->getWorkflow() && $model->getWorkflow()->getEnable()) {
-                return $model->getWorkflow()->getName();
-            }
-        }
-        
-        return null;
-    }
-    
-    public function getWorkflowType() 
-    {
-        if($this->model) {
-            $model = $this->model;
-            if($model->getWorkflow() && $model->getWorkflow()->getEnable()) {
-                return $model->getWorkflow()->getType();
-            }
-        }
-        
-        return null;
-    }
-
 }
 }

+ 8 - 9
src/FTTHBundle/Entity/OLTModel.php

@@ -35,10 +35,9 @@ class OLTModel
     protected $olts;
     protected $olts;
 
 
     /**
     /**
-     * @ORM\ManyToOne(targetEntity="\WorkflowBundle\Entity\Workflow", fetch="EXTRA_LAZY")
-     * @ORM\JoinColumn(name="workflow_id", referencedColumnName="id", onDelete="SET NULL")
+     * @ORM\Column(type="text", nullable=true)
      */
      */
-    protected $workflow;
+    protected $props;
 
 
 
 
     /**
     /**
@@ -110,20 +109,20 @@ class OLTModel
     }
     }
 
 
     /**
     /**
-     * @return OLTModel
+     * @return String
      */
      */
-    public function getWorkflow()
+    public function getProps()
     {
     {
-        return $this->workflow;
+        return $this->props;
     }
     }
 
 
     /**
     /**
-     * @param Workflow $workflow
+     * @param String $props
      * @return $this
      * @return $this
      */
      */
-    public function setWorkflow($workflow)
+    public function setProps($props)
     {
     {
-        $this->workflow = $workflow;
+        $this->props = $props;
         
         
         return $this;
         return $this;
     }
     }