Files
librenms-librenms/html/pages/device/port/realtime.inc.php
T

36 lines
1.1 KiB
PHP
Raw Normal View History

2011-09-08 03:09:04 +00:00
<?php
2011-09-08 04:54:34 +00:00
### FIXME - do this in a function and/or do it in graph-realtime.php
2011-09-18 13:11:04 +00:00
if(!isset($vars['interval'])) {
2011-09-08 04:54:34 +00:00
if($device['os'] == "linux") {
2011-09-18 13:11:04 +00:00
$vars['interval'] = "15";
2011-09-08 04:54:34 +00:00
} else {
2011-09-18 13:11:04 +00:00
$vars['interval'] = "2";
2011-09-08 04:54:34 +00:00
}
}
2011-09-08 03:52:37 +00:00
print_optionbar_start();
echo("Polling Interval: ");
2011-09-20 09:55:11 +00:00
foreach(array(0.25, 1, 2, 5, 15, 60) as $interval)
2011-09-18 13:11:04 +00:00
{
echo($thinger);
if ($vars['interval'] == $interval) { echo("<span class='pagemenu-selected'>"); }
echo(generate_link($interval."s",$link_array,array('view'=>'realtime','interval'=>$interval)));
if ($vars['interval'] == $interval) { echo("</span>"); }
$thinger = " | ";
}
2011-09-08 03:52:37 +00:00
print_optionbar_end();
2011-09-08 03:09:04 +00:00
?>
2011-09-08 03:52:37 +00:00
<div align="center" style="margin: 30px;">
2011-09-18 13:11:04 +00:00
<object data="graph-realtime.php?type=bits&id=<?php echo($port['interface_id'] . "&interval=".$vars['interval']); ?>" type="image/svg+xml" width="1000" height="400">
<param name="src" value="graph.php?type=bits&id=<?php echo($port['interface_id'] . "&interval=".$vars['interval']); ?>" />
2011-09-08 03:09:04 +00:00
Your browser does not support the type SVG! You need to either use Firefox or download the Adobe SVG plugin.
</object>
</div>