From 389ea564d5bcae22de836867862a87e88fe9bc55 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 3 Jun 2010 10:53:10 +0000 Subject: [PATCH] power frequencies in web interface, still needs an icon in the main menu git-svn-id: http://www.observium.org/svn/observer/trunk@1096 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/graphs/device_voltages.inc.php | 2 +- html/includes/print-menubar.php | 1 + html/pages/device/health.inc.php | 3 +++ html/pages/health.php | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/html/includes/graphs/device_voltages.inc.php b/html/includes/graphs/device_voltages.inc.php index b775b94f0..0f15f8110 100644 --- a/html/includes/graphs/device_voltages.inc.php +++ b/html/includes/graphs/device_voltages.inc.php @@ -39,7 +39,7 @@ while($voltage = mysql_fetch_array($sql)) $hostname = gethostbyid($voltage['device_id']); - $descr = substr(str_pad($voltage['volt_descr'], 17),0,17); + $descr = substr(str_pad($voltage['volt_descr'], 15),0,15); $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("volt-" . $voltage['volt_descr'] . ".rrd"); $volt_id = $voltage['volt_id']; diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index c959c2873..f4d08a252 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -183,6 +183,7 @@ echo('
  • Temperatures
  • Fans
  • Voltages
  • +
  • Frequencies
  • diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index 0a7cf1bff..f52531251 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -6,6 +6,7 @@ $memory = mysql_result(mysql_query("select count(*) from mempools WHERE device_i $processor = mysql_result(mysql_query("select count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"), 0); $fans = mysql_result(mysql_query("select count(*) from fanspeed WHERE device_id = '" . $device['device_id'] . "'"), 0); $volts = mysql_result(mysql_query("select count(*) from voltage WHERE device_id = '" . $device['device_id'] . "'"), 0); +$freqs = mysql_result(mysql_query("select count(*) from frequency WHERE device_id = '" . $device['device_id'] . "'"), 0); if ($processor) { $datas[] = 'processors'; } if ($memory) { $datas[] = 'memory'; } @@ -13,6 +14,7 @@ if ($storage) { $datas[] = 'storage'; } if ($temperatures) { $datas[] = 'temperatures'; } if ($fans) { $datas[] = 'fanspeeds'; } if ($volts) { $datas[] = 'voltages'; } +if ($freqs) { $datas[] = 'frequencies'; } $type_text['temperatures'] = "Temperatures"; $type_text['memory'] = "Memory Pools"; @@ -20,6 +22,7 @@ $type_text['storage'] = "Disk Usage"; $type_text['processors'] = "Processor Usage"; $type_text['voltages'] = "Voltages"; $type_text['fanspeeds'] = "Fan Speeds"; +$type_text['frequencies'] = "Frequencies"; print_optionbar_start(); diff --git a/html/pages/health.php b/html/pages/health.php index 8e0f818ad..0c9fd22ed 100644 --- a/html/pages/health.php +++ b/html/pages/health.php @@ -1,6 +1,6 @@