2018-08-21 16:34:01 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2018-09-14 01:06:13 +02:00
|
|
|
* Generate html for displaying data usage.
|
2018-08-21 16:34:01 +02:00
|
|
|
*/
|
2018-09-14 01:06:13 +02:00
|
|
|
function DisplayDataUsage(&$extraFooterScripts)
|
2018-08-21 16:34:01 +02:00
|
|
|
{
|
2019-04-10 10:37:35 +02:00
|
|
|
exec("ip -o link show | awk -F ': ' '{print $2}' | grep -v lo ", $interfacesWlo);
|
2019-08-19 01:21:23 +02:00
|
|
|
echo renderTemplate("data_usage", [ "interfaces" => $interfacesWlo ]);
|
2018-09-11 21:00:23 +02:00
|
|
|
|
2018-09-10 16:53:05 +02:00
|
|
|
$extraFooterScripts[] = array('src'=>'vendor/raphael/raphael.min.js',
|
|
|
|
'defer'=>false);
|
|
|
|
$extraFooterScripts[] = array('src'=>'vendor/morrisjs/morris.min.js', 'defer'=>false);
|
|
|
|
$extraFooterScripts[] = array('src'=>'vendor/datatables/js/jquery.dataTables.min.js', 'defer'=>false);
|
|
|
|
$extraFooterScripts[] = array('src'=>'js/bandwidthcharts.js', 'defer'=>false);
|
2018-08-21 16:34:01 +02:00
|
|
|
}
|