diff --git a/html/includes/dev-overview-data.inc.php b/html/includes/dev-overview-data.inc.php index 2a87743514..3d5882594f 100644 --- a/html/includes/dev-overview-data.inc.php +++ b/html/includes/dev-overview-data.inc.php @@ -1,40 +1,42 @@ "); +echo('
'); +echo("
+
+
+
"); if ($config['overview_show_sysDescr']) { - echo("

"); - echo('

' . $device['sysDescr'] . "
"); - echo("

"); + echo('' . $device['sysDescr'] . ""); } +echo('
+ '); + $uptime = $device['uptime']; if ($device['os'] == "ios") { formatCiscoHardware($device); } if ($device['features']) { $device['features'] = "(".$device['features'].")"; } $device['os_text'] = $config['os'][$device['os']]['text']; -echo("
"); -echo('
'); - if ($device['hardware']) { echo(' - + '); } echo(' - + '); if ($device['serial']) { echo(' - + '); } @@ -42,14 +44,14 @@ if ($device['serial']) if ($device['sysContact']) { echo(' - '); + '); if (get_dev_attrib($device,'override_sysContact_bool')) { echo(' - '); + '); } echo(' @@ -59,13 +61,13 @@ if ($device['sysContact']) if ($device['location']) { echo(' - + '); if (get_dev_attrib($device,'override_sysLocation_bool') && !empty($device['real_location'])) { echo(' - + '); } @@ -74,12 +76,14 @@ if ($device['location']) if ($uptime) { echo(' - + '); } - echo("
HardwareHardware ' . $device['hardware']. '
Operating SystemOperating System ' . $device['os_text'] . ' ' . $device['version'] . ' ' . $device['features'] . '
SerialSerial ' . $device['serial']. '
ContactContact' . htmlspecialchars(get_dev_attrib($device,'override_sysContact_string')) . '
SNMP ContactSNMP Contact' . htmlspecialchars($device['sysContact']). '
LocationLocation ' . $device['location']. '
SNMP LocationSNMP Location ' . $device['real_location']. '
UptimeUptime ' . formatUptime($uptime) . '
"); - echo("
"); - +echo(' +
+
+
+ '); ?> diff --git a/html/includes/device-header.inc.php b/html/includes/device-header.inc.php index c2dac7c7d6..fc885958b0 100644 --- a/html/includes/device-header.inc.php +++ b/html/includes/device-header.inc.php @@ -58,7 +58,7 @@ foreach ($graphs as $entry) { $graph_array['type'] = $entry['graph']; - echo("
"); + echo("
"); print_graph_popup($graph_array); echo("
".$entry['text']."
"); echo("
"); diff --git a/html/includes/print-event-short.inc.php b/html/includes/print-event-short.inc.php index 08c2011efe..f28befee7f 100644 --- a/html/includes/print-event-short.inc.php +++ b/html/includes/print-event-short.inc.php @@ -7,12 +7,12 @@ unset($icon); $icon = geteventicon($entry['message']); if ($icon) { $icon = ""; } -echo(" - - +echo(" + + ".$entry['humandate']." - "); + "); if ($entry['type'] == "interface") { $entry['link'] = "".generate_port_link(getifbyid($entry['reference'])).""; @@ -23,4 +23,4 @@ echo(" "); -?> \ No newline at end of file +?> diff --git a/html/includes/print-syslog.inc.php b/html/includes/print-syslog.inc.php index 92fb253f50..09467dd7c4 100644 --- a/html/includes/print-syslog.inc.php +++ b/html/includes/print-syslog.inc.php @@ -2,18 +2,18 @@ if (device_permitted($entry['device_id'])) { - echo(""); + echo(""); // Stop shortening hostname. Issue #61 //$entry['hostname'] = shorthost($entry['hostname'], 20); if ($vars['page'] != "device") { - echo("" . $entry['date'] . ""); - echo("".generate_device_link($entry).""); - echo("" . $entry['program'] . " : " . htmlspecialchars($entry['msg']) . ""); + echo("" . $entry['date'] . ""); + echo("".generate_device_link($entry).""); + echo("" . $entry['program'] . " : " . htmlspecialchars($entry['msg']) . ""); } else { - echo("" . $entry['date'] . "   " . $entry['program'] . "   " . htmlspecialchars($entry['msg']) . ""); + echo("" . $entry['date'] . "   " . $entry['program'] . "   " . htmlspecialchars($entry['msg']) . ""); } echo(""); diff --git a/html/pages/device.inc.php b/html/pages/device.inc.php index c2dd8df929..b1a825f021 100644 --- a/html/pages/device.inc.php +++ b/html/pages/device.inc.php @@ -18,7 +18,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) $tab = "overview"; } - $select[$tab] = "selected"; + $select[$tab] = "active"; $device = device_by_id_cache($vars['device']); $attribs = get_dev_attribs($device['device_id']); @@ -37,11 +37,10 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) echo(''); - echo('
'); if (device_permitted($device['device_id'])) { - echo('
    '); + echo('
"); +echo("
"); +echo(""); +echo(""); ?> diff --git a/html/pages/device/overview/eventlog.inc.php b/html/pages/device/overview/eventlog.inc.php new file mode 100644 index 0000000000..1fb306c679 --- /dev/null +++ b/html/pages/device/overview/eventlog.inc.php @@ -0,0 +1,25 @@ +'); + echo('
+
+
+
'); +echo(''); +echo(" Recent Events"); +echo('
+ '); + +$eventlog = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '%d/%b/%y %T') as humandate FROM `eventlog` WHERE `host` = ? ORDER BY `datetime` DESC LIMIT 0,10", array($device['device_id'])); +foreach ($eventlog as $entry) +{ + include("includes/print-event-short.inc.php"); +} + +echo("
"); +echo('
'); +echo('
'); +echo('
'); +echo(''); + +?> diff --git a/html/pages/device/overview/generic/sensor.inc.php b/html/pages/device/overview/generic/sensor.inc.php index 7c5cbf15aa..a94c9065ab 100644 --- a/html/pages/device/overview/generic/sensor.inc.php +++ b/html/pages/device/overview/generic/sensor.inc.php @@ -4,9 +4,13 @@ $sensors = dbFetchRows("SELECT * FROM `sensors` WHERE `sensor_class` = ? AND dev if (count($sensors)) { - echo('
'); - echo('

' . $sensor_type . '

'); - echo(''); + echo('
+
+
+
'); + echo(' ' . $sensor_type . '<'); + echo('
+
'); foreach ($sensors as $sensor) { if ($config['memcached']['enable']) @@ -53,15 +57,18 @@ if (count($sensors)) $sensor['sensor_descr'] = truncate($sensor['sensor_descr'], 48, ''); - echo(" - - - + echo(" + + + "); } echo("
".overlib_link($link, $sensor['sensor_descr'], $overlib_content)."".overlib_link($link, $sensor_minigraph, $overlib_content)."".overlib_link($link, " $sensor['sensor_limit'] ? "style='color: red'" : '') . '>' . $sensor['sensor_current'] . $sensor_unit . "", $overlib_content)."
".overlib_link($link, $sensor['sensor_descr'], $overlib_content)."".overlib_link($link, $sensor_minigraph, $overlib_content)."".overlib_link($link, " $sensor['sensor_limit'] ? "style='color: red'" : '') . '>' . $sensor['sensor_current'] . $sensor_unit . "", $overlib_content)."
"); echo("
"); + echo(""); + echo(""); + echo(""); } ?> diff --git a/html/pages/device/overview/mempools.inc.php b/html/pages/device/overview/mempools.inc.php index 546c045ca2..f11b6beaa2 100644 --- a/html/pages/device/overview/mempools.inc.php +++ b/html/pages/device/overview/mempools.inc.php @@ -6,11 +6,18 @@ $mempools = dbFetchRows("SELECT * FROM `mempools` WHERE device_id = ?", array($d if (count($mempools)) { - echo("
"); - echo("

