From d8470ad53e5f87a8838969c6b2880fe0f0752ec5 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Fri, 23 Sep 2011 10:48:47 +0000 Subject: [PATCH] fix sensor graph display/link on some devices, at least my hp procurve git-svn-id: http://www.observium.org/svn/observer/trunk@2557 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/entphysical.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/html/pages/device/entphysical.inc.php b/html/pages/device/entphysical.inc.php index 007fa2602..c3f1f4b1a 100644 --- a/html/pages/device/entphysical.inc.php +++ b/html/pages/device/entphysical.inc.php @@ -17,11 +17,10 @@ function printEntPhysical($ent, $level, $class) if ($ent['entPhysicalClass'] == "sensor") { echo(" "); - # FIXME /ciscosensors? doesn't exist anymore methinks? or does it? - $sensor = dbFetchRow("SELECT * FROM `sensors` WHERE `device_id` = ? AND `entPhysicalIndex` = ?", array($device['device_id'], $ent['entPhysicalIndex'])); + $sensor = dbFetchRow("SELECT * FROM `sensors` WHERE `device_id` = ? AND (`entPhysicalIndex` = ? OR `sensor_index` = ?)", array($device['device_id'], $ent['entPhysicalIndex'], $ent['entPhysicalIndex'])); if (count($sensor)) { - $link = " href='device/".$device['device_id']."/health/".$sensor['sensor_class']."/' onmouseover=\"return overlib('', LEFT,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\""; + $link = " href='device/device=".$device['device_id']."/tab=health/metric=".$sensor['sensor_class']."/' onmouseover=\"return overlib('', LEFT,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\""; } } else { unset ($link); }