Quellcode durchsuchen

fix sonata admin name

Espinoza Guillermo vor 7 Jahren
Ursprung
Commit
0085bc3bb3

+ 26 - 26
src/StatsBundle/Controller/CmtsReportController.php

@@ -28,14 +28,14 @@ class CmtsReportController extends Controller
         return $this->render('StatsBundle:Device:cmts_report.html.twig', array(
             'base_template' => $adminPool->getTemplate('layout'),
             'admin_pool' => $adminPool,
-            'admin' => $adminPool->getAdminByAdminCode("stats.admin.olt"),
+            'admin' => $adminPool->getAdminByAdminCode("sonata.admin.stats.olt"),
             'device' => $device,
             'data' => $data
         ));
     }
 
     public function cmStateCountAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $em = $this->get('doctrine')->getManager();
         $cmStateCount = array();
         $count = $em->getRepository('StatsBundle:Cablemodem')->createQueryBuilder('o')
@@ -46,8 +46,8 @@ class CmtsReportController extends Controller
             ->setParameter('cmtsDeviceId', $cmtsDeviceId)
             ->groupBy('o.status')
             ->getQuery()->getScalarResult();
-        
-        $percent_online = $online = $offline = 0;    
+
+        $percent_online = $online = $offline = 0;
         foreach($count as $c) {
             if($c['status']) {
                 $status = "Online";
@@ -58,7 +58,7 @@ class CmtsReportController extends Controller
                 $color = "#F82929";
                 $offline = $c[1];
             }
-            
+
             $cmStateCount[$status] = array('count' => $c[1], 'color' => $color);
         }
 
@@ -73,7 +73,7 @@ class CmtsReportController extends Controller
     }
 
     public function cmtsInformationAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $filter = array('deviceId' => $cmtsDeviceId, 'deviceServer' => $cmtsServerId, 'deviceType' => 'CablemodemBundle\Entity\CMTS');
         $em = $this->get('doctrine')->getManager();
         $device = $em->getRepository('StatsBundle:Device')->findOneBy($filter);
@@ -81,7 +81,7 @@ class CmtsReportController extends Controller
         $subName = "d_{$cmtsDeviceId}_s_{$cmtsServerId}";
         $redis = $this->get('redis');
         $key = "cmts_desc_{$subName}";
-    
+
         $dataCached = $redis->get($key);
 
         $_desc = array();
@@ -102,7 +102,7 @@ class CmtsReportController extends Controller
     }
 
     public function cmtsCommandsAction($cmtsServerId, $cmtsDeviceId, $mark) {
-        
+
         $mark = strtolower($mark);
         $subName = "d_{$cmtsDeviceId}_s_{$cmtsServerId}_cmd_cmts";
 
@@ -114,7 +114,7 @@ class CmtsReportController extends Controller
         $targets["interface_scan"] = array("target" => "{$subName}_interface_scan");
         $targets["cm_scan"] = array("target" => "{$subName}_cm_scan");
         $errors = array();
-        
+
         foreach($targets as $index => $t) {
             $search = array('targets' => array(0 => $t), 'maxDataPoints' => 10);
             try {
@@ -133,14 +133,14 @@ class CmtsReportController extends Controller
         }
 
         if($errors) {$this->logReport($cmtsDeviceId, $cmtsServerId, $errors);}
-        
+
         return $this->render('StatsBundle:Device:Report/cmtsCommands.html.twig', array(
             'times' => $result
         ));
     }
 
     public function cmtsBandwidthAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $subName = "d_{$cmtsDeviceId}_s_{$cmtsServerId}";
 
         $result = $targets = array();
@@ -168,7 +168,7 @@ class CmtsReportController extends Controller
         }
 
         if($errors) {$this->logReport($cmtsDeviceId, $cmtsServerId, $errors);}
