瀏覽代碼

Merged in FD3-222 (pull request #13)

FD3-222

Approved-by: Maximiliano Schvindt <maximiliano@interlink.com.ar>
Guillermo Espinoza 7 年之前
父節點
當前提交
907cebed06

+ 4 - 3
app/AppKernel.php

@@ -28,8 +28,8 @@ class AppKernel extends Kernel
             new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
             new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
 
-	        new MigrationsBundle\MigrationsBundle(),
-	        new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
+            new MigrationsBundle\MigrationsBundle(),
+            new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
             
             new WebserviceBundle\WebserviceBundle(),
             new Base\AdminBundle\BaseAdminBundle(),
@@ -46,7 +46,8 @@ class AppKernel extends Kernel
             new GeoserverBundle\GeoserverBundle(),
             new LeafletBundle\LeafletBundle(),
             new SimpleThings\EntityAudit\SimpleThingsEntityAuditBundle(),
-            new AuditBundle\AuditBundle()
+            new AuditBundle\AuditBundle(),
+            new AuthBundle\AuthBundle(),
         ];
 
         if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

+ 1 - 0
app/config/config.yml

@@ -19,6 +19,7 @@ imports:
     - { resource: '@BaseAdminBundle/Resources/config/services.yml' }
     - { resource: '@GeoserverBundle/Resources/config/services.yml' }
     - { resource: "@AuditBundle/Resources/config/services.yml" }
+    - { resource: "@AuthBundle/Resources/config/services.yml" }
 
 # Put parameters here that don't need to change on each machine where the app is deployed
 # http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration

+ 10 - 0
app/config/routing.yml

@@ -1,3 +1,13 @@
+stats_onu_api:
+    resource: "@StatsBundle/Controller/REST/OnuRESTController.php"
+    type:   rest
+    prefix:   /api
+
+stats_ponport_api:
+    resource: "@StatsBundle/Controller/REST/PonPortRESTController.php"
+    type:   rest
+    prefix:   /api
+
 stats:
     resource: "@StatsBundle/Controller/"
     type:     annotation

+ 8 - 1
app/config/security.yml

@@ -12,6 +12,12 @@ security:
         dev:
             pattern: ^/(_(profiler|wdt)|css|images|js)/
             security: false
+        
+        api:
+          pattern: ^/api
+          stateless: true
+          oauth_proxy: true    
+            
         secured_area:
             pattern: ^/
             logout:
@@ -32,4 +38,5 @@ security:
                     
     access_control:
         - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
-        - { path: ^/admin/, role: ROLE_ADMIN }
+        - { path: ^/admin/, role: ROLE_ADMIN }
+        - { path: ^/api, role: ROLE_USER }

+ 8 - 0
composer.json

@@ -114,6 +114,13 @@
             "options": {
                 "local_pk": "./keys/bitbucket.id_rsa"
             }
+        },
+        {
+            "type": "vcs",
+            "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/AuthBundle.git",
+            "options": {
+                "local_pk": "./keys/bitbucket.id_rsa"
+            }
         }
     ],
     "require": {
@@ -136,6 +143,7 @@
         "ik/stats/huawei-bundle": "dev-master",
         "ik/statsd-bundle": "dev-master",
         "ik/webservice-bundle": "dev-master",
+        "ik/auth-bundle": "dev-master",
         "incenteev/composer-parameter-handler": "^2.0",
         "jms/serializer-bundle": "^1.1",
         "opensolutions/oss-snmp": "dev-master",

+ 27 - 3
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": "9741816d5a3c090e3fcf6f8f1ada5ece",
+    "content-hash": "9537de2fe076710e88c8f05bceddb60a",
     "packages": [
         {
             "name": "behat/transliterator",
@@ -1415,6 +1415,29 @@
             ],
             "time": "2017-06-27 13:16:34"
         },
+        {
+            "name": "ik/auth-bundle",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/AuthBundle.git",
+                "reference": "97432185940d65ea97f0bf5778dbcceeb78578e4"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "AuthBundle\\": ""
+                }
+            },
+            "description": "Flowdat 3 Auth Bundle",
+            "keywords": [
+                "Admin Generator",
+                "admin",
+                "auth",
+                "bundle"
+            ],
+            "time": "2017-09-22 13:27:29"
+        },
         {
             "name": "ik/base-admin-bundle",
             "version": "dev-master",
@@ -1467,7 +1490,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/ExtraDataBundle.git",
-                "reference": "c88fcf124002df00876323fc45039b142bad1403"
+                "reference": "ee88668fdb817efddc85ea363604ccff41227b36"
             },
             "type": "library",
             "autoload": {
@@ -1482,7 +1505,7 @@
                 "bundle",
                 "extra-data"
             ],
