From d411f28c3359dc179563344cd12be30c46c674cb Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Wed, 24 Nov 2010 14:25:03 +0000 Subject: [PATCH] rename cbgp_prefixes to prefixes, as this will be used for more than cisco-bgp-mib now, and link directly to the bgp tab from the general bgp overview when you click on the device. overloaded generate_device_link, the day/time attributes were never used in any page yet git-svn-id: http://www.observium.org/svn/observer/trunk@1740 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/functions.inc.php | 5 ++--- .../bgp/{cbgp_prefixes.inc.php => prefixes.inc.php} | 0 html/pages/bgp.inc.php | 2 +- html/pages/device/bgp.inc.php | 8 ++++---- 4 files changed, 7 insertions(+), 8 deletions(-) rename html/includes/graphs/bgp/{cbgp_prefixes.inc.php => prefixes.inc.php} (100%) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index 6881e499f4..1e5d69579b 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -1,6 +1,6 @@ ".$device['hostname']; if($device['hardware']) { $contents .= " - ".$device['hardware']; } $contents .= ""; @@ -34,7 +34,6 @@ function generate_device_link($device, $text=0, $start=0, $end=0) # if($device['hardware']) { $contents .= " - ".$device['hardware']; } $contents .= ""; - # if (isset($device['location'])) { $contents .= "" . htmlentities($device['location'])."
"; } foreach ($graphs as $entry) { diff --git a/html/includes/graphs/bgp/cbgp_prefixes.inc.php b/html/includes/graphs/bgp/prefixes.inc.php similarity index 100% rename from html/includes/graphs/bgp/cbgp_prefixes.inc.php rename to html/includes/graphs/bgp/prefixes.inc.php diff --git a/html/pages/bgp.inc.php b/html/pages/bgp.inc.php index 70c46e1212..03eb95cc4c 100644 --- a/html/pages/bgp.inc.php +++ b/html/pages/bgp.inc.php @@ -40,7 +40,7 @@ else echo(" - " . $peer['bgpLocalAddr'] . "
".generate_device_link($peer, shorthost($peer['hostname']))." + " . $peer['bgpLocalAddr'] . "
".generate_device_link($peer, shorthost($peer['hostname']), 'bgp/')." -> " . $peer['bgpPeerIdentifier'] . "
".$peername." $peer_type diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/bgp.inc.php index a503984e41..95787692d6 100644 --- a/html/pages/device/bgp.inc.php +++ b/html/pages/device/bgp.inc.php @@ -10,9 +10,9 @@ echo("
No Graphs | Updates | Prefixes: - IPv4 | - VPNv4 | - IPv6 + IPv4 | + VPNv4 | + IPv6 | Traffic: Mac Accounting
@@ -84,7 +84,7 @@ print_optionbar_end(); if (isset($_GET['opta']) && $_GET['opta'] != "macaccounting") { foreach(explode(" ", $_GET['opta']) as $graph_type) { - if($graph_type == "cbgp_prefixes") { list($afi, $safi) = explode(".", $_GET['optb']); $afisafi = "&afi=$afi&safi=$safi"; } + if($graph_type == "prefixes") { list($afi, $safi) = explode(".", $_GET['optb']); $afisafi = "&afi=$afi&safi=$safi"; } if($graph_type == "updates" || $valid_afi_safi[$afi][$safi]) { $daily_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$day&to=$now&width=210&height=100$afisafi"; $daily_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$day&to=$now&width=500&height=150$afisafi";