From 3c79cafb2ce5205451f483d655e4cbfbb78378dd Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 17 Mar 2011 16:35:18 +0000 Subject: [PATCH] can't stop uniformicationing git-svn-id: http://www.observium.org/svn/observer/trunk@1915 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/graphs/device/diskio_bits.inc.php | 2 +- html/includes/graphs/device/diskio_ops.inc.php | 2 +- .../graphs/port/adsl_attainable.inc.php | 2 +- .../graphs/port/adsl_attenuation.inc.php | 2 +- html/includes/graphs/port/adsl_power.inc.php | 2 +- html/includes/graphs/port/adsl_snr.inc.php | 2 +- html/includes/graphs/port/adsl_speed.inc.php | 2 +- html/includes/graphs/port/nupkts.inc.php | 2 +- html/includes/graphs/port/pagp_bits.inc.php | 2 +- html/includes/graphs/screenos_sessions.inc.php | 2 +- html/pages/device/events.inc.php | 2 +- html/pages/device/graphs.inc.php | 2 +- html/pages/device/graphs/hrprocesses.inc.php | 2 +- html/pages/device/graphs/uptime.inc.php | 10 +++++++--- html/pages/device/health.inc.php | 2 +- html/pages/device/overview.inc.php | 4 ++-- html/pages/device/srv.inc.php | 2 +- html/pages/device/syslog.inc.php | 2 +- html/pages/device/toner.inc.php | 2 +- html/pages/device/vrfs.inc.php | 2 +- html/pages/eventlog.inc.php | 2 +- html/pages/front/default.php | 4 ++-- html/pages/front/demo.php | 2 +- html/pages/front/example2.php | 2 +- html/pages/front/jt.php | 2 +- html/pages/services.inc.php | 2 +- html/pages/syslog.inc.php | 17 +++++++++++------ 27 files changed, 45 insertions(+), 36 deletions(-) diff --git a/html/includes/graphs/device/diskio_bits.inc.php b/html/includes/graphs/device/diskio_bits.inc.php index ce36284fd..4c6fce2b8 100755 --- a/html/includes/graphs/device/diskio_bits.inc.php +++ b/html/includes/graphs/device/diskio_bits.inc.php @@ -29,6 +29,6 @@ $nototal = 1; $rra_in = "read"; $rra_out = "written"; -include ("includes/graphs/generic_multi_bits_separated.inc.php"); +include("includes/graphs/generic_multi_bits_separated.inc.php"); ?> \ No newline at end of file diff --git a/html/includes/graphs/device/diskio_ops.inc.php b/html/includes/graphs/device/diskio_ops.inc.php index 82d2f1006..676a242f8 100755 --- a/html/includes/graphs/device/diskio_ops.inc.php +++ b/html/includes/graphs/device/diskio_ops.inc.php @@ -29,6 +29,6 @@ $colours_out = 'blues'; $nototal = 1; -include ("includes/graphs/generic_multi_seperated.inc.php"); +include("includes/graphs/generic_multi_seperated.inc.php"); ?> \ No newline at end of file diff --git a/html/includes/graphs/port/adsl_attainable.inc.php b/html/includes/graphs/port/adsl_attainable.inc.php index a8e6eb0db..54c43d019 100644 --- a/html/includes/graphs/port/adsl_attainable.inc.php +++ b/html/includes/graphs/port/adsl_attainable.inc.php @@ -22,7 +22,7 @@ $nototal = 1; if ($rrd_list) { - include ("includes/graphs/generic_multi_line.inc.php"); + include("includes/graphs/generic_multi_line.inc.php"); } ?> \ No newline at end of file diff --git a/html/includes/graphs/port/adsl_attenuation.inc.php b/html/includes/graphs/port/adsl_attenuation.inc.php index 9ded41958..5b2cabafc 100644 --- a/html/includes/graphs/port/adsl_attenuation.inc.php +++ b/html/includes/graphs/port/adsl_attenuation.inc.php @@ -22,7 +22,7 @@ $nototal = 1; if ($rrd_list) { - include ("includes/graphs/generic_multi_line.inc.php"); + include("includes/graphs/generic_multi_line.inc.php"); } ?> \ No newline at end of file diff --git a/html/includes/graphs/port/adsl_power.inc.php b/html/includes/graphs/port/adsl_power.inc.php index 8385c5930..689025e65 100644 --- a/html/includes/graphs/port/adsl_power.inc.php +++ b/html/includes/graphs/port/adsl_power.inc.php @@ -22,7 +22,7 @@ $nototal = 1; if ($rrd_list) { - include ("includes/graphs/generic_multi_line.inc.php"); + include("includes/graphs/generic_multi_line.inc.php"); } ?> \ No newline at end of file diff --git a/html/includes/graphs/port/adsl_snr.inc.php b/html/includes/graphs/port/adsl_snr.inc.php index c55497807..a8bf61db1 100644 --- a/html/includes/graphs/port/adsl_snr.inc.php +++ b/html/includes/graphs/port/adsl_snr.inc.php @@ -22,7 +22,7 @@ $nototal = 1; if ($rrd_list) { - include ("includes/graphs/generic_multi_line.inc.php"); + include("includes/graphs/generic_multi_line.inc.php"); } ?> \ No newline at end of file diff --git a/html/includes/graphs/port/adsl_speed.inc.php b/html/includes/graphs/port/adsl_speed.inc.php index 6f8f72889..81d951ced 100644 --- a/html/includes/graphs/port/adsl_speed.inc.php +++ b/html/includes/graphs/port/adsl_speed.inc.php @@ -23,7 +23,7 @@ $nototal = 1; if ($rrd_list) { - include ("includes/graphs/generic_multi_line.inc.php"); + include("includes/graphs/generic_multi_line.inc.php"); } ?> \ No newline at end of file diff --git a/html/includes/graphs/port/nupkts.inc.php b/html/includes/graphs/port/nupkts.inc.php index 389dbf8dd..71a8c8bda 100644 --- a/html/includes/graphs/port/nupkts.inc.php +++ b/html/includes/graphs/port/nupkts.inc.php @@ -36,7 +36,7 @@ if (1) $nototal = 1; - include ("includes/graphs/generic_multi_seperated.inc.php"); + include("includes/graphs/generic_multi_seperated.inc.php"); } elseif (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename($port['ifIndex'] . ".rrd"))) { diff --git a/html/includes/graphs/port/pagp_bits.inc.php b/html/includes/graphs/port/pagp_bits.inc.php index 1e45b1418..509917f4f 100644 --- a/html/includes/graphs/port/pagp_bits.inc.php +++ b/html/includes/graphs/port/pagp_bits.inc.php @@ -25,6 +25,6 @@ $nototal = 1; $rra_in = "INOCTETS"; $rra_out = "OUTOCTETS"; -include ("includes/graphs/generic_multi_bits_separated.inc.php"); +include("includes/graphs/generic_multi_bits_separated.inc.php"); ?> \ No newline at end of file diff --git a/html/includes/graphs/screenos_sessions.inc.php b/html/includes/graphs/screenos_sessions.inc.php index b79e285c6..d19c60017 100644 --- a/html/includes/graphs/screenos_sessions.inc.php +++ b/html/includes/graphs/screenos_sessions.inc.php @@ -25,6 +25,6 @@ $nototal = 1; $unit_text = "Sessions"; $scale_min = "0"; -include ("generic_multi_simplex_seperated.inc.php"); +include("generic_multi_simplex_seperated.inc.php"); ?> \ No newline at end of file diff --git a/html/pages/device/events.inc.php b/html/pages/device/events.inc.php index e40b10181..3e26133e4 100644 --- a/html/pages/device/events.inc.php +++ b/html/pages/device/events.inc.php @@ -6,7 +6,7 @@ echo(''); while ($entry = mysql_fetch_array($data)) { - include("includes/print-event.inc"); + include("includes/print-event.inc.php"); } echo('
'); diff --git a/html/pages/device/graphs.inc.php b/html/pages/device/graphs.inc.php index f4907cf19..0ef1895ee 100644 --- a/html/pages/device/graphs.inc.php +++ b/html/pages/device/graphs.inc.php @@ -52,7 +52,7 @@ foreach ($config['graph_types']['device'] as $graph => $entry) { $graph_title = $config['graph_types']['device'][$graph]['descr']; $graph_type = "device_" . $graph; - include ("includes/print-device-graph.php"); + include("includes/print-device-graph.php"); } } diff --git a/html/pages/device/graphs/hrprocesses.inc.php b/html/pages/device/graphs/hrprocesses.inc.php index 452d0dacb..e1a286e86 100644 --- a/html/pages/device/graphs/hrprocesses.inc.php +++ b/html/pages/device/graphs/hrprocesses.inc.php @@ -4,7 +4,7 @@ if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/hrSystem.rrd")) { $graph_title = "Running Processes"; $graph_type = "device_hrprocesses"; - include ("includes/print-device-graph.php"); + include("includes/print-device-graph.php"); } ?> \ No newline at end of file diff --git a/html/pages/device/graphs/uptime.inc.php b/html/pages/device/graphs/uptime.inc.php index cea537e21..c025b413c 100644 --- a/html/pages/device/graphs/uptime.inc.php +++ b/html/pages/device/graphs/uptime.inc.php @@ -1,4 +1,8 @@ + +$graph_title = "Device Uptime"; +$graph_type = "device_uptime"; + +include("includes/print-device-graph.php"); + +?> \ No newline at end of file diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index ed6dbe916..2273a8ebe 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -69,7 +69,7 @@ if (is_file("pages/device/health/".mres($_GET['opta']).".inc.php")) { $graph_title = $type_text[$type]; $graph_type = "device_".$type; - include ("includes/print-device-graph.php"); + include("includes/print-device-graph.php"); } } } diff --git a/html/pages/device/overview.inc.php b/html/pages/device/overview.inc.php index d3a5d44e7..3a37e85af 100644 --- a/html/pages/device/overview.inc.php +++ b/html/pages/device/overview.inc.php @@ -68,7 +68,7 @@ if (mysql_affected_rows() > "0") echo("
"); echo("