-            "time": "2017-07-05 12:20:18"
+            "time": "2017-09-26 14:16:42"
         },
         {
             "name": "ik/leaflet-bundle",
@@ -6161,6 +6184,7 @@
         "ik/stats/huawei-bundle": 20,
         "ik/statsd-bundle": 20,
         "ik/webservice-bundle": 20,
+        "ik/auth-bundle": 20,
         "opensolutions/oss-snmp": 20,
         "voryx/restgeneratorbundle": 20
     },

+ 5 - 0
phpunit.xml.dist

@@ -15,6 +15,11 @@
     <testsuites>
         <testsuite name="Project Test Suite">
             <directory>tests</directory>
+            <directory>src/*Bundle/tests</directory>
+        </testsuite>
+        <testsuite name="Ik vendors Test Suite">
+            <directory>tests</directory>
+            <directory>vendor/ik/*/tests</directory>
         </testsuite>
     </testsuites>
 

+ 1 - 6
src/StatsBundle/Admin/OnuAdmin.php

@@ -52,15 +52,13 @@ class OnuAdmin extends BaseAdmin
             }
         }
 
-        //print_r($urls_server);die;
         $this->parameters = array('urls_server' => $urls_server, 'olts_server' => $olts_server);
 
-
         $listMapper
             ->add('deviceServer')
             ->add('oltDeviceId', 'string', array('template' => 'StatsBundle:Onu:base_list_field_olt.html.twig'))
             ->add('tenancyId')
-            ->addIdentifier('ponSerialNumber')
+            ->add('ponSerialNumber', 'string', array('template' => 'StatsBundle:Onu:show_link.html.twig'))
             ->add('ponPort')
             ->add('status')
             ->add('txPower', 'string', array('template' => 'StatsBundle:Onu:base_list_field_tx.html.twig'))
@@ -69,9 +67,6 @@ class OnuAdmin extends BaseAdmin
             ->add('temperature', 'string', array('template' => 'StatsBundle:Onu:base_list_field_temperature.html.twig'))
             ->add('uptime', 'string', array('template' => 'StatsBundle:Onu:base_list_field_uptime.html.twig'))
             ->add('updated')
-            /* ->add('_action', null, array(
-                'actions' => array('show' => array())
-                )) */
         ;
     }
 

+ 46 - 0
src/StatsBundle/Controller/OnuCRUDController.php

@@ -0,0 +1,46 @@
+<?php
+
+namespace StatsBundle\Controller;
+
+use Base\AdminBundle\Controller\CRUDController;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Symfony\Component\Security\Core\Exception\AccessDeniedException;
+
+class OnuCRUDController extends CRUDController
+{
+
+    /**
+     * Show action.
+     *
+     * @param int|string|null $id
+     *
+     * @return Response
+     *
+     * @throws NotFoundHttpException If the object does not exist
+     * @throws AccessDeniedException If access is not granted
+     */
+    public function showAction($id = null)
+    {
+        $request = $this->getRequest();
+        $id = $request->get($this->admin->getIdParameter());
+
+        $object = $this->admin->getRepository('StatsBundle:Onu')->findByCustomId($id);
+
+        $this->admin->checkAccess('show', $object);
+
+        $preResponse = $this->preShow($request, $object);
+        if ($preResponse !== null) {
+            return $preResponse;
+        }
+
+        $this->admin->setSubject($object);
+
+        return $this->render($this->admin->getTemplate('show'), array(
+                    'action' => 'show',
+                    'object' => $object,
+                    'elements' => $this->admin->getShow(),
+                        ), null);
+    }
+
+}

+ 32 - 0
src/StatsBundle/Controller/REST/OnuRESTController.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace StatsBundle\Controller\REST;
+
+use FOS\RestBundle\Controller\Annotations\RouteResource;
+use StatsBundle\Form\OnuType;
+use WebserviceBundle\Controller\RESTController;
+
+/**
+ * Onu controller.
+ * @RouteResource("Onu")
+ */
+class OnuRESTController extends RESTController
+{
+
+    /**
+     * @return string Retorna el nombre de la Entity de trabajo.
+     */
+    public function getRepository()
+    {
+        return 'StatsBundle:Onu';
+    }
+
+    /**
+     * @return string Retorna el tipo de la clase.
+     */
+    public function getFormEntityType()
+    {
+        return get_class(new OnuType());
+    }
+
+}

