瀏覽代碼

Merge branch 'master' of bitbucket.org:ikflowdat/ftth

Luciano Andrade 6 年之前
父節點
當前提交
621323e719

文件差異過大導致無法顯示
+ 46 - 45
app/DoctrineMigrations/src/template.yml


+ 13 - 13
app/config/url_webservice.yml.dist

@@ -1,16 +1,16 @@
 parameters:
-    url_base: 'http://%env(HOST_BASE)%'
-    url_ftth: 'http://%env(HOST_FTTH)%'
-    url_mapas: 'http://%env(HOST_MAPAS)%'
-    url_stats: 'http://%env(HOST_STATS)%'
-    url_radius: 'http://%env(HOST_RADIUS)%'
-    url_cablemodem: 'http://%env(HOST_CABLEMODEM)%'
-    url_dhcp: 'http://%env(HOST_DHCP)%'
-    url_geoserver: 'http://%env(HOST_GEOSERVER)%' # url app radius
-    url_dummy: 'http://%env(HOST_DUMMY)%'
+    url_base: 'https://%env(HOST_BASE)%'
+    url_ftth: 'https://%env(HOST_FTTH)%'
+    url_mapas: 'https://%env(HOST_MAPAS)%'
+    url_stats: 'https://%env(HOST_STATS)%'
+    url_radius: 'https://%env(HOST_RADIUS)%'
+    url_cablemodem: 'https://%env(HOST_CABLEMODEM)%'
+    url_dhcp: 'https://%env(HOST_DHCP)%'
+    url_geoserver: 'https://%env(HOST_GEOSERVER)%' # url app radius
+    url_dummy: 'https://%env(HOST_DUMMY)%'
 
     onu: '%url_ftth%/api/onus.json'
-    client: 'http://%env(HOST_BASE)%/api/clients.json'
+    client: 'https://%env(HOST_BASE)%/api/clients.json'
     sidebar_menu:
         Base: '%url_base%'
         Cablemodems: '%url_cablemodem%'
@@ -22,8 +22,8 @@ parameters:
     remote_client_create_url: '%url_base%/admin/client/client/create'
     remote_device_url: '%url_base%/api/devices.json'
     remote_device_log_url: '%url_base%/api/devicelogs.json'
-    remote_get_map_url: 'http://%env(DOCKER_MAPAS)%:8000/api/maps.json'
-    remote_get_object_type_url: 'http://%env(DOCKER_MAPAS)%:8000/api/objecttypes.json'
-    remote_get_objects_url: 'http://%env(DOCKER_MAPAS)%:8000/api/objects.json'
+    remote_get_map_url: 'https://%env(DOCKER_MAPAS)%:8000/api/maps.json'
+    remote_get_object_type_url: 'https://%env(DOCKER_MAPAS)%:8000/api/objecttypes.json'
+    remote_get_objects_url: 'https://%env(DOCKER_MAPAS)%:8000/api/objects.json'
     api_ftth: 'http://ftth:8000'
     api_mapas: 'http://mapas:8000'

+ 12 - 12
app/config/url_webservice.yml.docker

@@ -1,15 +1,15 @@
 parameters:
-    url_base: 'http://%env(HOST_BASE)%'
-    url_ftth: 'http://%env(HOST_FTTH)%'
-    url_mapas: 'http://%env(HOST_MAPAS)%'
-    url_stats: 'http://%env(HOST_STATS)%'
-    url_radius: 'http://%env(HOST_RADIUS)%'
-    url_cablemodem: 'http://%env(HOST_CABLEMODEM)%'
-    url_dhcp: 'http://%env(HOST_DHCP)%'
-    url_geoserver: 'http://%env(HOST_GEOSERVER)%' # url app radius
+    url_base: 'https://%env(HOST_BASE)%'
+    url_ftth: 'https://%env(HOST_FTTH)%'
+    url_mapas: 'https://%env(HOST_MAPAS)%'
+    url_stats: 'https://%env(HOST_STATS)%'
+    url_radius: 'https://%env(HOST_RADIUS)%'
+    url_cablemodem: 'https://%env(HOST_CABLEMODEM)%'
+    url_dhcp: 'https://%env(HOST_DHCP)%'
+    url_geoserver: 'https://%env(HOST_GEOSERVER)%' # url app radius
 
     onu: '%url_ftth%/api/onus.json'
-    client: 'http://%env(HOST_BASE)%/api/clients.json'
+    client: 'https://%env(HOST_BASE)%/api/clients.json'
     sidebar_menu:
         Base: '%url_base%'
         Cablemodems: '%url_cablemodem%'
@@ -21,8 +21,8 @@ parameters:
     remote_client_create_url: '%url_base%/admin/client/client/create'
     remote_device_url: '%url_base%/api/devices.json'
     remote_device_log_url: '%url_base%/api/devicelogs.json'