Recent Syslog

"); echo(""); - while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } + while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); } echo("
"); echo("
"); } @@ -101,7 +101,7 @@ echo(""); while ($entry = mysql_fetch_array($data)) { - include("includes/print-event-short.inc"); + include("includes/print-event-short.inc.php"); } echo("
"); diff --git a/html/pages/device/srv.inc.php b/html/pages/device/srv.inc.php index 3d9ec7d2b..8167a644a 100644 --- a/html/pages/device/srv.inc.php +++ b/html/pages/device/srv.inc.php @@ -7,7 +7,7 @@ if (mysql_result(mysql_query("select count(service_id) from services WHERE devic $service_query = mysql_query("select * from services WHERE device_id = '".$device['device_id']."' ORDER BY service_type"); while ($service = mysql_fetch_array($service_query)) { - include("includes/print-service.inc"); + include("includes/print-service.inc.php"); } echo(""); diff --git a/html/pages/device/syslog.inc.php b/html/pages/device/syslog.inc.php index 83ea15041..3d18033ea 100644 --- a/html/pages/device/syslog.inc.php +++ b/html/pages/device/syslog.inc.php @@ -43,7 +43,7 @@ $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog WHERE $sql .= " ORDER BY timestamp DESC LIMIT 1000"; $query = mysql_query($sql); echo(""); -while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } +while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); } echo("
"); ?> \ No newline at end of file diff --git a/html/pages/device/toner.inc.php b/html/pages/device/toner.inc.php index b8f83de26..904c12db9 100644 --- a/html/pages/device/toner.inc.php +++ b/html/pages/device/toner.inc.php @@ -2,7 +2,7 @@ $graph_title = "Toner"; $graph_type = "device_toner"; -include ("includes/print-device-graph.php"); +include("includes/print-device-graph.php"); ?> diff --git a/html/pages/device/vrfs.inc.php b/html/pages/device/vrfs.inc.php index ae7ffa0f3..46277c1a0 100644 --- a/html/pages/device/vrfs.inc.php +++ b/html/pages/device/vrfs.inc.php @@ -16,7 +16,7 @@ $i = "0"; $vrf_query = mysql_query("select * from vrfs WHERE device_id = '".$_GET['id']."' ORDER BY 'vrf_name'"); while ($vrf = mysql_fetch_array($vrf_query)) { - include("includes/print-vrf.inc"); + include("includes/print-vrf.inc.php"); $i++; } diff --git a/html/pages/eventlog.inc.php b/html/pages/eventlog.inc.php index 64047a98e..e6696df99 100644 --- a/html/pages/eventlog.inc.php +++ b/html/pages/eventlog.inc.php @@ -15,7 +15,7 @@ echo(''); while ($entry = mysql_fetch_array($data)) { - include("includes/print-event.inc"); + include("includes/print-event.inc.php"); } echo("
"); diff --git a/html/pages/front/default.php b/html/pages/front/default.php index b8a01fe8b..46cba2144 100644 --- a/html/pages/front/default.php +++ b/html/pages/front/default.php @@ -102,7 +102,7 @@ if ($config['enable_syslog']) echo(""); while ($entry = mysql_fetch_array($query)) { $entry = array_merge($entry, device_by_id_cache($entry['device_id'])); - include("includes/print-syslog.inc"); + include("includes/print-syslog.inc.php"); } echo("
"); @@ -128,7 +128,7 @@ $data = mysql_query($query); echo(""); while ($entry = mysql_fetch_array($data)) { - include("includes/print-event.inc"); + include("includes/print-event.inc.php"); } echo("
"); diff --git a/html/pages/front/demo.php b/html/pages/front/demo.php index ea09176db..8c5a90eed 100644 --- a/html/pages/front/demo.php +++ b/html/pages/front/demo.php @@ -99,7 +99,7 @@ echo(""); while ($entry = mysql_fetch_array($query)) { $entry = array_merge($entry, device_by_id_cache($entry['device_id'])); - include("includes/print-syslog.inc"); + include("includes/print-syslog.inc.php"); } echo("
"); diff --git a/html/pages/front/example2.php b/html/pages/front/example2.php index 669e5931d..3e2db41d3 100644 --- a/html/pages/front/example2.php +++ b/html/pages/front/example2.php @@ -96,7 +96,7 @@ echo(" $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog ORDER BY timestamp DESC LIMIT 20"; $query = mysql_query($sql); echo(""); -while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } +while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); } echo("
"); diff --git a/html/pages/front/jt.php b/html/pages/front/jt.php index 9157ddc0d..0d9372010 100644 --- a/html/pages/front/jt.php +++ b/html/pages/front/jt.php @@ -96,7 +96,7 @@ echo(" $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog,devices WHERE syslog.device_id = devices.device_id ORDER BY seq DESC LIMIT 20"; $query = mysql_query($sql); echo(""); -while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } +while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); } echo("
"); diff --git a/html/pages/services.inc.php b/html/pages/services.inc.php index 9f56b80c0..e81bca24f 100644 --- a/html/pages/services.inc.php +++ b/html/pages/services.inc.php @@ -26,7 +26,7 @@ if ($_SESSION['userlevel'] >= '5') $service_query = mysql_query("SELECT * FROM `services` WHERE `device_id` = '" . $host_data['device_id'] . "' $where"); while ($service = mysql_fetch_array($service_query)) { - include("includes/print-service.inc"); + include("includes/print-service.inc.php"); # $samehost = 1; if ($_GET['opta'] == "details") { diff --git a/html/pages/syslog.inc.php b/html/pages/syslog.inc.php index 7e3b23940..81fcca6fe 100644 --- a/html/pages/syslog.inc.php +++ b/html/pages/syslog.inc.php @@ -47,19 +47,23 @@ print_optionbar_end(); -if ($_POST['string']) { +if ($_POST['string']) +{ $where = " AND S.msg LIKE '%".$_POST['string']."%'"; } -if ($_POST['program']) { +if ($_POST['program']) +{ $where .= " AND S.program = '".$_POST['program']."'"; } -if ($_POST['device']) { +if ($_POST['device']) +{ $where .= " AND D.device_id = '".$_POST['device']."'"; } -if ($_SESSION['userlevel'] >= '5') { +if ($_SESSION['userlevel'] >= '5') +{ $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog WHERE 1 $where ORDER BY timestamp DESC LIMIT 1000"; } else { @@ -69,9 +73,10 @@ if ($_SESSION['userlevel'] >= '5') { $query = mysql_query($sql); echo(""); -while ($entry = mysql_fetch_array($query)) { +while ($entry = mysql_fetch_array($query)) +{ $entry = array_merge($entry, device_by_id_cache($entry['device_id'])); - include("includes/print-syslog.inc"); + include("includes/print-syslog.inc.php"); } echo("
");