From 726df0ca5fdd83b3b4a5afdc782975361d41a94b Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 16 Feb 2012 16:43:11 +0000 Subject: [PATCH] fixes to BGP global page git-svn-id: http://www.observium.org/svn/observer/trunk@2871 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/functions.inc.php | 6 +++--- html/includes/print-menubar.php | 2 +- html/pages/routing/bgp.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index 4a9921cd91..538ca56e5c 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -59,7 +59,7 @@ function generate_device_url($device, $vars=array()) return generate_url(array('page' => 'device', 'device' => $device['device_id']), $vars); } -function generate_device_link($device, $text=0, $vars=array(), $start=0, $end=0) +function generate_device_link($device, $text=NULL, $vars=array(), $start=0, $end=0) { global $config; @@ -92,10 +92,10 @@ function generate_device_link($device, $text=0, $vars=array(), $start=0, $end=0) if ($device['os']) { $contents .= mres($config['os'][$device['os']]['text']); } if ($device['version']) { $contents .= " ".mres($device['version']); } if ($device['features']) { $contents .= " (".mres($device['features']).")"; } -# if ($device['hardware']) { $contents .= " - ".$device['hardware']; } + if ($device['hardware']) { $contents .= " - ".$device['hardware']; } + if (isset($device['location'])) { $contents .= "
" . htmlentities($device['location']); } $contents .= ""; -# if (isset($device['location'])) { $contents .= "" . htmlentities($device['location'])."
"; } foreach ($graphs as $entry) { $graph = $entry['graph']; diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index db918ef7e9..72476970b2 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -442,7 +442,7 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf { ## FIXME link below broken! echo('

  • -
  • Alerted BGP (' . $bgp_alerts . ')
  • +
  • Alerted BGP (' . $bgp_alerts . ')
  • '); } diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php index 8fad2c6def..1dadd0a96f 100644 --- a/html/pages/routing/bgp.inc.php +++ b/html/pages/routing/bgp.inc.php @@ -191,7 +191,7 @@ else unset($sep); echo(" - " . $localaddresslink . "
    ".generate_device_link($peer, shorthost($peer['hostname']), 'routing/bgp/')." + " . $localaddresslink . "
    ".generate_device_link($peer, shorthost($peer['hostname']), array('tab' => 'routing', 'proto' => 'bgp'))." » " . $peeraddresslink . " $peer_type