From 748bd338e52ea7cd9c510d74897a6ba98ef3feae Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sat, 12 Jun 2010 16:48:53 +0000 Subject: [PATCH] make displaying of per-device health page options menu closer to global. add overview icons (bulb) git-svn-id: http://www.observium.org/svn/observer/trunk@1154 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/images/icons/greyscale/overview.png | Bin 0 -> 694 bytes html/images/icons/overview.png | Bin 0 -> 782 bytes html/includes/graphs/storage.inc.php | 1 + html/includes/print-menubar.php | 3 +-- html/pages/device/health.inc.php | 30 ++++++++++++++++------- 5 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 html/images/icons/greyscale/overview.png create mode 100644 html/images/icons/overview.png diff --git a/html/images/icons/greyscale/overview.png b/html/images/icons/greyscale/overview.png new file mode 100644 index 0000000000000000000000000000000000000000..88e67645bd5c4c87740511ac2007b2bd188485da GIT binary patch literal 694 zcmV;n0!jUeP)pF8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE;UJt{NMlp0y9ZOK~y+Tm6FMd+CdP9=a5?-AmjmZ3*?dq@E~3?g6ELDKn`97 zPXQ5))xFA8n4YyGd-1il&bT!OB%#Z}rP;@n2^>x*+`sU`@ z>U27v8jXgxR;xV}i^W|&pWmlasYyH@|4H_*&*PbMyWM`>YPEj!dOaAA$FN*3VY}VJ zZnuN^d=3N*kw^r*UT>4Y-aY}5%a`?fJu@5*X#(1My@u6l1&hUk8o~~T0~87cuv)E? zSS2&(A*=%U3_!9c40iF>&oldEtK15*JoY<#K?f5;4JOGy)kTHKGsQ z<#IWYk#?_CBBQ&681* zHr^5P2qE|P_e=$tT&-5YZnr}=o5kc4nZUF9Ji;BvY3s{s~^0XYhLR!1P*SpVQi>)dUV<_*6qInHGcnEb zQfX6|c{lO4l#RKaZC-XZ&u-_k%Q@eEE?Qa!_Tt0u@H@}<^E~``A^=3}gr(l4vU*i7 zyV6Lx=4yE7RGGkx6gV71cjvY=iqb#p!ylZn>j-Cf+b>x95wMRT==lzjH$f681f9ze zR{P)>$i_z3RfAovII&B>n%*Ds>XegyS_9EX5sW0f1d*FX&^tjGBX?Rzej4t{=ddW_ z9h>UH!(o9}TURNVdq{y5qM#$E1yaxnNWKtKkRh^p1YA9U=z#4*HY{(h_k{(nnF>pQ znJ2Y6(rFb^z)nJ2pnqIQ&_2v{yl+xxUhm5uO{Q#!J8DY)klFd
    -
  • Status +
  • Overview
      -
    • Overview
    • Network Map'); } ?> diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index c22e503882..c6443c00df 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -9,6 +9,7 @@ $volts = mysql_result(mysql_query("select count(*) from voltage WHERE device_id $freqs = mysql_result(mysql_query("select count(*) from frequency WHERE device_id = '" . $device['device_id'] . "'"), 0); $current = mysql_result(mysql_query("select count(*) from current WHERE device_id = '" . $device['device_id'] . "'"), 0); +$datas[] = 'overview'; if ($processor) { $datas[] = 'processors'; } if ($memory) { $datas[] = 'memory'; } if ($storage) { $datas[] = 'storage'; } @@ -18,6 +19,8 @@ if ($volts) { $datas[] = 'voltages'; } if ($freqs) { $datas[] = 'frequencies'; } if ($current) { $datas[] = 'current'; } + +$type_text['overview'] = "Overview"; $type_text['temperatures'] = "Temperatures"; $type_text['memory'] = "Memory Pools"; $type_text['storage'] = "Disk Usage"; @@ -29,15 +32,22 @@ $type_text['current'] = "Current"; print_optionbar_start(); -if(!$_GET['opta']) { echo(""); } -echo("Main\n"); -if(!$_GET['opta']) { echo(""); } - +if(!$_GET['opta']) { $_GET['opta'] = "overview"; } +unset($sep); foreach ($datas as $type) { - if ($_GET['opta'] == $type) { echo(""); } - echo(" | " . $type_text[$type] ."\n"); + + echo($sep); + + if ($_GET['opta'] == $type) { + echo(""); + echo(''); + } else { + echo(''); + } + echo(" " . $type_text[$type] ."\n"); if ($_GET['opta'] == $type) { echo(""); } + $sep = " | "; } print_optionbar_end(); @@ -47,9 +57,11 @@ if (is_file("pages/device/health/".mres($_GET['opta']).".inc.php")) include("pages/device/health/".mres($_GET['opta']).".inc.php"); } else { foreach ($datas as $type) { - $graph_title = $type_text[$type]; - $graph_type = "device_".$type; - include ("includes/print-device-graph.php"); + if($type != "overview") { + $graph_title = $type_text[$type]; + $graph_type = "device_".$type; + include ("includes/print-device-graph.php"); + } } }