From 93d3751b3f36dd0e5a469e167853b8482b933ef1 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Mon, 24 Mar 2008 01:21:11 +0000 Subject: [PATCH] better front page? who knows! git-svn-id: http://www.observium.org/svn/observer/trunk@200 61d68cd4-352d-0410-923a-c4978735b2b8 --- config.php.default | 32 ++++---------------------------- html/includes/edit-host.inc | 4 +--- html/pages/addsrv.php | 2 +- html/pages/default.php | 18 ++++++++++++++---- html/pages/device/dev-edit.inc | 14 +++----------- 5 files changed, 23 insertions(+), 47 deletions(-) diff --git a/config.php.default b/config.php.default index b0bd53b55..4205e1564 100755 --- a/config.php.default +++ b/config.php.default @@ -61,8 +61,8 @@ $config['favicon'] = "favicon.ico"; $config['page_refresh'] = "30"; ## Refresh the page every xx seconds -$config['email_default'] = "adama@memetic.org"; -$config['email_from'] = "Observer Dev "; +$config['email_default'] = "you@yourdomain"; +$config['email_from'] = "Observer "; $config['email_headers'] = "From: " . $config['email_from'] . "\r\n"; @@ -71,8 +71,8 @@ $config['email_headers'] = "From: " . $config['email_from'] . "\r\n"; $config['int_customers'] = 1; # Enable Customer Port Parsing $config['int_transit'] = 1; # Enable Transit Types $config['int_peering'] = 1; # Enable Peering Types -$config['int_core'] = 1; # Enable Core Port Types -$config['int_l2tp'] = 1; # Enable L2TP Port Types +$config['int_core'] = 1; # Enable Core Port Types +$config['int_l2tp'] = 1; # Enable L2TP Port Types $config['show_locations'] = 1; # Enable Locations on menu @@ -88,7 +88,6 @@ $config['syslog_filter'] = array("last message repeated", "Connection from UDP: $config['syslog_age'] = "1 month"; ## Time to keep syslog for in ## MySQL DATE_SUB format (eg '1 day', '1 month') - ### Interface name strings to ignore $config['bad_if'] = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0", "-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", @@ -99,29 +98,6 @@ $config['bad_if'] = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", $config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts", "/proc/bus/usb"); -### entPhysicalVendorType rewrites - -$entPhysicalVendorTypes = array ( - 'cevC7xxxIo1feTxIsl' => 'C7200-IO-FE-MII', - 'cevChassis7140Dualfe' => 'C7140-2FE', - 'cevChassis7204' => "C7204", - 'cevChassis7204Vxr' => 'C7204VXR', - 'cevChassis7206' => 'C7206', - 'cevChassis7206Vxr' => 'C7206VXR', - 'cevCpu7200Npe200' => 'NPE-200', - 'cevCpu7200Npe225' => 'NPE-225', - 'cevCpu7200Npe300' => 'NPE-300', - 'cevCpu7200Npe400' => 'NPE-400', - 'cevCpu7200Npeg1' => 'NPE-G1', - 'cevCpu7200Npeg2' => 'NPE-G2', - 'cevPa1feTxIsl' => 'PA-FE-TX-ISL', - 'cevPa2feTxI82543' => 'PA-2FE-TX', - 'cevPa8e' => 'PA-8E', - 'cevPaA8tX21' => 'PA-8T-X21', - 'cevMGBIC1000BaseLX' => '1000BaseLX GBIC', - 'cevPort10GigBaseLR' => '10GigBaseLR'); - - ### Style Options $list_colour_a = "#ffffff"; diff --git a/html/includes/edit-host.inc b/html/includes/edit-host.inc index fd93bf4f2..3ce38ece3 100644 --- a/html/includes/edit-host.inc +++ b/html/includes/edit-host.inc @@ -1,13 +1,11 @@ $file"; diff --git a/html/pages/default.php b/html/pages/default.php index 9fa7e3ec5..ec6b05eef 100644 --- a/html/pages/default.php +++ b/html/pages/default.php @@ -101,8 +101,17 @@ foreach($nodes as $node) { $mouseover = "onmouseover=\"return overlib('');\" onmouseout=\"return nd();\""; - if(hoststatus($node)) { $statimg = "Host Up"; $box_bg = "#ffffaa"; } - else { $statimg = "Host Down"; $box_bg = "#ffaaaa"; } + if(hoststatus($node)) { + $statimg = "Host Up"; + $background_image = "images/boxbgorange.png"; + $background_color = "#ddffdd"; + } else { + $statimg = "Host Down"; + $background_image = "images/boxbgpink.png"; + $background_color = "#ffdddd"; + } + + if($ints || $services) { $background_color = "#ffddaa"; } if($rebooted) { $statimg = "Host Rebooted"; } @@ -115,9 +124,10 @@ foreach($nodes as $node) { $shorthost = $first; if(strlen($first.".".$second) < 16) { $shorthost = $first.".".$second; } + $device['device_id'] = $node; - $errorboxes .= "
-
".$shorthost."
"; + $errorboxes .= "
+
".generatedevicelink($device, $shorthost)."
"; if(hoststatus($node)) {$errorboxes .= " ".formatuptime($uptime, short)."
"; } else { $errorboxes .= " Unreachable
"; } diff --git a/html/pages/device/dev-edit.inc b/html/pages/device/dev-edit.inc index 7e73c1379..e0ffe054c 100644 --- a/html/pages/device/dev-edit.inc +++ b/html/pages/device/dev-edit.inc @@ -57,19 +57,11 @@ if($device['disabled']) { echo("checked=checked"); } echo("/>
Ignore
- - -
Apache
- - +echo("