From 7ba4385fe9c551463fc566e8b2a999ca95a1d0ae Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 16 Sep 2011 01:58:23 +0000 Subject: [PATCH] replace duplicate code block with non duplicate code block. for fun. git-svn-id: http://www.observium.org/svn/observer/trunk@2478 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/devices.inc.php | 2 +- includes/polling/sensors.inc.php | 34 +++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/html/pages/devices.inc.php b/html/pages/devices.inc.php index cee913ca12..18396292dc 100644 --- a/html/pages/devices.inc.php +++ b/html/pages/devices.inc.php @@ -248,7 +248,7 @@ if($format == "graph") { $graph_type = "device_".$subformat; - echo("
+ echo("
".$device['hostname']." - ".$interface['ifDescr']."
\ \ diff --git a/includes/polling/sensors.inc.php b/includes/polling/sensors.inc.php index a0f52d2c0a..9c7396f5c8 100644 --- a/includes/polling/sensors.inc.php +++ b/includes/polling/sensors.inc.php @@ -1,17 +1,29 @@ 'A', + 'frequency' => 'Hz', + 'humidity' => '%', + 'fanspeed' => 'rpm', + 'power' => 'W', + 'voltage' => 'V', + 'temperature' => 'C'); + +foreach ($supported_sensors as $sensor_type => $sensor_unit) +{ + poll_sensor($device, $sensor_type, $sensor_unit); +} ?>