From e15af852f7a1c3d3950696356b9bbdb44252b4fd Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 3 May 2012 13:52:34 +0000 Subject: [PATCH] html fixies, show rrdtool version on menu git-svn-id: http://www.observium.org/svn/observer/trunk@3127 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-menubar.php | 24 ++++++++++++------------ html/index.php | 13 +++++-------- html/pages/devices.inc.php | 2 +- includes/polling/functions.inc.php | 5 ++--- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index d9046a41a..f3bd8300c 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -82,7 +82,7 @@ if ($_SESSION['userlevel'] >= '10') -
+
@@ -154,10 +153,8 @@ if ($config['page_refresh']) { echo(' - - + + diff --git a/html/pages/devices.inc.php b/html/pages/devices.inc.php index 9ec831642..ce41d128e 100644 --- a/html/pages/devices.inc.php +++ b/html/pages/devices.inc.php @@ -134,7 +134,7 @@ foreach (dbFetch('SELECT `type` FROM `devices` AS D WHERE 1 GROUP BY `type` ORDE Update URL | Reset
- + diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index 5fecdcafe..b880e9337 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -13,14 +13,13 @@ function poll_sensor($device, $class, $unit) for ($i = 0;$i < 5;$i++) # Try 5 times to get a valid temp reading { if ($debug) echo("Attempt $i "); - $sensor_value = snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB"); - $sensor_value = trim(str_replace("\"", "", $sensor_value)); + $sensor_value = trim(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB"))); if ($sensor_value < 9000) break; # TME sometimes sends 999.9 when it is right in the middle of an update; sleep(1); # Give the TME some time to reset } } else { - $sensor_value = snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB"); + $sensor_value = trim(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB"))); } if ($sensor_value == -32768) { echo("Invalid (-32768) "); $sensor_value = 0; }