From 461c0523c84cbbee95b1c71da692df25e6c784c5 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sat, 9 Apr 2011 13:20:48 +0000 Subject: [PATCH] device/health page improvements and sentry3 and tripplite fixes from falz git-svn-id: http://www.observium.org/svn/observer/trunk@2041 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/health.inc.php | 36 +++++++++---------- .../{fanspeeds.inc.php => fanspeed.inc.php} | 0 ...{frequencies.inc.php => frequency.inc.php} | 0 .../{mempools.inc.php => mempool.inc.php} | 0 .../{processors.inc.php => processor.inc.php} | 0 ...mperatures.inc.php => temperature.inc.php} | 0 .../{voltages.inc.php => voltage.inc.php} | 0 includes/discovery/voltages/sentry3.inc.php | 30 ---------------- includes/static-config.php | 2 +- 9 files changed, 19 insertions(+), 49 deletions(-) rename html/pages/device/health/{fanspeeds.inc.php => fanspeed.inc.php} (100%) rename html/pages/device/health/{frequencies.inc.php => frequency.inc.php} (100%) rename html/pages/device/health/{mempools.inc.php => mempool.inc.php} (100%) rename html/pages/device/health/{processors.inc.php => processor.inc.php} (100%) rename html/pages/device/health/{temperatures.inc.php => temperature.inc.php} (100%) rename html/pages/device/health/{voltages.inc.php => voltage.inc.php} (100%) diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index 2273a8ebe..add6bb26d 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -13,27 +13,27 @@ $current = mysql_result(mysql_query("select count(*) from sensors WHERE sensor_c $freqs = mysql_result(mysql_query("select count(*) from sensors WHERE sensor_class='freq' AND device_id = '" . $device['device_id'] . "'"), 0); $datas[] = 'overview'; -if ($processor) { $datas[] = 'processors'; } -if ($mempools) { $datas[] = 'mempools'; } +if ($processor) { $datas[] = 'processor'; } +if ($mempools) { $datas[] = 'mempool'; } if ($storage) { $datas[] = 'storage'; } if ($diskio) { $datas[] = 'diskio'; } -if ($temperatures) { $datas[] = 'temperatures'; } +if ($temperatures) { $datas[] = 'temperature'; } if ($humidity) { $datas[] = 'humidity'; } -if ($fans) { $datas[] = 'fanspeeds'; } -if ($volts) { $datas[] = 'voltages'; } -if ($freqs) { $datas[] = 'frequencies'; } +if ($fans) { $datas[] = 'fanspeed'; } +if ($volts) { $datas[] = 'voltage'; } +if ($freqs) { $datas[] = 'frequency'; } if ($current) { $datas[] = 'current'; } $type_text['overview'] = "Overview"; -$type_text['temperatures'] = "Temperatures"; +$type_text['temperature'] = "Temperature"; $type_text['humidity'] = "Humidity"; -$type_text['mempools'] = "Memory Pools"; +$type_text['mempool'] = "Memory"; $type_text['storage'] = "Disk Usage"; $type_text['diskio'] = "Disk I/O"; -$type_text['processors'] = "Processor Usage"; -$type_text['voltages'] = "Voltages"; -$type_text['fanspeeds'] = "Fan Speeds"; -$type_text['frequencies'] = "Frequencies"; +$type_text['processor'] = "Processor"; +$type_text['voltage'] = "Voltages"; +$type_text['fanspeed'] = "Fanspeed"; +$type_text['frequency'] = "Frequency"; $type_text['current'] = "Current"; print_optionbar_start(); @@ -47,13 +47,13 @@ foreach ($datas as $type) if ($_GET['opta'] == $type) { - echo(""); - echo(''); + echo(''); +# echo(''); } else { - echo(''); +# echo(''); } - echo(" " . $type_text[$type] ."\n"); - if ($_GET['opta'] == $type) { echo(""); } + echo(" " . $type_text[$type] .""); + if ($_GET['opta'] == $type) { echo(""); } $sep = " | "; } @@ -74,4 +74,4 @@ if (is_file("pages/device/health/".mres($_GET['opta']).".inc.php")) } } -?> \ No newline at end of file +?> diff --git a/html/pages/device/health/fanspeeds.inc.php b/html/pages/device/health/fanspeed.inc.php similarity index 100% rename from html/pages/device/health/fanspeeds.inc.php rename to html/pages/device/health/fanspeed.inc.php diff --git a/html/pages/device/health/frequencies.inc.php b/html/pages/device/health/frequency.inc.php similarity index 100% rename from html/pages/device/health/frequencies.inc.php rename to html/pages/device/health/frequency.inc.php diff --git a/html/pages/device/health/mempools.inc.php b/html/pages/device/health/mempool.inc.php similarity index 100% rename from html/pages/device/health/mempools.inc.php rename to html/pages/device/health/mempool.inc.php diff --git a/html/pages/device/health/processors.inc.php b/html/pages/device/health/processor.inc.php similarity index 100% rename from html/pages/device/health/processors.inc.php rename to html/pages/device/health/processor.inc.php diff --git a/html/pages/device/health/temperatures.inc.php b/html/pages/device/health/temperature.inc.php similarity index 100% rename from html/pages/device/health/temperatures.inc.php rename to html/pages/device/health/temperature.inc.php diff --git a/html/pages/device/health/voltages.inc.php b/html/pages/device/health/voltage.inc.php similarity index 100% rename from html/pages/device/health/voltages.inc.php rename to html/pages/device/health/voltage.inc.php diff --git a/includes/discovery/voltages/sentry3.inc.php b/includes/discovery/voltages/sentry3.inc.php index a031cdb26..75fa2aa45 100644 --- a/includes/discovery/voltages/sentry3.inc.php +++ b/includes/discovery/voltages/sentry3.inc.php @@ -28,33 +28,3 @@ if ($device['os'] == "sentry3") } ?> - diff --git a/includes/static-config.php b/includes/static-config.php index 302f9f98d..f48f465d0 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -688,7 +688,7 @@ $config['os'][$os]['text'] = "Tripp Lite PowerAlert"; $config['os'][$os]['type'] = "power"; $config['os'][$os]['over'][0]['graph'] = "device_current"; $config['os'][$os]['over'][0]['text'] = "Current"; -$config['os'][$os]['icon'] = "poweralert"; +$config['os'][$os]['icon'] = "tripplite"; $device_types = array('server', 'network', 'firewall', 'workstation', 'printer', 'power', 'environment');