-    remote_get_map_url: 'http://%env(DOCKER_MAPAS)%:8000/api/maps.json'
-    remote_get_object_type_url: 'http://%env(DOCKER_MAPAS)%:8000/api/objecttypes.json'
-    remote_get_objects_url: 'http://%env(DOCKER_MAPAS)%:8000/api/objects.json'
+    remote_get_map_url: 'https://%env(DOCKER_MAPAS)%:8000/api/maps.json'
+    remote_get_object_type_url: 'https://%env(DOCKER_MAPAS)%:8000/api/objecttypes.json'
+    remote_get_objects_url: 'https://%env(DOCKER_MAPAS)%:8000/api/objects.json'
     api_ftth: 'http://ftth:8000'
     api_mapas: 'http://mapas:8000'

+ 9 - 8
composer.lock

@@ -1254,6 +1254,7 @@
                 }
             ],
             "description": "Dwoo is a PHP5/PHP7 template engine which is (almost) fully compatible with Smarty templates and plugins, but is written from scratch for PHP5, and adds many features.",
+            "abandoned": "twig/twig",
             "time": "2018-07-25T13:24:51+00:00"
         },
         {
@@ -1946,7 +1947,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseAdmin.git",
-                "reference": "23cdb48744f9ce049bec55a25e5fca3ef6e0f546"
+                "reference": "cd1449790213410afbf0cce650997c9c24a481d8"
             },
             "type": "library",
             "autoload": {
@@ -1961,7 +1962,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2018-08-06T17:48:40+00:00"
+            "time": "2018-08-14T12:58:30+00:00"
         },
         {
             "name": "ik/device-bundle",
@@ -2036,7 +2037,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/MapBundle.git",
-                "reference": "cbe6fe78fbd902ee545806105967b89f50e244e7"
+                "reference": "6bfead82caa4fefdc56bf8060b275a56347feb70"
             },
             "type": "library",
             "autoload": {
@@ -2051,7 +2052,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2018-02-19T12:57:23+00:00"
+            "time": "2018-08-08T13:51:34+00:00"
         },
         {
             "name": "ik/migrations-bundle",
@@ -2132,7 +2133,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/TemplateBundle.git",
-                "reference": "7e50327475180f03fa24a2fa5ee1dc01dadd2bfa"
+                "reference": "e702a3895f9d3fe6712a76d25cb9d908216ef20f"
             },
             "require": {
                 "ik/base-admin-bundle": "*"
@@ -2150,7 +2151,7 @@
                 "bundle",
                 "template"
             ],
-            "time": "2018-07-04T14:44:27+00:00"
+            "time": "2018-08-09T12:30:44+00:00"
         },
         {
             "name": "ik/tr069-bundle",
@@ -2199,7 +2200,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
-                "reference": "fcac5fb3107129034dc231d900701c0df65d8a7c"
+                "reference": "4bcfb74be54ed159eb42b348c073178992cdfbc5"
             },
             "require": {
                 "php-amqplib/rabbitmq-bundle": "^1.12"
@@ -2229,7 +2230,7 @@
                 "bundle",
                 "workflow"
             ],
-            "time": "2018-08-07T12:54:41+00:00"
+            "time": "2018-08-17T18:07:32+00:00"
         },
         {
             "name": "incenteev/composer-parameter-handler",

+ 14 - 0
src/FTTHBundle/EventListener/ONUSubscriber.php

@@ -49,6 +49,7 @@ class ONUSubscriber implements EventSubscriber
             DoctrineEvents::PRE_PERSIST,
             DoctrineEvents::POST_PERSIST,
             DoctrineEvents::PRE_UPDATE,
+            DoctrineEvents::POST_UPDATE,
         );
     }
 
@@ -79,6 +80,19 @@ class ONUSubscriber implements EventSubscriber
     {
         $this->execute($args, DoctrineEvents::PRE_UPDATE);
     }
+    
+    
+    /**
+     * @param LifecycleEventArgs $args
+     */
+    public function postUpdate(LifecycleEventArgs $args)
+    {
+        $entity = $args->getEntity();
+        if ($entity instanceof ONU) {
+            $this->em = $args->getEntityManager();
+            $this->setServicePorts($entity);
+        }
+    }
 
     /**
      * @param LifecycleEventArgs $args

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

@@ -38,6 +38,7 @@ class ONUType extends AbstractType
         $builder->add('ip')
             ->add('mac')
             ->add('serialNumber')
+            ->add('activationCode')
             ->add('profile')
             ->add('model')
             ->add('nap')

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

@@ -268,7 +268,7 @@ class NAS implements TenancyIdTraitInterface, DeviceInterface, LocationInterface
         $deviceData['ip'] = $this->host;
         $deviceData['tenancy'] = $this->tenancyId;
 
-        $deviceExtraData = array('snmpCommunity' => $this->snmpCommunity, 'snmpVersion' => $this->snmpVersion, 'radiusPassword' => $this->radiusPassword,
+        $deviceExtraData = array('snmpCommunity' => $this->snmpComunity, 'snmpVersion' => $this->snmpVersion, 'radiusPassword' => $this->radiusPassword,
             'acctEnabled' => $this->acctEnabled, 'description' => $this->description);
 
         if ($this->model) {