Browse Source

Se agrega id de ONU módulo Stats en los archivos de geoserver y su
correspondiente link desde el mapa hacia el perfil de la ONU en el mismo
módulo(Stats)

Maximiliano Schvindt 7 years ago
parent
commit
21e908a95f

+ 1 - 0
src/StatsBundle/Command/StatsGeoOnuCommand.php

@@ -109,6 +109,7 @@ class StatsGeoOnuCommand extends BaseCommand
                 }
                 
                 $row['properties']["muestreo"] = date("d-m H:i");
+                $row['properties']["id_stats"] = "{$lowSn}~{$oltDeviceId}~{$oltServerId}";
                 $geo['features'][] = $row;
             }
 

+ 3 - 1
src/StatsBundle/Resources/views/Stats/onu_map.html.twig

@@ -159,7 +159,9 @@ function customPopupFeature(latlng, content) {
         if(content.temp == 0) {temp = "-";} else {temp = content.temp;}
 
         ponSerialNumber = id.replace("onu.", "").toUpperCase();
-        data = "<b>" + ponSerialNumber + "</b><br /> Tx: <span class='"+txStyle(content.tx)+"'>" + tx + 
+        link = "{{path('admin_stats_onu_show',{'id':'IDONU'})}}";
+        url = link.replace("IDONU", content.id_stats);
+        data = "<a href='" + url + "' target='_blank'><b>" + ponSerialNumber + "</b></a><br /> Tx: <span class='"+txStyle(content.tx)+"'>" + tx + 
                "</span> dBm<br /> Rx: <span class='"+rxStyle(content.rx)+"'>" + rx + 
                "</span> dBm<br /> Status: " + status  + 
                "<br /> Voltage: " + volt +