From 9c6d73dae36ae989ced0be496a55c82b132de451 Mon Sep 17 00:00:00 2001 From: laf Date: Sun, 2 Mar 2014 20:10:15 +0000 Subject: [PATCH] Visually tidied up the devices pages --- html/includes/hostbox-basic.inc.php | 21 ++++++++++----------- html/includes/hostbox.inc.php | 27 +++++++++++++-------------- html/pages/devices.inc.php | 15 +++++++++------ 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/html/includes/hostbox-basic.inc.php b/html/includes/hostbox-basic.inc.php index 3a8d5a208..a27cc118f 100644 --- a/html/includes/hostbox-basic.inc.php +++ b/html/includes/hostbox-basic.inc.php @@ -4,21 +4,21 @@ if ($bg == $list_colour_b) { $bg = $list_colour_a; } else { $bg = $list_colour_b if ($device['status'] == '0') { - $class = "list-device-down"; + $class = "bg-danger"; } else { - $class = "list-device"; + $class = "bg-primary"; } if ($device['ignore'] == '1') { - $class = "list-device-ignored"; + $class = "bg-warning"; if ($device['status'] == '1') { - $class = "list-device-ignored-up"; + $class = "bg-success"; } } if ($device['disabled'] == '1') { - $class = "list-device-disabled"; + $class = "bg-info"; } $type = strtolower($device['os']); @@ -26,14 +26,13 @@ $type = strtolower($device['os']); if ($device['os'] == "ios") { formatCiscoHardware($device, true); } $device['os_text'] = $config['os'][$device['os']]['text']; -echo(' - - ' . $image . ' - ' . generate_device_link($device) . '' +echo(' + + ' . $image . ' + ' . generate_device_link($device) . '' ); -echo(''); +echo(''); if ($port_count) { echo(' '.$port_count); } echo('
'); if ($sensor_count) { echo(' '.$sensor_count); } diff --git a/html/includes/hostbox.inc.php b/html/includes/hostbox.inc.php index 52756a362..021412225 100644 --- a/html/includes/hostbox.inc.php +++ b/html/includes/hostbox.inc.php @@ -5,25 +5,25 @@ if ($bg == $list_colour_b) { $bg = $list_colour_a; } else { $bg = $list_colour_b if ($device['status'] == '0') { $class = "list-device-down"; - $table_tab_colour = "#cc0000"; + $table_tab_colour = "bg-danger"; } else { $class = "list-device"; - $table_tab_colour = "#0000cc"; + $table_tab_colour = "bg-primary"; } if ($device['ignore'] == '1') { $class = "list-device-ignored"; - $table_tab_colour = "#aaaaaa"; + $table_tab_colour = "bg-warning"; if ($device['status'] == '1') { $class = "list-device-ignored-up"; - $table_tab_colour = "#009900"; + $table_tab_colour = "bg-success"; } } if ($device['disabled'] == '1') { $class = "list-device-disabled"; - $table_tab_colour = "#aaaaaa"; + $table_tab_colour = "bg-info"; } $type = strtolower($device['os']); @@ -35,22 +35,21 @@ $device['os_text'] = $config['os'][$device['os']]['text']; $port_count = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `device_id` = ?", array($device['device_id'])); $sensor_count = dbFetchCell("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = ?", array($device['device_id'])); -echo(' - - ' . $image . ' - ' . generate_device_link($device) . ' +echo(' + + ' . $image . ' + ' . generate_device_link($device) . '
' . $device['sysName'] . '' ); -echo(''); +echo(''); if ($port_count) { echo(' '.$port_count); } echo('
'); if ($sensor_count) { echo(' '.$sensor_count); } echo(''); -echo(' ' . $device['hardware'] . '
' . $device['features'] . ''); -echo(' ' . $device['os_text'] . '
' . $device['version'] . ''); -echo(' ' . formatUptime($device['uptime'], 'short') . '
'); +echo(' ' . $device['hardware'] . '
' . $device['features'] . ''); +echo(' ' . $device['os_text'] . '
' . $device['version'] . ''); +echo(' ' . formatUptime($device['uptime'], 'short') . '
'); if (get_dev_attrib($device,'override_sysLocation_bool')) { $device['location'] = get_dev_attrib($device,'override_sysLocation_string'); } echo(' ' . truncate($device['location'],32, '') . ''); diff --git a/html/pages/devices.inc.php b/html/pages/devices.inc.php index 41f004604..f16e59c84 100644 --- a/html/pages/devices.inc.php +++ b/html/pages/devices.inc.php @@ -273,17 +273,19 @@ if($format == "graph") } else { - echo(''); + echo('
+
'); + if ($subformat == "detail" || $subformat == "basic") { - echo(' + echo(' - + - - - + + + '); } @@ -304,6 +306,7 @@ if($format == "graph") } } echo("
DeviceDevice PlatformOperating SystemUptime/LocationPlatformOperating SystemUptime/Location
"); + echo(''); } ?>