+ 32 - 0
src/StatsBundle/Controller/REST/PonPortRESTController.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace StatsBundle\Controller\REST;
+
+use FOS\RestBundle\Controller\Annotations\RouteResource;
+use StatsBundle\Form\PonPortType;
+use WebserviceBundle\Controller\RESTController;
+
+/**
+ * PonPort controller.
+ * @RouteResource("PonPort")
+ */
+class PonPortRESTController extends RESTController
+{
+
+    /**
+     * @return string Retorna el nombre de la Entity de trabajo.
+     */
+    public function getRepository()
+    {
+        return 'StatsBundle:PonPort';
+    }
+
+    /**
+     * @return string Retorna el tipo de la clase.
+     */
+    public function getFormEntityType()
+    {
+        return get_class(new PonPortType());
+    }
+
+}

+ 3 - 0
src/StatsBundle/Entity/DeviceServer.php

@@ -5,6 +5,7 @@ namespace StatsBundle\Entity;
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
 use Symfony\Component\Validator\Constraints as Assert;
+use JMS\Serializer\Annotation as JMS;
 
 /**
  * @ORM\Table
@@ -57,6 +58,8 @@ class DeviceServer
 
     /**
      * @ORM\OneToMany(targetEntity="Device", mappedBy="deviceServer", fetch="EXTRA_LAZY")
+     * 
+     * @JMS\Exclude
      */
     protected $devices;
 

+ 41 - 30
src/StatsBundle/Entity/Onu.php

@@ -3,26 +3,31 @@
 namespace StatsBundle\Entity;
 
 use Doctrine\ORM\Mapping as ORM;
-use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
 use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
 use Symfony\Component\Validator\Constraints as Assert;
-use Symfony\Component\Workflow\Exception\ExceptionInterface;
-
+use JMS\Serializer\Annotation as JMS;
 
 /**
  * @ORM\Table
- * @ORM\Entity
+ * @ORM\Entity(repositoryClass="StatsBundle\Repository\OnuRepository")
  * @UniqueEntity(fields={"deviceServer", "oltDeviceId", "ponSerialNumber"}, message="errors.duplicate_key")
  * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"device_server_id", "olt_device_id", "pon_serial_number"})})
- * 
  */
 class Onu
 {
-
+    
     /**
-     * @var string
+     * @var int
      *
+     * @ORM\Column(name="id", type="integer", nullable=false)
      * @ORM\Id
+     * @ORM\GeneratedValue(strategy="AUTO")
+     */
+    private $id;
+    
+    /**
+     * @var string
+     *
      * @ORM\Column(type="string", length=25, nullable=true)
      */
     private $ponSerialNumber;
@@ -30,16 +35,14 @@ class Onu
     /**
      * @var int
      *
-     * @ORM\Id
      * @ORM\Column(type="integer", nullable=true)
-     * 
      */
-     private $oltDeviceId;
-     
-     /**
-     * @ORM\Id
+    private $oltDeviceId;
+
+    /**
      * @ORM\ManyToOne(targetEntity="DeviceServer", inversedBy="devices", fetch="EXTRA_LAZY")
      * 
+     * @JMS\MaxDepth(1)
      */
     protected $deviceServer;
 
@@ -47,17 +50,16 @@ class Onu
      * @var int
      *
      * @ORM\Column(type="integer", nullable=true)
-     * 
      */
-     private $deviceId;
-    
+    private $deviceId;
+
     /**
      * @var int
      *
      * @ORM\Column(type="integer", nullable=false, options={"default":1})
      */
     protected $tenancyId = 1;
-    
+
     /**
      * @var string
      *
@@ -66,21 +68,21 @@ class Onu
      * @Assert\Ip
      */
     private $ip;
-    
+
     /**
      * @var string
      *
      * @ORM\Column(type="string", length=12, nullable=true)
      */
     private $mac;
-    
+
     /**
      * @var string
      *
      * @ORM\Column(type="string", length=25, nullable=true)
      */
     private $serialNumber;
-    
+
     /**
      * @ORM\Column(type="string", length=25, nullable=true)
      */
@@ -90,22 +92,22 @@ class Onu
      * @ORM\Column(name="status", type="boolean", nullable=true, columnDefinition="BOOLEAN DEFAULT FALSE")
      */
     public $status = false;
-    
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $txPower;
-    
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $rxPower;
-    
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $voltage;
-    
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
@@ -120,11 +122,20 @@ class Onu
      * @ORM\Column(type="datetime")
      */
     protected $updated;
-    
+
+
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
     /**
      * @return string
      */
-    public function getId() 
+    public function getCustomId()
     {
         return sprintf('%s~%s~%s', strtolower($this->ponSerialNumber), $this->oltDeviceId, $this->deviceServer->getId());
     }
@@ -229,7 +240,7 @@ class Onu
         return strtoupper($this->ponSerialNumber);
     }
 
