Bläddra i källkod

Merge branch 'master' of bitbucket.org:ikflowdat/stats into FD3-290

Luciano Andrade 7 år sedan
förälder
incheckning
46924eeaf7

+ 3 - 3
app/config/bundles/ik/webservice-bundle/parameters.yml.dist

@@ -1,7 +1,7 @@
 parameters:
-    url_base: 'http://127.0.0.1/base/app_dev.php' # url app Base
-    url_ftth: 'http://127.0.0.1/ftth/app_dev.php' # url app Base
-    url_mapas: 'http://127.0.0.1/mapas/app_dev.php' # url app Base
+    url_base: 'http://%env(HOST_BASE)%'
+    url_ftth: 'http://%env(HOST_FTTH)%'
+    url_mapas: 'http://%env(HOST_MAPAS)%'
 
     client: '%url_base%/api/clients.json'
     onu: '%url_ftth%/api/onus.json'

+ 3 - 0
bin/composer-update.sh

@@ -2,7 +2,10 @@
 chmod 0400 keys/*
 eval $(ssh-agent)
 ssh-add keys/bitbucket.id_rsa
+composer config repo.packagist false
 composer update --prefer-dist --no-plugins --no-autoloader --no-scripts --no-progress --no-suggest --with-dependencies --ignore-platform-reqs --prefer-lowest -n
 
+composer config --unset repo.packagist 
+
 kill $SSH_AGENT_PID
 unset SSH_AGENT_PID

+ 27 - 26
composer.json

@@ -19,150 +19,151 @@
             "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
         ]
     },
-    "repositories": [
-        {
+    "repositories": {
+        "0": {
             "type": "composer",
             "url": "https://satis.infra.flowdat.com/"
         },
-        {
+        "1": {
             "type": "vcs",
             "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/BaseAdmin.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "2": {
             "type": "vcs",
             "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/Webservice.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "3": {
             "type": "vcs",
             "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/BaseOAuthClientBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "4": {
             "type": "vcs",
             "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/DeviceBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "5": {
             "type": "vcs",
             "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/ExtraDataBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "6": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/OwnerVoter.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "7": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/RedisBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "8": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/StatsDBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "9": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/BaseStatsBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "10": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/FiberhomeBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "11": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/HuaweiBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "12": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/FiberlinkBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "13": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/ZteBundle.git",
             "options": {
-                    "local_pk": "./keys/bitbucket.id_rsa"
+                "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "14": {
             "type": "vcs",
-			"url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/GeoserverBundle.git",
+            "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/GeoserverBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "15": {
             "type": "vcs",
             "url": "ssh://git@bitbucket.org/ikflowdat/migrations.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "16": {
             "type": "vcs",
             "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/LeafletBundle.git"
         },
-        {
+        "17": {
             "type": "vcs",
             "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/AuditBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "18": {
             "type": "vcs",
             "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/AuthBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "19": {
             "type": "vcs",
             "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
         },
-        {
+        "20": {
             "type": "vcs",
             "url": "ssh://git@gogs.infra.flowdat.com:222/3erPartyFlowdat3/SonataAdminBundle.git",
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             },
             "name": "ik-sonata"
-        }
-    ],
+        },
+        "packagist": false
+    },
     "require": {
         "php": ">=5.5.9",
         "doctrine/doctrine-bundle": "^1.6",

+ 23 - 23
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "02ac8569be3cd4ee2d381c663f6f45cd",
+    "content-hash": "71b709205e37b44ec104acc1224b802b",
     "packages": [
         {
             "name": "behat/transliterator",
@@ -1417,7 +1417,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/BaseAdmin.git",
-                "reference": "5559a9a344140cdc43089256c2cfca2ff2ccce5b"
+                "reference": "63444b34bcb0d5f97eb72265c3e04c3e744e84b3"
             },
             "type": "library",
             "autoload": {
@@ -1432,7 +1432,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2017-12-19 11:28:24"
+            "time": "2017-12-26 15:41:06"
         },
         {
             "name": "ik/device-bundle",
@@ -1440,7 +1440,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/DeviceBundle.git",
-                "reference": "549e289e09ef991900025be4994e0641efa955ef"
+                "reference": "44b9f6833db9d9611e9065615888ddbe96993537"
             },
             "type": "library",
             "autoload": {
@@ -1455,7 +1455,7 @@
                 "bundle",
                 "validators"
             ],
-            "time": "2017-12-13 13:30:22"
+            "time": "2017-12-26 12:26:50"
         },
         {
             "name": "ik/extra-data-bundle",
@@ -1463,7 +1463,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/ExtraDataBundle.git",
-                "reference": "285c7a279256fc613a0a8e65c6163d5b60361365"
+                "reference": "fdfa90821ff77946aa8a6781da6ac561f52e2b76"
             },
             "type": "library",
             "autoload": {
@@ -1478,7 +1478,7 @@
                 "bundle",
                 "extra-data"
             ],
-            "time": "2017-12-11 15:48:57"
+            "time": "2017-12-27 13:01:33"
         },
         {
             "name": "ik/leaflet-bundle",
@@ -1580,7 +1580,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/RedisBundle.git",
-                "reference": "5ed350e9c28c5f5a5c66bafc6bbd8d034a7b3038"
+                "reference": "89b303559284f1f3d1efe80eaf8f1be0012aa70d"
             },
             "require": {
                 "predis/predis": "^1.1"
@@ -1596,7 +1596,7 @@
                 "php-redis-service",
                 "redis"
             ],
-            "time": "2017-11-16 13:08:02"
+            "time": "2017-12-21 12:11:19"
         },
         {
             "name": "ik/stats/base-stats-bundle",
@@ -1604,7 +1604,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/BaseStatsBundle.git",
-                "reference": "b9acb7d6663d96aa63f6e91992bdf898014bb146"
+                "reference": "6aeedbc5dc922bad1a37d8781620dcc3fbf1e462"
             },
             "type": "library",
             "autoload": {
@@ -1617,7 +1617,7 @@
                 "BaseStatsBundle",
                 "Flowdat 3"
             ],
-            "time": "2017-11-22 12:31:48"
+            "time": "2017-12-27 17:10:07"
         },
         {
             "name": "ik/stats/fiberhome-bundle",
@@ -1625,7 +1625,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/FiberhomeBundle.git",
-                "reference": "774cba9b5c15672114c1b5d5d0a239e8424a8db9"
+                "reference": "dec1593dd704304ec579a7945cf8f1caa4459a56"
             },
             "type": "library",
             "autoload": {
@@ -1638,7 +1638,7 @@
                 "Fiberhome",
                 "Flowdat 3"
             ],
-            "time": "2017-11-22 12:33:33"
+            "time": "2017-12-21 12:11:15"
         },
         {
             "name": "ik/stats/fiberlink-bundle",
@@ -1646,7 +1646,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/FiberlinkBundle.git",
-                "reference": "1ee065bd7a8606611119b4f5cfb269369bb95e5c"
+                "reference": "cc2984a964d4ee9a975fc37d768e9b11cc13a585"
             },
             "type": "library",
             "autoload": {
@@ -1659,7 +1659,7 @@
                 "Fiberlink",
                 "Flowdat 3"
             ],
-            "time": "2017-11-22 12:32:28"
+            "time": "2017-12-21 12:10:39"
         },
         {
             "name": "ik/stats/geoserver-bundle",
@@ -1667,7 +1667,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/GeoserverBundle.git",
-                "reference": "fa020e7fb9af94ef0716a71fb9c7cc2b8b0db359"
+                "reference": "fbd23f11d7f1ff7ff913133d05d8b6e8bbe33357"
             },
             "type": "library",
             "autoload": {
@@ -1680,7 +1680,7 @@
                 "Flowdat 3",
                 "Geoserver"
             ],
-            "time": "2017-12-05 13:47:49"
+            "time": "2017-12-21 12:11:23"
         },
         {
             "name": "ik/stats/huawei-bundle",
@@ -1688,7 +1688,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/HuaweiBundle.git",
-                "reference": "5d8b3d565ec1b4e2806da2086dd17ac113b5b998"
+                "reference": "5baa12be5f0ec8ce54a9a713089259347ef31737"
             },
             "type": "library",
             "autoload": {
@@ -1701,7 +1701,7 @@
                 "Flowdat 3",
                 "Huawei"
             ],
-            "time": "2017-11-22 12:33:56"
+            "time": "2017-12-27 11:19:17"
         },
         {
             "name": "ik/stats/zte-bundle",
@@ -1709,7 +1709,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/ZteBundle.git",
-                "reference": "5a9cef3e8d7041d2c327f7bac8c15e6000155fa6"
+                "reference": "f9963f058d8951b6144b26cfd88fd5c95ecd3841"
             },
             "type": "library",
             "autoload": {
@@ -1722,7 +1722,7 @@
                 "Flowdat 3",
                 "Zte"
             ],
-            "time": "2017-11-24 14:05:31"
+            "time": "2017-12-21 12:11:04"
         },
         {
             "name": "ik/statsd-bundle",
@@ -1730,7 +1730,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/StatsDBundle.git",
-                "reference": "de6b066b59080f31672822f736c2e87d9fc0eb5b"
+                "reference": "f56e2fcbd04dc89e4f8a8569a861925e047d4e68"
             },
             "type": "library",
             "autoload": {
@@ -1743,7 +1743,7 @@
                 "stats",
                 "statsd"
             ],
-            "time": "2017-12-07 15:46:51"
+            "time": "2017-12-21 12:10:50"
         },
         {
             "name": "ik/webservice-bundle",

+ 4 - 0
src/StatsBundle/Command/GenerateCrontabCommand.php

@@ -95,6 +95,10 @@ class GenerateCrontabCommand extends ContainerAwareCommand
                 $params .= " --save-historic={$saveHistoric}";
                 $commands[] = "*/{$timeOnuStats} * * * * {$pathConsole} {$mark}:onu:stats {$params}";
                 $commands[] = "*/{$timePonStats} * * * * {$pathConsole} {$mark}:pon:stats {$params}";
