From 3eb057c4a2b2fab2f3de74c1dce678ee695c4032 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 30 Dec 2009 21:02:05 +0000 Subject: [PATCH] updates from sid3windr git-svn-id: http://www.observium.org/svn/observer/trunk@572 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/hostbox.inc | 2 +- html/includes/print-menubar.php | 8 ++++---- html/pages/devices.php | 3 ++- html/pages/iftype.php | 6 +++++- html/pages/locations.php | 2 +- includes/discovery/temperatures.php | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/html/includes/hostbox.inc b/html/includes/hostbox.inc index b505c2973..b53da3cb9 100644 --- a/html/includes/hostbox.inc +++ b/html/includes/hostbox.inc @@ -1,6 +1,6 @@ = '5') { if($config['int_l2tp']) { echo("
  • L2TP
  • "); $ifbreak = 1; } if($config['int_transit']) { echo("
  • Transit
  • "); $ifbreak = 1; } if($config['int_peering']) { echo("
  • Peering
  • "); $ifbreak = 1; } - if($config['int_peering'] && $config['int_transit']) { echo("
  • Peer + Transit
  • "); $ifbreak = 1; } + if($config['int_peering'] && $config['int_transit']) { echo("
  • Peering + Transit
  • "); $ifbreak = 1; } if($config['int_core']) { echo("
  • Core
  • "); $ifbreak = 1;} } @@ -156,9 +156,9 @@ echo("
  • Temps
  • +
  • Temps
  • -
  • Storage
  • +
  • Storage
  • @@ -196,7 +196,7 @@ echo("

    • -
    • My Settings
    • +
    • My Settings
    • = '10') { echo("

    • diff --git a/html/pages/devices.php b/html/pages/devices.php index 761d7f036..2ac73ec94 100644 --- a/html/pages/devices.php +++ b/html/pages/devices.php @@ -112,7 +112,8 @@ if($_GET['status'] == "alerted") { $sql = "select * from devices " . $device_alert_sql . " GROUP BY `device_id` ORDER BY `ignore`, `status`, `os`, `hostname`"; } -echo(""); +echo('
      +'); $device_query = mysql_query($sql); while($device = mysql_fetch_array($device_query)) { diff --git a/html/pages/iftype.php b/html/pages/iftype.php index 1a527857a..9500fe868 100644 --- a/html/pages/iftype.php +++ b/html/pages/iftype.php @@ -19,8 +19,12 @@ echo("
      DeviceOperating SystemPlatformUptime
      "); } unset($seperator); + $types_array = explode(',',$_GET['opta']); + for ($i = 0; $i < count($types_array);$i++) $types_array[$i] = ucfirst($types_array[$i]); + $types = implode(' + ',$types_array); + echo(" - "); + "); echo("
      Total Graph for interfaces of type : ".$_GET['opta']."
      Total Graph for interfaces of type : ".$types."
      "); $graph_type = "multi_bits"; diff --git a/html/pages/locations.php b/html/pages/locations.php index 350597ebb..e6a10ed50 100644 --- a/html/pages/locations.php +++ b/html/pages/locations.php @@ -27,7 +27,7 @@ while($device = mysql_fetch_array($device_query)) { $hostalerts = mysql_result(mysql_query("SELECT COUNT(device_id) FROM devices AS D, devices_perms AS P WHERE location = '" . $device['location'] . "' AND status = '0'"),0); } - if($hostalerts) { $alert = ""; } + if($hostalerts) { $alert = ""; } else { $alert = ""; } $loc = $device[location]; diff --git a/includes/discovery/temperatures.php b/includes/discovery/temperatures.php index 93f6ad28d..8d017dad7 100755 --- a/includes/discovery/temperatures.php +++ b/includes/discovery/temperatures.php @@ -92,9 +92,9 @@ ## Supermicro Temperatures if($device['os'] == "linux") { - echo("Supermicro "); $oids = shell_exec($config['snmpwalk'] . " -m SUPERMICRO-HEALTH-MIB -$snmpver -CI -Osqn -c $community $hostname:$port 1.3.6.1.4.1.10876.2.1.1.1.1.3 | sed s/1.3.6.1.4.1.10876.2.1.1.1.1.3.//g"); $oids = trim($oids); + if ($oids) echo("Supermicro "); foreach(explode("\n", $oids) as $data) { $data = trim($data); if($data) {