-     /**
+    /**
      * Set ponPort
      *
      * @param string $ponPort
@@ -272,7 +283,7 @@ class Onu
     {
         return $this->deviceId;
     }
-    
+
     /**
      * @param int $oltDeviceId
      *
@@ -313,9 +324,9 @@ class Onu
         return $this;
     }
 
-    public function getShortType() 
+    public function getShortType()
     {
-        return str_replace("FTTHBundle\\Entity\\","",$this->deviceType);
+        return str_replace("FTTHBundle\\Entity\\", "", $this->deviceType);
     }
 
     /**

+ 14 - 20
src/StatsBundle/Entity/PonPort.php

@@ -3,18 +3,13 @@
 namespace StatsBundle\Entity;
 
 use Doctrine\ORM\Mapping as ORM;
-use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
 use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
-use Symfony\Component\Validator\Constraints as Assert;
-use Symfony\Component\Workflow\Exception\ExceptionInterface;
-
 
 /**
  * @ORM\Table
  * @ORM\Entity
  * @UniqueEntity(fields={"deviceServer", "oltDeviceId", "ponPort"}, message="errors.duplicate_key")
  * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"device_server_id", "olt_device_id", "pon_port"})})
- * 
  */
 class PonPort
 {
@@ -26,7 +21,7 @@ class PonPort
      * @ORM\Id
      * @ORM\GeneratedValue(strategy="AUTO")
      */
-     private $id;
+    private $id;
 
     /**
      * @var string
@@ -39,13 +34,11 @@ class PonPort
      * @var int
      *
      * @ORM\Column(type="integer", nullable=true)
-     * 
      */
     private $oltDeviceId;
-     
+
     /**
      * @ORM\ManyToOne(targetEntity="DeviceServer", inversedBy="devices", fetch="EXTRA_LAZY")
-     * 
      */
     protected $deviceServer;
 
@@ -55,7 +48,7 @@ class PonPort
      * @ORM\Column(type="integer", nullable=false, options={"default":1})
      */
     protected $tenancyId = 1;
-    
+
     /**
      * @ORM\Column(type="datetime")
      */
@@ -65,27 +58,28 @@ class PonPort
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $txPower;
-     
+
     /**
      * @ORM\Column(type="text", nullable=true)
      */
     public $rxPower;
-     
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $voltage;
-     
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $temperature;
-    
+
     /**
      * @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
      */
     public $biasCurrent;
 
+
     /**
      * @return int
      */
@@ -225,7 +219,7 @@ class PonPort
         $this->txPower = $txPower;
         return $this;
     }
