diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 6e6c9c6964..b5f12a1cfd 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -252,7 +252,7 @@ if ($_SESSION['userlevel'] >= '5') if ($bgp_alerts) { echo(' -
  • Alerted BGP (' . $bgp_alerts . ')
  • +
  • Alerted BGP (' . $bgp_alerts . ')
  • '); } diff --git a/html/includes/print-quadgraphs.inc.php b/html/includes/print-quadgraphs.inc.php index 051abb53d2..6d4c2a34e6 100644 --- a/html/includes/print-quadgraphs.inc.php +++ b/html/includes/print-quadgraphs.inc.php @@ -2,8 +2,9 @@ global $config; -$graph_array['height'] = "100"; -$graph_array['width'] = "215"; +if(!$graph_array['height']) { $graph_array['height'] = "100"; } +if(!$graph_array['width']) { $graph_array['width'] = "215"; } + $graph_array['to'] = $now; $periods = array('day', 'week', 'month', 'year'); @@ -20,4 +21,4 @@ foreach ($periods as $period) echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL)); } -?> \ No newline at end of file +?> diff --git a/html/index.php b/html/index.php index 89a9900e05..6103475c5b 100755 --- a/html/index.php +++ b/html/index.php @@ -10,7 +10,7 @@ if (strpos($_SERVER['REQUEST_URI'], "debug")) ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('log_errors', 1); - ini_set('error_reporting', E_ALL); + ini_set('error_reporting', E_PARSE); } else { $debug = FALSE; ini_set('display_errors', 0); diff --git a/html/pages/device/routing.inc.php b/html/pages/device/routing.inc.php index a79587d8ed..8409a09332 100644 --- a/html/pages/device/routing.inc.php +++ b/html/pages/device/routing.inc.php @@ -1,12 +1,17 @@ "); + echo("BGP » "); if (!isset($_GET['optb'])) { echo(""); } echo("Basic"); @@ -42,15 +41,11 @@ echo(" echo("Mac Accounting"); if ($_GET['optb'] == "macaccounting") { echo(""); } -echo(" -"); - print_optionbar_end(); -?> -
    +echo('
    '); +echo(''); -iBGP"; } else { $peer_type = "eBGP"; } @@ -121,8 +121,12 @@ while ($peer = mysql_fetch_assoc($peer_query)) $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150"; $peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . ""; - echo(" - + echo(' + "); + + + echo(" @@ -130,31 +134,40 @@ while ($peer = mysql_fetch_assoc($peer_query)) "); + " . $peer['bgpPeerOutUpdates'] . " + "); - if (isset($_GET['optb']) && $_GET['optb'] != "macaccounting") + if ($_GET['optb'] != "basic" && isset($_GET['optb']) && $_GET['optb'] != "macaccounting") { + + unset($graph_array); foreach (explode(" ", $_GET['optb']) as $graph_type) { - if ($graph_type == "prefixes") { list($afi, $safi) = explode(".", $_GET['optc']); $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"; - $weekly_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$week&to=$now&width=210&height=100$afisafi"; - $weekly_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$week&to=$now&width=500&height=150$afisafi"; - $monthly_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$month&to=$now&width=210&height=100$afisafi"; - $monthly_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$month&to=$now&width=500&height=150$afisafi"; - $yearly_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$year&to=$now&width=210&height=100$afisafi"; - $yearly_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$year&to=$now&width=500&height=150$afisafi"; - echo(""); + + if ($graph_type == "prefixes") + { + $graph_array['type'] = "bgp_prefixes"; + list($afi, $safi) = explode(".", $_GET['optc']); + $graph_array['afi'] = $afi; + $graph_array['safi'] = $safi; + } else { + $graph_array['type'] = "bgp_updates"; } + + $graph_array['height'] = "100"; + $graph_array['width'] = "215"; + $graph_array['to'] = $now; + $graph_array['id'] = $peer['bgpPeer_id']; + + if ($graph_type == "updates" || $valid_afi_safi[$afi][$safi]) + { + echo('"); + } + } + } if ($_GET['opta'] == "macaccounting" && $has_macaccounting) @@ -164,24 +177,18 @@ while ($peer = mysql_fetch_assoc($peer_query)) $database = $config['rrd_dir'] . "/" . $device['hostname'] . "/cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd"; if (is_file($database)) { - $daily_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=210&height=100"; - $daily_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150"; - $weekly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$week&to=$now&width=210&height=100"; - $weekly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150"; - $monthly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$month&to=$now&width=210&height=100"; - $monthly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150"; - $yearly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$year&to=$now&width=210&height=100"; - $yearly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150"; - echo(""); + } } @@ -190,4 +197,4 @@ while ($peer = mysql_fetch_assoc($peer_query)) } ?> -
    Peer addressTypeRemote ASStateUptime
    $i
    ".$i." " . $peeraddresslink . "
    ".generate_device_link($peer, shorthost($peer['hostname']), 'bgp/')."
    $peer_type " . (isset($peer_af) ? $peer_af : '') . "" . $peer['bgpPeerAdminStatus'] . "
    " . $peer['bgpPeerState'] . "
    " .formatUptime($peer['bgpPeerFsmEstablishedTime']). "
    Updates " . $peer['bgpPeerInUpdates'] . " - " . $peer['bgpPeerOutUpdates'] . "
    "); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> "); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">"); - echo("
    '); + include("includes/print-quadgraphs.inc.php"); + echo("
    "); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> - "); + + $graph_array['graph_type'] = $graph_type; + + $graph_array['height'] = "100"; + $graph_array['width'] = "215"; + $graph_array['to'] = $now; + $graph_array['id'] = $acc['ma_id']; + + echo('
    '); + include("includes/print-quadgraphs.inc.php"); echo("
    + diff --git a/html/pages/device/cefswitching.inc.php b/html/pages/device/routing/cef.inc.php similarity index 91% rename from html/pages/device/cefswitching.inc.php rename to html/pages/device/routing/cef.inc.php index 8f66cf625b..d179e78806 100644 --- a/html/pages/device/cefswitching.inc.php +++ b/html/pages/device/routing/cef.inc.php @@ -6,16 +6,18 @@ $menu_options = array('basic' => 'Basic', 'graphs' => 'Graphs', ); -if (!$_GET['opta']) { $_GET['opta'] = "basic"; } +if (!$_GET['optb']) { $_GET['opta'] = "basic"; } + +echo('CEF » '); $sep = ""; foreach ($menu_options as $option => $text) { echo($sep); - if ($_GET['opta'] == $option) { echo(""); } - echo('' . $text + if ($_GET['optb'] == $option) { echo(""); } + echo('' . $text . ''); - if ($_GET['opta'] == $option) { echo(""); } + if ($_GET['optb'] == $option) { echo(""); } $sep = " | "; } diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php index 55298dab9b..71a1b60584 100644 --- a/html/pages/routing/bgp.inc.php +++ b/html/pages/routing/bgp.inc.php @@ -76,7 +76,6 @@ else print_optionbar_end(); - echo("
    "); echo(""); echo(''); @@ -121,9 +120,9 @@ else $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150"; $peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . ""; - echo(' - + echo('"); + + echo(" @@ -138,7 +137,7 @@ else if($graphs == "graphs") { $graph_array['height'] = "100"; - $graph_array['width'] = "215"; + $graph_array['width'] = "216"; $graph_array['to'] = $now; $graph_array['id'] = $peer['bgpPeer_id']; $graph_array['type'] = "bgp_updates"; @@ -153,7 +152,7 @@ else $i++; } - echo("
    Local addressPeer addressTypeRemote ASStateUptime
    " . $localaddresslink . "
    ".generate_device_link($peer, shorthost($peer['hostname']), 'routing/bgp/')."
    -> " . $peeraddresslink . "
    "); + echo(""); } ?> diff --git a/includes/rewrites.php b/includes/rewrites.php index 45cfc043be..e8726462fd 100644 --- a/includes/rewrites.php +++ b/includes/rewrites.php @@ -44,6 +44,14 @@ function ifLabel ($interface, $device = NULL) if (isset($config['os'][$os]['ifname'])) { $interface['label'] = $interface['ifName']; + + if($interface['ifName'] == "") + { + $interface['label'] = $interface['ifDescr']; + } else { + $interface['label'] = $interface['ifName']; + } + } elseif (isset($config['os'][$os]['ifalias'])) { $interface['label'] = $interface['ifAlias']; @@ -969,4 +977,4 @@ function rewrite_adslLineType($adslLineType) return($adslLineType); } -?> \ No newline at end of file +?> diff --git a/includes/static-config.php b/includes/static-config.php index 48329050bd..bd6470bd5c 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -78,6 +78,7 @@ $config['os'][$os]['type'] = "server"; $os = "adva"; $config['os'][$os]['type'] = "network"; $config['os'][$os]['text'] = "Adva Optical"; + $config['os'][$os]['over'][0]['graph'] = "device_bits"; $config['os'][$os]['over'][0]['text'] = "Device Traffic";