+
+                if($mark == "huawei") {
+                    $commands[] = "*/{$timeOltOctets} * * * * {$pathConsole} {$mark}:onu:octets {$params}";
+                }
                 $commands[] = "*/{$timeOltOctets} * * * * {$pathConsole} {$mark}:pon:octets {$params}";
                 
                 $commands[] = "*/{$timeOnuStats} * * * * {$pathConsole} stats:onu --olt-device-id={$deviceId} --olt-server-id={$serverId}";

+ 4 - 0
src/StatsBundle/Command/GenerateRemoteCrontabCommand.php

@@ -137,6 +137,10 @@ class GenerateRemoteCrontabCommand extends ContainerAwareCommand
                 }
                 $commands[] = "*/{$timeOnuStats} * * * * {$pathConsole} {$amqpRemote} {$routing_key} {$mark}:onu:stats {$params}";
                 $commands[] = "*/{$timePonStats} * * * * {$pathConsole} {$amqpRemote} {$routing_key} {$mark}:pon:stats {$params}";
+                
+                if($mark == "huawei") {
+                    $commands[] = "*/{$timeOltOctets} * * * * {$pathConsole} {$amqpRemote} {$routing_key} {$mark}:onu:octets {$params}";
+                }
                 $commands[] = "*/{$timeOltOctets} * * * * {$pathConsole} {$amqpRemote} {$routing_key} {$mark}:pon:octets {$params}";
 
                 $params = "--olt-device-id={$deviceId} --olt-server-id={$serverId}";

+ 1 - 1
src/StatsBundle/Controller/StatsController.php

@@ -260,7 +260,7 @@ class StatsController extends Controller
 
         $ponSerialNumber = strtolower($request->get('ponSerialNumber'));
         
-        $panelIds = array(1, 2, 3, 4, 5);
+        $panelIds = array(6, 1, 2, 3, 4, 5);
         foreach ($panelIds as $panelId) {
             $urls[] = "onu?orgId=1&var-serialnumber={$ponSerialNumber}&panelId={$panelId}&theme=light";
         }