|
@@ -0,0 +1,236 @@
|
|
|
+<div class="box box-primary">
|
|
|
+ <br />
|
|
|
+ <div class="box-body">
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div class="nav-tabs-custom">
|
|
|
+ <ul class="nav nav-tabs">
|
|
|
+ <li class="active">
|
|
|
+ <a href="#tab_1" data-toggle="tab">{{ 'Description'|trans({}, 'StatsBundle') }}</a>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <a href="#tab_2" data-toggle="tab">{{ 'ONUs'|trans({}, 'StatsBundle') }} <span class="no_defined nas_data_origen">({{onus|length}})</span></a>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <a href="#tab_3" data-toggle="tab">{{ 'Optical'|trans({}, 'StatsBundle') }} <span class="no_defined nas_data_origen"></span></a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ <div class="tab-content clearfix">
|
|
|
+
|
|
|
+ {# TAB Description #}
|
|
|
+ <div class="tab-pane active" id="tab_1">
|
|
|
+ <div class="clearfix">
|
|
|
+ <div class="col-sm-4">
|
|
|
+ {% include '@Stats/Stats/Template/ponport_info_1.html.twig' %}
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-8">
|
|
|
+ {% include '@Stats/Stats/Template/ponport_onus_location.html.twig' %}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <div class="clearfix">
|
|
|
+ <div class="col-sm-9" style="text-align:center">
|
|
|
+ <div id="ponport_bandwidth" style="height: 400px;"></div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-3">
|
|
|
+ {% include '@Stats/Stats/Template/interface_bandwidth_info.html.twig' %}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <div class="clearfix">
|
|
|
+ <div class="col-sm-9" style="text-align:center">
|
|
|
+ <div id="ponport_tx" style="height: 400px;"></div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-3">
|
|
|
+ {% include '@Stats/Stats/Template/ponport_tx_info.html.twig' %}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <div class="clearfix">
|
|
|
+ <div class="col-sm-9" style="text-align:center">
|
|
|
+ <div id="ponport_onu" style="height: 400px;"></div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-3">
|
|
|
+ <div id="onu_count" style="width:75%; margin:0 auto"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ {# TAB ONUs #}
|
|
|
+ <div class="tab-pane" id="tab_2">
|
|
|
+ {% include '@Stats/Stats/Template/ponport_onus.html.twig' %}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {# TAB Optical #}
|
|
|
+ <div class="tab-pane" id="tab_3">
|
|
|
+ <div class="clearfix">
|
|
|
+
|
|
|
+ <div class="col-sm-12" style="text-align:center">
|
|
|
+ <div id="ponport_rx" style="height: 400px; width: 100%"></div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div id="ponport_voltage" style="height: 400px; width: 100%"></div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div id="ponport_temperature" style="height: 400px; width: 100%"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+var from = {{from}};
|
|
|
+var to = {{to}};
|
|
|
+var markerEnable = false;
|
|
|
+if((to - from) <= 21600) {
|
|
|
+ markerEnable = true;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+Highcharts.chart('ponport_bandwidth', {
|
|
|
+ chart: {type: 'spline'},
|
|
|
+ title: {text: 'Bandwidth PonPort'},
|
|
|
+ subtitle: {text: 'IN Bandwidth / OUT Bandwidth'},
|
|
|
+ xAxis: {type: 'datetime',dateTimeLabelFormats: {month: '%e. %b',year: '%b'},title: {text: 'Date'}},
|
|
|
+ yAxis: {labels: {formatter: bandwidthAxisLabel,align: 'left'},min: 0},
|
|
|
+ tooltip: {formatter: bandwidthTooltip},
|
|
|
+ plotOptions: {series: {marker: {enabled: markerEnable}}, spline: {marker: {enabled: true}}},
|
|
|
+ series: [{
|
|
|
+ name: "IN Bandwidth",
|
|
|
+ data: {{series['in_bandwidth']['data']|json_encode}},
|
|
|
+ color: '#3f6833'
|
|
|
+ },{
|
|
|
+ name: "OUT Bandwidth",
|
|
|
+ data: {{series['out_bandwidth']['data']|json_encode}},
|
|
|
+ color: '#e24d42'
|
|
|
+ }]
|
|
|
+});
|
|
|
+
|
|
|
+Highcharts.chart('ponport_onu', {
|
|
|
+ chart: {type: 'area'},
|
|
|
+ title: {text: 'Onus'},
|
|
|
+ subtitle: {text: 'Online / Offline'},
|
|
|
+ xAxis: {type: 'datetime',dateTimeLabelFormats: {month: '%e. %b',year: '%b'},title: {text: 'Date'}},
|
|
|
+ yAxis: {min: 0,stackLabels: {enabled: false,style: {fontWeight: 'bold',color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'}}},
|
|
|
+ tooltip: {valueSuffix: ' onu',valueDecimals: 0},
|
|
|
+ plotOptions: {series: {marker: {enabled: markerEnable}}, area: {stacking: 'normal', dataLabels: {enabled: false, color: '#666666'}}},
|
|
|
+ series: [{
|
|
|
+ name: 'Online',
|
|
|
+ data: {{series['on']['data']|json_encode}},
|
|
|
+ color: '#3f6833'
|
|
|
+ }, {
|
|
|
+ name: 'Offline',
|
|
|
+ data: {{series['off']['data']|json_encode}},
|
|
|
+ color: '#e24d42'
|
|
|
+ }]
|
|
|
+});
|
|
|
+
|
|
|
+Highcharts.chart('onu_count', {
|
|
|
+ chart: {type: 'pie'},
|
|
|
+ title: {},
|
|
|
+ tooltip: {pointFormat: '{series.name}: <b>{point.y:.0f}</b>({point.percentage:.1f}%)'},
|
|
|
+ plotOptions: {pie: {allowPointSelect: true,cursor: 'pointer',dataLabels: {enabled: true,format: '<b>{point.name}</b>: {point.y:.0f} ({point.percentage:.1f} %)',style: {color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'}}}},
|
|
|
+ series: [{
|
|
|
+ name: 'Onus',
|
|
|
+ colorByPoint: true,
|
|
|
+ data: [{
|
|
|
+ name: 'Online',
|
|
|
+ y: {{status['online']}},
|
|
|
+ sliced: true,
|
|
|
+ selected: true,
|
|
|
+ color: '#3f6833'
|
|
|
+ }, {
|
|
|
+ name: 'Offline',
|
|
|
+ y: {{status['offline']}},
|
|
|
+ color: '#e24d42'
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+});
|
|
|
+
|
|
|
+Highcharts.chart('ponport_tx', {
|
|
|
+ chart: {type: 'area'},
|
|
|
+ title: {text: '{{ 'tx_title'|trans({}, 'StatsBundle') }}'},
|
|
|
+ subtitle: {},
|
|
|
+ xAxis: {type: 'datetime',dateTimeLabelFormats: {month: '%e. %b',year: '%b'},title: {text: 'Date'}},
|
|
|
+ yAxis: {labels: {format: '{value} dBm'},min: null},
|
|
|
+ tooltip: {valueSuffix: ' dBm',valueDecimals: 2},
|
|
|
+ plotOptions: {series: {marker: {enabled: markerEnable}}, spline: {marker: {enabled: true}}},
|
|
|
+ legend: {enabled: false},
|
|
|
+ series: [{
|
|
|
+ name: "TX Power",
|
|
|
+ data: {{series['tx']['data']|json_encode}},
|
|
|
+ color: '#6ed0e0',
|
|
|
+ fillOpacity: 0.2
|
|
|
+ }]
|
|
|
+});
|
|
|
+
|
|
|
+Highcharts.chart('ponport_voltage', {
|
|
|
+ chart: {type: 'area'},
|
|
|
+ title: {text: 'Voltage'},
|
|
|
+ subtitle: {},
|
|
|
+ xAxis: {type: 'datetime',dateTimeLabelFormats: {month: '%e. %b',year: '%b'},title: {text: 'Date'}},
|
|
|
+ yAxis: {labels: {format: '{value} V'},min: 0},
|
|
|
+ tooltip: {valueSuffix: ' V',valueDecimals: 2},
|
|
|
+ plotOptions: {series: {marker: {enabled: markerEnable}}, spline: {marker: {enabled: true}}},
|
|
|
+ legend: {enabled: false},
|
|
|
+ series: [{
|
|
|
+ name: "Voltage",
|
|
|
+ data: {{series['voltage']['data']|json_encode}},
|
|
|
+ color: '#4841AD',
|
|
|
+ fillOpacity: 0.2
|
|
|
+ }]
|
|
|
+});
|
|
|
+
|
|
|
+Highcharts.chart('ponport_temperature', {
|
|
|
+ chart: {type: 'area'},
|
|
|
+ title: {text: 'Temperature'},
|
|
|
+ subtitle: {},
|
|
|
+ xAxis: {type: 'datetime',dateTimeLabelFormats: {month: '%e. %b',year: '%b'},title: {text: 'Date'}},
|
|
|
+ yAxis: {labels: {format: '{value} ºC'},min: 0},
|
|
|
+ tooltip: {valueSuffix: ' ºC',valueDecimals: 2},
|
|
|
+ plotOptions: {series: {marker: {enabled: markerEnable}}, spline: {marker: {enabled: true}}},
|
|
|
+ legend: {enabled: false},
|
|
|
+ series: [{
|
|
|
+ name: "Temperature",
|
|
|
+ data: {{series['temperature']['data']|json_encode}},
|
|
|
+ color: '#B75426',
|
|
|
+ fillOpacity: 0.2
|
|
|
+ }]
|
|
|
+});
|
|
|
+
|
|
|
+Highcharts.chart('ponport_rx', {
|
|
|
+ chart: {type: 'spline'},
|
|
|
+ title: {text: 'RX Power'},
|
|
|
+ subtitle: {},
|
|
|
+ xAxis: {type: 'datetime',dateTimeLabelFormats: {month: '%e. %b',year: '%b'},title: {text: 'Date'}},
|
|
|
+ yAxis: {labels: {format: '{value} dBm'},min: null},
|
|
|
+ tooltip: {valueSuffix: ' dBm',valueDecimals: 2},
|
|
|
+ plotOptions: {series: {marker: {enabled: markerEnable}}, spline: {marker: {enabled: true}}},
|
|
|
+ series: [
|
|
|
+ {% for sn in rxseries %}
|
|
|
+ {
|
|
|
+ name: "ONU {{sn}}",
|
|
|
+ data: {{series['rx_' ~ sn]['data']|json_encode}}
|
|
|
+ },
|
|
|
+ {% endfor %}
|
|
|
+ ]
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</script>
|