From 3b2446d3cbad3032beda80354cf4ab408de39ce5 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 8 Sep 2011 04:54:34 +0000 Subject: [PATCH] fixes to realtime graph git-svn-id: http://www.observium.org/svn/observer/trunk@2428 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/port/realtime.inc.php | 48 +++++++++++++------------ 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/html/pages/device/port/realtime.inc.php b/html/pages/device/port/realtime.inc.php index 0784ceef1c..1e8109203e 100644 --- a/html/pages/device/port/realtime.inc.php +++ b/html/pages/device/port/realtime.inc.php @@ -1,57 +1,59 @@ "); } +if ($interval == "0.25" || !$interval) { echo(""); } echo("0.25s"); -if ($_GET['optc'] == "0.25" || !$_GET['optc']) { echo(""); } +if ($interval == "0.25" || !$interval) { echo(""); } echo(" | "); -if ($_GET['optc'] == "1" || !$_GET['optc']) { echo(""); } +if ($interval == "1" || !$interval) { echo(""); } echo("1s"); -if ($_GET['optc'] == "1" || !$_GET['optc']) { echo(""); } +if ($interval == "1" || !$interval) { echo(""); } echo(" | "); -if ($_GET['optc'] == "2" || !$_GET['optc']) { echo(""); } +if ($interval == "2" || !$interval) { echo(""); } echo("2s"); -if ($_GET['optc'] == "2" || !$_GET['optc']) { echo(""); } +if ($interval == "2" || !$interval) { echo(""); } echo(" | "); -if ($_GET['optc'] == "5" || !$_GET['optc']) { echo(""); } +if ($interval == "5" || !$interval) { echo(""); } echo("5s"); -if ($_GET['optc'] == "5" || !$_GET['optc']) { echo(""); } +if ($interval == "5" || !$interval) { echo(""); } echo(" | "); -if ($_GET['optc'] == "15" || !$_GET['optc']) { echo(""); } +if ($interval == "15" || !$interval) { echo(""); } echo("15s"); -if ($_GET['optc'] == "15" || !$_GET['optc']) { echo(""); } +if ($interval == "15" || !$interval) { echo(""); } echo(" | "); -if ($_GET['optc'] == "60" || !$_GET['optc']) { echo(""); } +if ($interval == "60" || !$interval) { echo(""); } echo("60s"); -if ($_GET['optc'] == "60" || !$_GET['optc']) { echo(""); } +if ($interval == "60" || !$interval) { echo(""); } print_optionbar_end(); - -### FIXME - do this in a function and/or do it in graph-realtime.php - -if($device['os'] == "linux") { - $interval = "15"; -} else { - $interval = "2"; -} - -if($_GET['optc']) { $interval = $_GET['optc']; } - ?>