- 
+
     /**
      * Get txPower
      *
@@ -235,7 +229,7 @@ class PonPort
     {
         return $this->txPower;
     }
- 
+
     /**
      * Set rxPower
      *
@@ -265,13 +259,13 @@ class PonPort
      */
     public function getArrayRxPower()
     {
-        if($this->rxPower) {
+        if ($this->rxPower) {
             return json_decode($this->rxPower, true);
         }
 
         return array();
     }
- 
+
     /**
      * Set voltage
      *
@@ -293,7 +287,7 @@ class PonPort
     {
         return $this->voltage;
     }
- 
+
     /**
      * Set temperature
      *
@@ -315,7 +309,7 @@ class PonPort
     {
         return $this->temperature;
     }
-    
+
     /**
      * Set biasCurrent
      *

+ 38 - 0
src/StatsBundle/Form/OnuType.php

@@ -0,0 +1,38 @@
+<?php
+
+namespace StatsBundle\Form;
+
+use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\FormBuilderInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
+
+class OnuType extends AbstractType
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function buildForm(FormBuilderInterface $builder, array $options)
+    {
+        $builder->add('ponSerialNumber')->add('oltDeviceId')->add('deviceId')->add('tenancyId')->add('ip')->add('mac')->add('serialNumber')->add('ponPort')->add('status')->add('txPower')->add('rxPower')->add('voltage')->add('temperature')->add('uptime')->add('updated')->add('deviceServer');
+    }
+    
+    /**
+     * {@inheritdoc}
+     */
+    public function configureOptions(OptionsResolver $resolver)
+    {
+        $resolver->setDefaults(array(
+            'data_class' => 'StatsBundle\Entity\Onu'
+        ));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getBlockPrefix()
+    {
+        return 'statsbundle_onu';
+    }
+
+
+}

+ 38 - 0
src/StatsBundle/Form/PonPortType.php

@@ -0,0 +1,38 @@
+<?php
+
+namespace StatsBundle\Form;
+
+use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\FormBuilderInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
+
+class PonPortType extends AbstractType
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function buildForm(FormBuilderInterface $builder, array $options)
+    {
+        $builder->add('ponPort')->add('oltDeviceId')->add('tenancyId')->add('updated')->add('txPower')->add('rxPower')->add('voltage')->add('temperature')->add('biasCurrent')->add('deviceServer');
+    }
+    
+    /**
+     * {@inheritdoc}
+     */
+    public function configureOptions(OptionsResolver $resolver)
+    {
+        $resolver->setDefaults(array(
+            'data_class' => 'StatsBundle\Entity\PonPort'
+        ));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getBlockPrefix()
+    {
+        return 'statsbundle_ponport';
+    }
+
+
+}

+ 26 - 0
src/StatsBundle/Repository/OnuRepository.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace StatsBundle\Repository;
+
+class OnuRepository extends \Doctrine\ORM\EntityRepository
+{
+
+    /**
+     * @param string $customId
+     * 
+     * @return Onu|null
+     */
+    public function findByCustomId($customId)
+    {
+        list($ponSerialNumber, $oltDeviceId, $deviceServerId) = explode('~', $customId);
+        $qb = $this->createQueryBuilder('Onu')
+            ->join('Onu.deviceServer', 'deviceServer')
+            ->where('Onu.ponSerialNumber = :ponSerialNumber')->setParameter('ponSerialNumber', $ponSerialNumber)
+            ->andWhere('Onu.oltDeviceId = :oltDeviceId')->setParameter('oltDeviceId', $oltDeviceId)
+            ->andWhere('deviceServer.id = :deviceServerId')->setParameter('deviceServerId', $deviceServerId)
+        ;
+
+        return $qb->getQuery()->getOneOrNullResult();
+    }
+
+}

+ 1 - 1
src/StatsBundle/Resources/config/services.yml

@@ -23,7 +23,7 @@ services:
     
     stats.admin.onu:
         class: StatsBundle\Admin\OnuAdmin
-        arguments: [~, StatsBundle\Entity\Onu, SonataAdminBundle:CRUD]
+        arguments: [~, StatsBundle\Entity\Onu, StatsBundle:OnuCRUD]
         tags:
             - { name: sonata.admin, manager_type: orm, group: List, label: ONU, label_catalogue: StatsBundle, label_translator_strategy: sonata.admin.label.strategy.underscore }
         calls:    

+ 3 - 0
src/StatsBundle/Resources/views/Onu/show_link.html.twig

@@ -0,0 +1,3 @@
+<td>
+    <a href="{{ path('admin_stats_onu_show', { 'id': object.getCustomId() }) }}">{{ object.getPonSerialNumber() }}</a>
+</td>

+ 1 - 1
src/StatsBundle/Resources/views/PonPort/base_show.html.twig

@@ -22,7 +22,7 @@
                                 {% set o = onu['onu'] %}
                                 <tr class="sonata-ba-view-container">
                                     <td>{{o.getPonPort()}}</td>
-                                    <td><a href="{{path('admin_stats_onu_show',{'id': o.getId() })}}">{{o.getPonSerialNumber()}}</a></td>
+                                    <td><a href="{{ path('admin_stats_onu_show', { 'id': o.getCustomId() }) }}">{{ o.getPonSerialNumber() }}</a></td>
                                     <td>{% include 'StatsBundle:Templates:onu_field_rx.html.twig' with {'value': onu['rxPower']} only %}</td>
                                     <td>{% include 'StatsBundle:Templates:onu_field_tx.html.twig' with {'value': o.getTxPower()} only %}</td>
                                     <td>{% include 'StatsBundle:Templates:onu_field_rx.html.twig' with {'value': o.getRxPower()} only %}</td>