mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add interval chooser to realtime
git-svn-id: http://www.observium.org/svn/observer/trunk@2427 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,5 +1,47 @@
|
||||
<?php
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
echo("Polling Interval: ");
|
||||
|
||||
if ($_GET['optc'] == "0.25" || !$_GET['optc']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$interface['interface_id']."/realtime/0.25/'>0.25s</a>");
|
||||
if ($_GET['optc'] == "0.25" || !$_GET['optc']) { echo("</span>"); }
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($_GET['optc'] == "1" || !$_GET['optc']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$interface['interface_id']."/realtime/1/'>1s</a>");
|
||||
if ($_GET['optc'] == "1" || !$_GET['optc']) { echo("</span>"); }
|
||||
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($_GET['optc'] == "2" || !$_GET['optc']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$interface['interface_id']."/realtime/2/'>2s</a>");
|
||||
if ($_GET['optc'] == "2" || !$_GET['optc']) { echo("</span>"); }
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($_GET['optc'] == "5" || !$_GET['optc']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$interface['interface_id']."/realtime/5/'>5s</a>");
|
||||
if ($_GET['optc'] == "5" || !$_GET['optc']) { echo("</span>"); }
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($_GET['optc'] == "15" || !$_GET['optc']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$interface['interface_id']."/realtime/15/'>15s</a>");
|
||||
if ($_GET['optc'] == "15" || !$_GET['optc']) { echo("</span>"); }
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($_GET['optc'] == "60" || !$_GET['optc']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$interface['interface_id']."/realtime/60/'>60s</a>");
|
||||
if ($_GET['optc'] == "60" || !$_GET['optc']) { echo("</span>"); }
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
|
||||
### FIXME - do this in a function and/or do it in graph-realtime.php
|
||||
|
||||
if($device['os'] == "linux") {
|
||||
@@ -8,9 +50,11 @@ if($device['os'] == "linux") {
|
||||
$interval = "2";
|
||||
}
|
||||
|
||||
if($_GET['optc']) { $interval = $_GET['optc']; }
|
||||
|
||||
?>
|
||||
|
||||
<div align="center">
|
||||
<div align="center" style="margin: 30px;">
|
||||
<object data="graph-realtime.php?type=bits&id=<?php echo($interface['interface_id'] . "&interval=".$interval); ?>" type="image/svg+xml" width="1000" height="400">
|
||||
<param name="src" value="graph.php?type=bits&id=<?php echo($interface['interface_id'] . "&interval=".$interval); ?>" />
|
||||
Your browser does not support the type SVG! You need to either use Firefox or download the Adobe SVG plugin.
|
||||
|
||||
Reference in New Issue
Block a user