Browse Source

Agregados para que el web service de onu tome todos los parametros de la pantalla

Se modifco el onutemplate
gabriel 6 years ago
parent
commit
2d20ea67e9

+ 2 - 2
composer.lock

@@ -2179,7 +2179,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/Webservice.git",
-                "reference": "c17a870fa8f24a00b0660b62c20704443c0b032f"
+                "reference": "3ef8fb9ba6101112a501d06037ecc6442d9cf84d"
             },
             "require": {
                 "ext-curl": "*",
@@ -2192,7 +2192,7 @@
                 }
             },
             "description": "The Flowdat3 Webservice Rest",
-            "time": "2018-07-31T18:33:39+00:00"
+            "time": "2018-09-26T13:41:07+00:00"
         },
         {
             "name": "ik/workflow-bundle",

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

@@ -667,10 +667,6 @@ class ONUAdmin extends WorkflowBaseAdmin
             $form->add('vlans', null, array('data' => $vlans));
         }
 
-        if($position = $template->getPosition()) {
-            $form->add('position', null, array('data' => $position));
-        }
-
         if($extraData = $template->getExtraData()) {
             $form->add('extraData', null, array('data' => $extraData));
         }

+ 0 - 59
src/FTTHBundle/Entity/ONUTemplate.php

@@ -37,12 +37,6 @@ class ONUTemplate implements TenancyIdTraitInterface
      */
     private $id;
 
-    /**
-     * @ORM\Column(type="integer", nullable=true)
-     *
-     */
-    private $clientId;
-
     /**
      * @Gedmo\Timestampable(on="create")
      * @ORM\Column(type="datetime")
@@ -130,11 +124,6 @@ class ONUTemplate implements TenancyIdTraitInterface
      */
     protected $onuProfile;
 
-//    /**
-//     * @ORM\Column(type="integer", nullable=false, options={"default": "0"})
-//     */
-//    private $position = 0;
-
     /**
      * @ORM\Column(type="boolean", nullable=false, columnDefinition="BOOLEAN DEFAULT FALSE")
      */
@@ -186,30 +175,6 @@ class ONUTemplate implements TenancyIdTraitInterface
         return $this;
     }
 
-    /**
-     * Get clientId
-     *
-     * @return int
-     */
-    public function getClientId()
-    {
-        return $this->clientId;
-    }
-
-    /**
-     * Set clientId
-     *
-     * @param integer $clientId
-     *
-     * @return ONU
-     */
-    public function setClientId($clientId)
-    {
-        $this->clientId = $clientId;
-
-        return $this;
-    }
-
     /**
      * Get created
      *
@@ -507,30 +472,6 @@ class ONUTemplate implements TenancyIdTraitInterface
         return $link;
     }
 
-//    /**
-//     * Get getPosition
-//     *
-//     * @return int
-//     */
-//    public function getPosition()
-//    {
-//        return $this->position;
-//    }
-//
-//    /**
-//     * Set getPosition
-//     *
-//     * No se recomienda usar este metodo, porque se debe calcular a partir del NAP
-//     *
-//     * @return $this
-//     */
-//    public function setPosition($position)
-//    {
-//        $this->position = $position;
-//
-//        return $this;
-//    }
-
     /**
      * Set base
      *

+ 11 - 6
src/FTTHBundle/Form/ONUType.php

@@ -5,12 +5,9 @@ namespace FTTHBundle\Form;
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
-
 use Symfony\Component\Form\Extension\Core\Type\TextType;
-
 use Symfony\Component\Form\FormEvent;
 use Symfony\Component\Form\FormEvents;
-
 use FTTHBundle\Form\ServicePortType;
 
 class ONUType extends AbstractType
@@ -48,7 +45,15 @@ class ONUType extends AbstractType
             ->add('ponSerialNumberAux')
             ->add('clientId')
             ->add('extraData')
-            ->add('tenancyId');
+            ->add('tenancyId')
+            ->add('olt')
+            ->add('position')
+            ->add('vlans')
+            ->add('vlan')
+            ->add('tcontprofile')
+            ->add('trafficProfileOut')
+            ->add('trafficProfileIn')
+            ->add('catv');
 
         $builder->addEventListener(
             FormEvents::PRE_SUBMIT,
@@ -57,10 +62,10 @@ class ONUType extends AbstractType
 
                 $data = $event->getData();
 
-                if(isset($data['clientId'])) {
+                if (isset($data['clientId'])) {
 
                     $clientID = $data['clientId'];
-                    
+
                     if (is_array($clientID) and $this->webservice) {
                         $clientID["disableTenancy"] = 1;
                         $remote_data = $this->webservice->getData("client", $clientID);

+ 0 - 1
src/FTTHBundle/tests/ONURESTControllerTest.php

@@ -78,7 +78,6 @@ class ONURESTControllerTest extends WebTestCaseBase
         $datos['oltId'] = '';
         $datos['modelId'] = '1';
         $datos['napId'] = '1';
-        $datos['nap'] = 1;
         $datos['profileId'] = '1';
         $datos['mac'] = '00:11:22:33';
         $datos['ponSerialNumber'] = 'pon';