-        
+
         return $this->render('StatsBundle:Device:Report/cmtsBandwidth.html.twig', array(
             'inBand' => $result['in_bandwidth'],
             'outBand' => $result['out_bandwidth']
@@ -176,7 +176,7 @@ class CmtsReportController extends Controller
     }
 
     public function ponBandwidthAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $subName = "d_{$cmtsDeviceId}_s_{$cmtsServerId}";
 
         $data = $totals = $result = array();
@@ -184,13 +184,13 @@ class CmtsReportController extends Controller
 
         $key_olt_scan = "olt_scan_pons_{$subName}";
         $key_olt_pon_bandwidth = "olt_bandwidth_pons_{$subName}";
-    
+
         $dataCached = $redis->get($key_olt_scan);
         $bandwidthCached = $redis->get($key_olt_pon_bandwidth);
         $restPercent = $sum = $total = $count = $totalIn = $totalOut = 0;
 
         foreach($dataCached as $index => $pon) {
-            
+
             if(isset($pon['nexo'])) continue;
 
             if(isset($bandwidthCached[$index])) {
@@ -205,12 +205,12 @@ class CmtsReportController extends Controller
                 $totalIn += $in;
                 $totalOut += $out;
                 $total += $t;
-                
+
                 $totals[$index] = $t;
                 $result[$index] = array('ponPort' => $pon['ponPort'], 'in' => $in, 'out' => $out, 'total' => $t);
             }
         }
-        
+
         /* http://www.color-hex.com/color/ff7f24 */
         $colors = array("#cc651c","#e57220","#ff7f24","#ff8b39","#ff984f","#ffa565","#ffb27b","#ffbf91","#ffcba7","#ffd8bd","#ffe5d3","#fff2e9","#ffffff");
         if($total > 0) {
@@ -238,7 +238,7 @@ class CmtsReportController extends Controller
         print_r($totalIn.PHP_EOL);
         print_r($totalOut.PHP_EOL);
         die; */
-        
+
         return $this->render('StatsBundle:Device:Report/ponBandwidth.html.twig', array(
             'data'  => $data,
             'sum'   => $sum,
@@ -250,7 +250,7 @@ class CmtsReportController extends Controller
     }
 
     public function cmtsConsumptionAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $subName = "d_{$cmtsDeviceId}_s_{$cmtsServerId}";
 
         $result = $targets = array();
@@ -271,7 +271,7 @@ class CmtsReportController extends Controller
                 $errors[] = array("msg" => "Falla mysql_json_endpoint({$index}): {$e->getMessage()}");
                 $data = array();
             }
-            
+
             if(isset($data[0]) && isset($data[0]['datapoints'])) {
                 $points = $data[0]['datapoints']; krsort($points);
                 $result[$index] = $points;
@@ -305,9 +305,9 @@ class CmtsReportController extends Controller
     }
 
     public function cmtsReportAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $em = $this->get('doctrine')->getManager();
-        
+
         $reports = $em->getRepository('StatsBundle:Report')->createQueryBuilder('r')
             ->select('r')
             ->where('r.deviceServer = :cmtsServerId')
@@ -343,7 +343,7 @@ class CmtsReportController extends Controller
     }
 
     public function cmSignalAction($cmtsServerId, $cmtsDeviceId) {
-        
+
         $em = $this->get('doctrine')->getManager();
         $cms = $em->getRepository('StatsBundle:Cablemodem')->createQueryBuilder('o')
             ->select('o.txPower','o.rxPowerCmts', 'o.mac')
@@ -352,7 +352,7 @@ class CmtsReportController extends Controller
             ->setParameter('cmtsServerId', $cmtsServerId)
             ->setParameter('cmtsDeviceId', $cmtsDeviceId)
             ->getQuery()->getResult();
-        
+
         $colors = $signals = array();
 
         foreach($cms as $data) {
@@ -363,7 +363,7 @@ class CmtsReportController extends Controller
             if(!isset($signals[$color])) $signals[$color] = array();
 
             $signals[$color][] = array('x' => $data['txPower'],'y' => $data['rxPowerCmts'], 'extraData' => $data['mac'], 'id' => "{$data['mac']}~{$cmtsDeviceId}~{$cmtsServerId}");
-            
+
         }
         $_signals = array();
         foreach($signals as $color => $points) {
@@ -390,5 +390,5 @@ class CmtsReportController extends Controller
         else
             return "#a00400"; //bordó
     }
-    
+
 }

+ 27 - 27
src/StatsBundle/Controller/OltReportController.php

@@ -28,14 +28,14 @@ class OltReportController extends Controller
         return $this->render('StatsBundle:Device:olt_report.html.twig', array(
             'base_template' => $adminPool->getTemplate('layout'),
             'admin_pool' => $adminPool,
-            'admin' => $adminPool->getAdminByAdminCode("stats.admin.olt"),
+            'admin' => $adminPool->getAdminByAdminCode("sonata.admin.stats.olt"),
             'device' => $device,
             'data' => $data
         ));
     }
 
     public function onuStateCountAction($oltServerId, $oltDeviceId) {
-        
+
         $em = $this->get('doctrine')->getManager();
         $onuStateCount = array();
         $count = $em->getRepository('StatsBundle:Onu')->createQueryBuilder('o')
@@ -46,8 +46,8 @@ class OltReportController extends Controller
             ->setParameter('oltDeviceId', $oltDeviceId)
             ->groupBy('o.status')
             ->getQuery()->getScalarResult();
-        
-        $percent_online = $online = $offline = 0;    
+
+        $percent_online = $online = $offline = 0;
         foreach($count as $c) {
             if($c['status']) {
                 $status = "Online";
@@ -58,7 +58,7 @@ class OltReportController extends Controller
                 $color = "#F82929";
                 $offline = $c[1];
             }
-            
+
             $onuStateCount[$status] = array('count' => $c[1], 'color' => $color);
         }
 
@@ -73,7 +73,7 @@ class OltReportController extends Controller
     }
 
     public function oltInformationAction($oltServerId, $oltDeviceId) {
-        
+
         $filter = array('deviceId' => $oltDeviceId, 'deviceServer' => $oltServerId, 'deviceType' => 'FTTHBundle\Entity\OLT');
         $em = $this->get('doctrine')->getManager();
         $device = $em->getRepository('StatsBundle:Device')->findOneBy($filter);
@@ -81,7 +81,7 @@ class OltReportController extends Controller
         $subName = "d_{$oltDeviceId}_s_{$oltServerId}";
         $redis = $this->get('redis');
         $key = "olt_scan_card_{$subName}";
-    
+
         $dataCached = $redis->get($key);
 
         $cpu = $memory = array();
@@ -105,7 +105,7 @@ class OltReportController extends Controller
     }
 
     public function oltCommandsAction($oltServerId, $oltDeviceId, $mark) {
-        
+
         $mark = strtolower($mark);
         $subName = "d_{$oltDeviceId}_s_{$oltServerId}_cmd_{$mark}";
 
@@ -118,7 +118,7 @@ class OltReportController extends Controller
         $targets["pon_scan"] = array("target" => "{$subName}_pon_scan");
         $targets["onu_scan"] = array("target" => "{$subName}_onu_scan");
         $errors = array();
-        
+
         foreach($targets as $index => $t) {
             $search = array('targets' => array(0 => $t), 'maxDataPoints' => 10);
             try {
@@ -137,14 +137,14 @@ class OltReportController extends Controller
         }
 
         if($errors) {$this->logReport($oltDeviceId, $oltServerId, $errors);}
-        
+
         return $this->render('StatsBundle:Device:Report/oltCommands.html.twig', array(
             'times' => $result
         ));
     }
 
     public function oltBandwidthAction($oltServerId, $oltDeviceId) {
-        
+
         $subName = "d_{$oltDeviceId}_s_{$oltServerId}";
 
         $result = $targets = array();
@@ -172,7 +172,7 @@ class OltReportController extends Controller
         }
 
         if($errors) {$this->logReport($oltDeviceId, $oltServerId, $errors);}
-        
+
         return $this->render('StatsBundle:Device:Report/oltBandwidth.html.twig', array(
             'inBand' => $result['in_bandwidth'],
             'outBand' => $result['out_bandwidth']
@@ -180,7 +180,7 @@ class OltReportController extends Controller
     }
 
     public function ponBandwidthAction($oltServerId, $oltDeviceId) {
-        
+
         $subName = "d_{$oltDeviceId}_s_{$oltServerId}";
 
         $data = $totals = $result = array();
@@ -188,13 +188,13 @@ class OltReportController extends Controller
 
         $key_olt_scan = "olt_scan_pons_{$subName}";
         $key_olt_pon_bandwidth = "olt_bandwidth_pons_{$subName}";
-    
+
         $dataCached = $redis->get($key_olt_scan);
         $bandwidthCached = $redis->get($key_olt_pon_bandwidth);
         $restPercent = $sum = $total = $count = $totalIn = $totalOut = 0;
 
         foreach($dataCached as $index => $pon) {
-            
+
             if(isset($pon['nexo'])) continue;
 
             if(isset($bandwidthCached[$index])) {
@@ -209,12 +209,12 @@ class OltReportController extends Controller
                 $totalIn += $in;
                 $totalOut += $out;
                 $total += $t;
-                
+
                 $totals[$index] = $t;
                 $result[$index] = array('ponPort' => $pon['ponPort'], 'in' => $in, 'out' => $out, 'total' => $t);
             }
         }
-        
+
         /* http://www.color-hex.com/color/ff7f24 */
         $colors = array("#cc651c","#e57220","#ff7f24","#ff8b39","#ff984f","#ffa565","#ffb27b","#ffbf91","#ffcba7","#ffd8bd","#ffe5d3","#fff2e9","#ffffff");
         if($total > 0) {
@@ -242,7 +242,7 @@ class OltReportController extends Controller
         print_r($totalIn.PHP_EOL);
         print_r($totalOut.PHP_EOL);
         die; */
-        
+
         return $this->render('StatsBundle:Device:Report/ponBandwidth.html.twig', array(
             'data'  => $data,
             'sum'   => $sum,
@@ -254,7 +254,7 @@ class OltReportController extends Controller
     }
 
     public function oltConsumptionAction($oltServerId, $oltDeviceId) {
-        
+
         $subName = "d_{$oltDeviceId}_s_{$oltServerId}";
 
         $result = $targets = array();
@@ -272,7 +272,7 @@ class OltReportController extends Controller
                 $errors[] = array("msg" => "Falla mysql_json_endpoint({$index}): {$e->getMessage()}");
                 $data = array();
             }
-            
+
             if(isset($data[0]) && isset($data[0]['datapoints'])) {
                 $points = $data[0]['datapoints']; krsort($points);
                 $result[$index] = $points;
@@ -280,7 +280,7 @@ class OltReportController extends Controller
                 $result[$index] = array();
             }
         }
-        
+
         if($errors) {$this->logReport($oltDeviceId, $oltServerId, $errors);}
 
         return $this->render('StatsBundle:Device:Report/oltConsumption.html.twig', array(
@@ -303,9 +303,9 @@ class OltReportController extends Controller
     }
 
     public function oltReportAction($oltServerId, $oltDeviceId) {
-        
+
         $em = $this->get('doctrine')->getManager();
-        
+
         $reports = $em->getRepository('StatsBundle:Report')->createQueryBuilder('r')
             ->select('r')
             ->where('r.deviceServer = :oltServerId')
@@ -341,7 +341,7 @@ class OltReportController extends Controller
     }
 
     public function onuSignalAction($oltServerId, $oltDeviceId) {
-        
+
         $em = $this->get('doctrine')->getManager();
         $onus = $em->getRepository('StatsBundle:Onu')->createQueryBuilder('o')
             ->select('o.txPower','o.rxPowerOlt', 'o.ponSerialNumber')
@@ -350,7 +350,7 @@ class OltReportController extends Controller
             ->setParameter('oltServerId', $oltServerId)
             ->setParameter('oltDeviceId', $oltDeviceId)
             ->getQuery()->getResult();
-        
+
         $colors = $signals = array();
 
         foreach($onus as $data) {
@@ -361,7 +361,7 @@ class OltReportController extends Controller
             if(!isset($signals[$color])) $signals[$color] = array();
 
             $signals[$color][] = array('x' => $data['txPower'],'y' => $data['rxPowerOlt'], 'extraData' => $data['ponSerialNumber'], 'id' => "{$data['ponSerialNumber']}~{$oltDeviceId}~{$oltServerId}");
-            
+
             //$colors[] = $this->getRxColor($data['rxPowerOlt']);
         }
         $_signals = array();
@@ -392,5 +392,5 @@ class OltReportController extends Controller
         else
             return "#a00400"; //bordó
     }
-    
+
 }

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

@@ -14,7 +14,7 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/statsdevice/update", name="stats_update_devices")
-     * 
+     *
      * @return string
      */
     public function updateDevicesAction()
@@ -29,21 +29,21 @@ class StatsController extends Controller
     /**
      * Check value of geoserver_service parameter in parameters.yml
      */
-    private function checkGeoserverService() 
+    private function checkGeoserverService()
     {
         if($this->getParameter('geoserver_service')) {
             return true;
         }
-        
+
         $this->flashMsg('msg_no_enable_geoserver_service');
         return false;
-        
+
     }
 
     /**
      * Create simple flash message
      */
-    private function flashMsg($msg = 'msg', $type = 'error', $bundle = 'StatsBundle') 
+    private function flashMsg($msg = 'msg', $type = 'error', $bundle = 'StatsBundle')
     {
         $translator = $this->get('translator');
         $flashbag = $this->get('session')->getFlashBag();
@@ -51,9 +51,9 @@ class StatsController extends Controller
     }
 
     /**
-     * Set default lat-lng-zoom 
+     * Set default lat-lng-zoom
      */
-    private function setDefaultMap() 
+    private function setDefaultMap()
     {
         $zoom = $this->getParameter('geoserver_default_zoom') ?? null;
         $lat = $this->getParameter('geoserver_default_lat') ?? null;
@@ -63,13 +63,13 @@ class StatsController extends Controller
     }
 
     /**
-     * Set layer lat-lng-zoom 
+     * Set layer lat-lng-zoom
      */
-    private function setLatLngZoom($srs) 
+    private function setLatLngZoom($srs)
     {
         $lng = $srs['minx'] + ($srs['maxx'] - $srs['minx']) / 2;
         $lat = $srs['miny'] + ($srs['maxy'] - $srs['miny']) / 2;
-    
+
         $lngDiff = $srs['maxx'] - $srs['minx'];
         $latDiff = $srs['maxy'] - $srs['miny'];
         $maxDiff = ($lngDiff > $latDiff) ? $lngDiff : $latDiff;
@@ -85,15 +85,15 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/onu/stats/map", name="onu_stats_map")
-     * 
+     *
      * @return string
      */
     public function showMapAction(Request $request)
     {
-        
+
         if(!$this->checkGeoserverService())
             return $this->redirect($this->generateUrl('admin_stats_onu_list'));
-        
+
         $map = $this->setDefaultMap();
 
         $adminPool = $this->get('sonata.admin.pool');
@@ -102,10 +102,10 @@ class StatsController extends Controller
         $gsPort = $this->getParameter('geoserver_port');
         $deviceServerId = $this->getParameter('device_server_base');
         $tenancyId = $this->get("base_tenancy.tenancy_service")->getTenancyIdCurrent();
-        
+
         $workspace = "deviceServer_{$deviceServerId}";
         $layer = "onu_stats_tenancy_{$tenancyId}";
-        
+
         $data = $api->getLayerData($workspace, $layer);
         $srs = false;
 
@@ -136,15 +136,15 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/ponport/stats/map", name="ponport_stats_map")
-     * 
+     *
      * @return string
      */
     public function showPonPortMapAction(Request $request)
     {
-        
+
         if(!$this->checkGeoserverService())
             return $this->redirect($this->generateUrl('admin_stats_ponport_list'));
-        
+
         $map = $this->setDefaultMap();
 
         $ponPortId = $request->get('id');
@@ -154,23 +154,23 @@ class StatsController extends Controller
         $api = $this->get('geoserver.api');
         $gsHost = $this->getParameter('geoserver_host');
         $gsPort = $this->getParameter('geoserver_port');
-        
+
         $ponPort = $em->getRepository("StatsBundle:PonPort")->findOneById($ponPortId);
         $oltDeviceId = $ponPort->getOltDeviceId();
         $deviceServerId = $ponPort->getDeviceServer()->getId();
         $tenancyId = $ponPort->getTenancyId();
-       
+
         $data = explode("/", $ponPort->getPonPort());
         $card = $data[0];
         $slot = $data[1];
-       
+
         $workspace = "deviceServer_{$deviceServerId}";
         $layer = "ponport_stats_t_{$tenancyId}_o_{$oltDeviceId}_s_{$deviceServerId}_c_{$card}_s_{$slot}";
 
         $data = $api->getLayerData($workspace, $layer);
 
         $srs = false;
-       
+
         if(!empty($data) && is_array($data)) {
             if(isset($data['featureType']['latLonBoundingBox'])) {
                 $srs = $data['featureType']['latLonBoundingBox'];
@@ -199,22 +199,22 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/onu/stats/api_feature_json", name="api_feature_json")
-     * 
+     *
      * @return string
      */
-    public function apiFeatureJsonAction(Request $request) 
+    public function apiFeatureJsonAction(Request $request)
     {
         $params = $request->query->all();
         $data = explode(":",$params['LAYERS']);
-        
+
         $workspace = $data[0];
 
         $api = $this->get('geoserver.api');
         $return = $api->getFeature($workspace, $params);
 
-        
+
         $data = json_decode($return,true);
-        
+
         if(isset($data['features']) && isset($data['features'][0])) {
             $return = json_encode($data['features'][0]['properties']);
         } else {
@@ -233,16 +233,16 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/deviceserver/getroutes", name="deviceserver_get_routes")
-     * 
+     *
      * @return string
      */
     public function deviceServerGetRoutesAction()
     {
         $webservice = $this->get("webservice");
-        
+
         $test = $webservice->makeGetRequest("http://200.50.168.118/base/app_dev.php/api/routes");
 
-        
+
         $response = new Response(
             $test,
             Response::HTTP_OK,
@@ -250,17 +250,17 @@ class StatsController extends Controller
         );
 
         return $response;
-        
+
         print_r("<pre>");
         var_dump($test);
 
         die;
- 
+
     }
 
     /**
      * @Route("/admin/stats/olt/stats/graph", name="stats_graph")
-     * 
+     *
      * @return string
      */
     public function getStatsGraphAction(Request $request)
@@ -305,10 +305,10 @@ class StatsController extends Controller
             'urls' => $urls,
         ));
     }
-    
+
     /**
      * @Route("/admin/stats/onu/stats/graph", name="onu_stats_graph")
-     * 
+     *
      * @return string
      */
     public function getONUStatsGraphAction(Request $request)
@@ -344,7 +344,7 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/onu/grafana", name="grafana_onu")
-     * 
+     *
      * @return string
      */
     public function grafanaOnuAction(Request $request)
@@ -352,7 +352,7 @@ class StatsController extends Controller
         $grafana_url = $this->getParameter('grafana_url');
 
         $ponSerialNumber = strtolower($request->get('ponSerialNumber'));
-        
+
         $panelIds = array(6, 1, 2, 3, 4, 5);
         foreach ($panelIds as $panelId) {
             $urls[] = "onu?orgId=1&var-serialnumber={$ponSerialNumber}&panelId={$panelId}&theme=light";
@@ -373,20 +373,20 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/ponport/grafana", name="grafana_ponport")
-     * 
+     *
      * @return string
      */
     public function grafanaPonPortAction(Request $request)
     {
         $grafana_url = $this->getParameter('grafana_url');
-       
+
         $em = $this->get("doctrine.orm.entity_manager");
         $ponPortId = $request->get('id');
-        
+
         $ponPort = $em->getRepository("StatsBundle:PonPort")->findOneById($ponPortId);
         $oltDeviceId = $ponPort->getOltDeviceId();
         $deviceServerId = $ponPort->getDeviceServer()->getId();
-        
+
         $panelIds = array(1, 2, 3, 4);
         $data = explode("/", $ponPort->getPonPort());
         if(count($data) == 3) {
@@ -416,29 +416,29 @@ class StatsController extends Controller
         ));
     }
 
-    
+
 
     /**
      * @Route("/admin/stats/ponport/grafana", name="grafana_ponport")
-     * 
+     *
      * @return string
      */
     public function grafanaInterfaceAction(Request $request)
     {
         $grafana_url = $this->getParameter('grafana_url');
-       
+
         $em = $this->get("doctrine.orm.entity_manager");
         $interfaceId = $request->get('id');
 
-        
+
         $interface = $em->getRepository("StatsBundle:CmtsInterface")->findOneById($interfaceId);
         $cmtsDeviceId = $interface->getCmtsDeviceId();
         $deviceServerId = $interface->getDeviceServer()->getId();
         $index = $interface->getIndex();
 
-        
+
         $panelIds = array(1, 2, 3);
-        
+
         foreach ($panelIds as $panelId) {
             $urls[] = "cmts-interface?orgId=1&var-cmts={$cmtsDeviceId}&var-server={$deviceServerId}&var-interface={$index}&panelId={$panelId}&theme=light";
         }
@@ -457,7 +457,7 @@ class StatsController extends Controller
 
     /**
      * @Route("/admin/stats/cablemodem/grafana", name="grafana_cablemodem")
-     * 
+     *
      * @return string
      */
     public function grafanaCablemodemAction(Request $request)
@@ -465,7 +465,7 @@ class StatsController extends Controller
         $grafana_url = $this->getParameter('grafana_url');
 
         $mac = strtolower($request->get('mac'));
-        
+
         $panelIds = array(1, 2, 3, 4, 5);
         foreach ($panelIds as $panelId) {
             $urls[] = "cablemodem?orgId=1&var-mac={$mac}&var-tx_channel=2&var-channel=3&panelId={$panelId}&theme=light";