瀏覽代碼

Merge branch 'revert' into 'master'

Revert

See merge request interlink-sa/flowdat3/modules/ftth!184
Jean Sumara Leopoldo 5 年之前
父節點
當前提交
89cdfabaad

+ 0 - 30
app/DoctrineMigrations/Version20200512153756.php

@@ -1,30 +0,0 @@
-<?php
-
-namespace Application\Migrations;
-
-use Doctrine\DBAL\Migrations\AbstractMigration;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Auto-generated Migration: Please modify to your needs!
- */
-class Version20200512153756 extends AbstractMigration
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        // this up() migration is auto-generated, please modify it to your needs
-        $this->addSql("ALTER TABLE template ADD UNIQUE (name)");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        // this down() migration is auto-generated, please modify it to your needs
-
-    }
-}

+ 0 - 14
app/DoctrineMigrations/src/oltmodel.yml

@@ -80,17 +80,3 @@ insertorupdate:
             library: "OIDSFurukawaG8SV1"
             extra_data: "{\r\n\"model\": \"Furukawa-G8S-v1\"\r\n}"
             tenancy_id: 1
-        -
-            id: 12
-            name: "Huawei MA5608T-v2"
-            mark: "Huawei"
-            library: "OIDSHuaweiV1"
-            extra_data: "{\r\n\"model\": \"Huawei-MA5608T-v2\",\r\n\"auto-create-service-ports\" : true\r\n}"
-            tenancy_id: 1
-        -
-            id: 13
-            name: "Huawei MA5800-v1"
-            mark: "Huawei"
-            library: "OIDSHuaweiV1"
-            extra_data: "{\r\n\"model\": \"Huawei-MA5800-v1\",\r\n\"auto-create-service-ports\" : true\r\n}"
-            tenancy_id: 1

File diff suppressed because it is too large
+ 0 - 40
app/DoctrineMigrations/src/template.yml


+ 3 - 1
src/FTTHBundle/Admin/OLTAdmin.php

@@ -111,7 +111,9 @@ class OLTAdmin extends WorkflowBaseAdmin
                     ->with('olt_execute_time')
                         ->add('executeSnmp')
                         ->add('timeScan', 'integer', array('attr' => array('min' => 0)))
-                        ->add('timeOltScan', 'integer', array('attr' => array('min' => 0)))
+                        ->add('timeOnuStats', 'integer', array('attr' => array('min' => 0)))
+                        ->add('timePonStats', 'integer', array('attr' => array('min' => 0)))
+                        ->add('timeOltOctets', 'integer', array('attr' => array('min' => 0)))
                     ->end()
                 ->end()
                 ->tab('Backups')

+ 66 - 9
src/FTTHBundle/Entity/OLT.php

@@ -161,9 +161,19 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
     protected $timeScan = 10;
 
     /**
-     * @ORM\Column(type="integer", options={"unsigned":true, "default":10})
+     * @ORM\Column(type="integer", options={"unsigned":true, "default":5})
+     */
+    protected $timeOltOctets = 5;
+
+    /**
+     * @ORM\Column(type="integer", options={"unsigned":true, "default":5})
+     */
+    protected $timePonStats = 5;
+
+    /**
+     * @ORM\Column(type="integer", options={"unsigned":true, "default":5})
      */
-    protected $timeOltScan = 10;
+    protected $timeOnuStats = 5;
 
     /**
      * @ORM\Column(type="string", nullable=true)
@@ -430,7 +440,10 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
 
         $deviceExtraData['executeSnmp'] = $this->executeSnmp;
         $deviceExtraData['timeScan'] = $this->timeScan;
-        $deviceExtraData['timeOltScan'] = $this->timeOltScan;
+        $deviceExtraData['timeOnuStats'] = $this->timeOnuStats;
+        $deviceExtraData['timePonStats'] = $this->timePonStats;
+        $deviceExtraData['timeOltOctets'] = $this->timeOltOctets;
+        $deviceExtraData['timeDiscovery'] = $this->timeDiscovery;
 
         $deviceData['extraData'] = json_encode($deviceExtraData);
 
@@ -480,19 +493,63 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
     }
 
     /**
-     * @return int
+     * Set timeOltOctets
+     *
+     * @param integer $timeOltOctets
      */
-    public function getTimeOltScan()
+    public function setTimeOltOctets($timeOltOctets)
     {
-        return $this->timeOltScan;
+        $this->timeOltOctets = $timeOltOctets;
     }
 
     /**
-     * @param int $timeOltScan
+     * Get timeOltOctets
+     *
+     * @return integer
+     */
+    public function getTimeOltOctets()
+    {
+        return $this->timeOltOctets;
+    }
+
+    /**
+     * Set timeOnuStats
+     *
+     * @param integer $timeOnuStats
+     */
+    public function setTimeOnuStats($timeOnuStats)
+    {
+        $this->timeOnuStats = $timeOnuStats;
+    }
+
+    /**
+     * Get timeOnuStats
+     *
+     * @return integer
+     */
+    public function getTimeOnuStats()
+    {
+        return $this->timeOnuStats;
+    }
+
+    /**
+     * Set timePonStats
+     *
+     * @param integer $timePonStats
+     */
+    public function setTimePonStats($timePonStats)
+    {
+        $this->timePonStats = $timePonStats;
+    }
+
+    /**
+     * Get timePonStats
+     *
+     * @return integer
      */
-    public function setTimeOltScan($timeOltScan)
+    public function getTimePonStats()
     {
-        $this->timeOltScan = $timeOltScan;
+        return $this->timePonStats;
     }
 
     /**

+ 4 - 8
src/FTTHBundle/Repository/ONURepository.php

@@ -56,14 +56,10 @@ class ONURepository extends \Doctrine\ORM\EntityRepository
                 'o.clientId'
             ])
             ->join('o.olt', "olt")
-            ->leftJoin('o.nap', "nap");
-
-        if($tenancyId != 1){
-            $query->where('o.tenancyId = :tenancyId')
-                ->setParameter('tenancyId', $tenancyId);
-        }
-
-        $query->orderBy('o.created', 'DESC')
+            ->leftJoin('o.nap', "nap")
+            ->where('o.tenancyId = :tenancyId')
+            ->setParameter('tenancyId', $tenancyId)
+            ->orderBy('o.created', 'DESC')
             ->setMaxResults($limit)
             ->setFirstResult($offset);
 

+ 4 - 2
src/FTTHBundle/Resources/translations/FTTHBundle.es.yml

@@ -130,8 +130,10 @@ form:
     label_nap: NAP
     label_extra_data: Extra Data
     label_library: Librería
-    label_time_scan: Escanear ONUs
-    label_time_olt_scan: Escanear OLTs
+    label_time_scan: Escanear ONUs y PON PORTs
+    label_time_pon_stats: Estadísticas de PON PORTs
+    label_time_onu_stats: Estadísticas de ONUs
+    label_time_olt_octets: Tráfico de OLT
     label_map: Mapa
     label_slot: Slot
     label_link: Link