2011-09-28 23:24:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
2012-05-11 13:26:14 +00:00
|
|
|
$device = device_by_id_cache($vars['id']);
|
|
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$units = 'b';
|
|
|
|
|
$total_units = 'B';
|
|
|
|
|
$colours_in = 'greens';
|
|
|
|
|
$multiplier = '8';
|
|
|
|
|
$colours_out = 'blues';
|
2011-10-01 10:10:02 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$nototal = 1;
|
2011-10-01 10:10:02 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$ds_in = 'traf_in';
|
|
|
|
|
$ds_out = 'traf_out';
|
2011-10-01 10:10:02 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$graph_title = 'Traffic Statistic';
|
2011-10-01 10:10:02 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$colour_line_in = '006600';
|
|
|
|
|
$colour_line_out = '000099';
|
|
|
|
|
$colour_area_in = 'CDEB8B';
|
|
|
|
|
$colour_area_out = 'C3D9FF';
|
2011-10-01 10:10:02 +00:00
|
|
|
|
2016-07-07 01:33:43 -05:00
|
|
|
$rrd_list = [];
|
2022-07-22 16:01:55 -05:00
|
|
|
$rrd_filenames = glob(Rrd::name($device['hostname'], ['app', 'shoutcast', $app->app_id], '*.rrd'));
|
2016-07-07 01:33:43 -05:00
|
|
|
foreach ($rrd_filenames as $file) {
|
2016-07-07 21:57:18 -05:00
|
|
|
$pieces = explode('-', basename($file, '.rrd'));
|
|
|
|
|
$hostname = end($pieces);
|
2016-07-07 01:33:43 -05:00
|
|
|
[$host, $port] = explode('_', $hostname, 2);
|
|
|
|
|
$rrd_list[] = [
|
|
|
|
|
'filename' => $file,
|
|
|
|
|
'descr' => $host . ':' . $port,
|
|
|
|
|
'ds_in' => $ds_in,
|
|
|
|
|
'ds_out' => $ds_out,
|
|
|
|
|
];
|
2011-10-01 10:10:02 +00:00
|
|
|
}
|
|
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
require 'includes/html/graphs/generic_multi_bits_separated.inc.php';
|