"); - echo(''); - echo(" Memory Pools

"); - echo(""); + echo('
+
+
+
+
+'); + echo(''); + echo(" Memory Pools"); + echo(' +
+
+'); foreach ($mempools as $mempool) { @@ -50,16 +57,20 @@ if (count($mempools)) $minigraph = generate_graph_tag($graph_array); - echo(" - - - + + + "); } - echo("
".overlib_link($link, $text_descr, $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)." + echo("
".overlib_link($link, $text_descr, $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
"); - echo("
"); + echo(' + + + + '); + } ?> diff --git a/html/pages/device/overview/ports.inc.php b/html/pages/device/overview/ports.inc.php index 2efc943411..807f8ee4fb 100644 --- a/html/pages/device/overview/ports.inc.php +++ b/html/pages/device/overview/ports.inc.php @@ -2,7 +2,14 @@ if ($ports['total']) { - echo('
'); + echo('
'); + echo('
+
+
+
+ Overall Traffic +
+ '); $graph_array['height'] = "100"; $graph_array['width'] = "485"; @@ -21,20 +28,22 @@ if ($ports['total']) $graph_array['width'] = "210"; $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - Device Traffic"); + echo(' + + '); - echo('
'); + echo(' + + + + + + '); - echo('
'); echo(overlib_link($link, $graph, $overlib_content, NULL)); + echo('
' . $ports['total'] . ' ' . $ports['up'] . ' ' . $ports['down'] . ' ' . $ports['disabled'] . '
- - - - - - -
' . $ports['total'] . ' ' . $ports['up'] . ' ' . $ports['down'] . ' ' . $ports['disabled'] . '
'); - - echo('
'); + echo(' + '); $ifsep = ""; @@ -47,7 +56,12 @@ if ($ports['total']) } unset($ifsep); - echo("
"); + echo(" "); + echo(""); + echo(""); + echo("
"); + echo("
"); + echo("
"); echo("
"); } diff --git a/html/pages/device/overview/processors.inc.php b/html/pages/device/overview/processors.inc.php index 25aa4e1ccc..3394e263ca 100644 --- a/html/pages/device/overview/processors.inc.php +++ b/html/pages/device/overview/processors.inc.php @@ -6,11 +6,16 @@ $processors = dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", arra if (count($processors)) { - echo("
"); - echo("

"); - echo(''); - echo(" Processors

"); - echo(""); + echo('
+
+
+
+
+'); + echo(''); + echo(" Processors"); + echo('
+
'); foreach ($processors as $proc) { @@ -42,16 +47,20 @@ if (count($processors)) $minigraph = generate_graph_tag($graph_array); - echo(" - - - + + + "); } - echo("
".overlib_link($link, $text_descr, $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)." + echo("
".overlib_link($link, $text_descr, $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
"); - echo("
"); + echo(' +
+ + + '); + } ?> diff --git a/html/pages/device/overview/services.inc.php b/html/pages/device/overview/services.inc.php new file mode 100644 index 0000000000..dc10a42162 --- /dev/null +++ b/html/pages/device/overview/services.inc.php @@ -0,0 +1,40 @@ +'); + echo('
+
+
+
'); + echo(" Services"); + echo('
+ '); + + echo(" + + + + + + + +
$services[total] $services[up] $services[down] $services[disabled]
"); + + foreach (dbFetchRows("SELECT * FROM services WHERE device_id = ? ORDER BY service_type", array($device['device_id'])) as $data) + { + if ($data['service_status'] == "0" && $data['service_ignore'] == "1") { $status = "grey"; } + if ($data['service_status'] == "1" && $data['service_ignore'] == "1") { $status = "green"; } + if ($data['service_status'] == "0" && $data['service_ignore'] == "0") { $status = "red"; } + if ($data['service_status'] == "1" && $data['service_ignore'] == "0") { $status = "blue"; } + echo("$break" . strtolower($data['service_type']) . ""); + $break = ", "; + } + echo('
'); + echo("
"); + echo("
"); + echo("
"); + echo(""); +} + +?> diff --git a/html/pages/device/overview/storage.inc.php b/html/pages/device/overview/storage.inc.php index 50ed7a9035..01c02edb4e 100644 --- a/html/pages/device/overview/storage.inc.php +++ b/html/pages/device/overview/storage.inc.php @@ -6,11 +6,15 @@ $drives = dbFetchRows("SELECT * FROM `storage` WHERE device_id = ? ORDER BY `sto if (count($drives)) { - echo("
"); - echo("

"); - echo(''); - echo(" Storage

"); - echo(""); + echo('
+
+
+
+
'); + echo(''); + echo(" Storage"); + echo('
+
'); foreach ($drives as $drive) { @@ -66,16 +70,20 @@ if (count($drives)) $minigraph = generate_graph_tag($graph_array); - echo(" - - - + + + "); } - echo("
".overlib_link($link, $drive['storage_descr'], $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)." + echo("
".overlib_link($link, $drive['storage_descr'], $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
"); - echo("
"); + echo(' + + + + '); + } unset ($drive_rows); diff --git a/html/pages/device/overview/syslog.inc.php b/html/pages/device/overview/syslog.inc.php new file mode 100644 index 0000000000..b473078a55 --- /dev/null +++ b/html/pages/device/overview/syslog.inc.php @@ -0,0 +1,25 @@ +'); + echo('
+
+
+
'); + echo(' Recent Syslog'); +echo('
+ '); + foreach ($syslog as $entry) { include("includes/print-syslog.inc.php"); } + echo("
"); + echo("
"); + echo("
"); + echo("
"); + echo(""); + } +} + +?> diff --git a/html/pages/device/overview/toner.inc.php b/html/pages/device/overview/toner.inc.php index 5223db9088..347a636195 100644 --- a/html/pages/device/overview/toner.inc.php +++ b/html/pages/device/overview/toner.inc.php @@ -6,11 +6,14 @@ $toners = dbFetchRows("SELECT * FROM `toner` WHERE device_id = ?", array($device if (count($toners)) { - echo("
"); - echo("

"); - echo(''); - echo(" Toner

"); - echo(""); + echo('
+
+
+
'); + echo(''); + echo(" Toner"); + echo('
+
'); foreach ($toners as $toner) { @@ -41,16 +44,19 @@ if (count($toners)) $minigraph = generate_graph_tag($graph_array); - echo(" - - - + + + "); } echo("
".overlib_link($link, $toner['toner_descr'], $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)." + echo("
".overlib_link($link, $toner['toner_descr'], $overlib_content)."".overlib_link($link, $minigraph, $overlib_content)."".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
"); echo("
"); + echo(""); + echo(""); + echo(""); } unset ($toner_rows);