diff --git a/config.php.default b/config.php.default index eac5631b9..76581ebfb 100755 --- a/config.php.default +++ b/config.php.default @@ -44,10 +44,9 @@ $config['snmpset'] = "/usr/bin/snmpset"; # Set the general colours and other settings for rrdtool graphs -$config['rrdgraph_def_text'] = " -c BACK#EEEEEE00 -c SHADEA#c5c5c500 -c SHADEB#c5c5c500 -c FONT#000000 -c CANVAS#FFFFFF -c GRID#a5a5a5"; +$config['rrdgraph_def_text'] = " -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF -c GRID#a5a5a5"; $config['rrdgraph_def_text'] .= " -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal"; - -$config['overlib_defaults'] = ",FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505'"; +$config['overlib_defaults'] = ",FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555'"; ### List of networks to allow scanning-based discovery $config['nets'] = array ("89.21.224.0/19", "212.9.12.0/24", "212.9.13.0/24"); diff --git a/html/images/warning-background.png b/html/images/warning-background.png index 9e87b6931..f7f5d1117 100644 Binary files a/html/images/warning-background.png and b/html/images/warning-background.png differ diff --git a/html/includes/hostbox.inc b/html/includes/hostbox.inc index 294468751..3938e28d2 100644 --- a/html/includes/hostbox.inc +++ b/html/includes/hostbox.inc @@ -1,7 +1,7 @@ ' . $image . ' ' . generatedevicelink($device) . ' diff --git a/html/includes/print-interface.inc.php b/html/includes/print-interface.inc.php index b4493833b..9387077f3 100644 --- a/html/includes/print-interface.inc.php +++ b/html/includes/print-interface.inc.php @@ -53,11 +53,11 @@ if($port_details) { $interface['graph_type'] = "port_bits"; - echo(generateiflink($interface, "")); + echo(generateiflink($interface, "", $interface['graph_type'])); $interface['graph_type'] = "port_upkts"; - echo(generateiflink($interface, "")); + echo(generateiflink($interface, "",$interface['graph_type'])); $interface['graph_type'] = "port_errors"; - echo(generateiflink($interface, "")); + echo(generateiflink($interface, "",$interface['graph_type'])); } echo(""); diff --git a/html/pages/bgp.php b/html/pages/bgp.php index 72b901a77..a46e5d343 100644 --- a/html/pages/bgp.php +++ b/html/pages/bgp.php @@ -6,9 +6,9 @@ if ($_SESSION['userlevel'] < '5') } else { - echo("
"); + echo("
"); - echo ''; + echo ''; $i = "1"; @@ -26,7 +26,7 @@ else if(!is_integer($i/2)) { $bg_colour = $list_colour_b; } else { $bg_colour = $list_colour_a; } - if($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; if ($_GET['opta'] != "alerts") { $bg_colour = "#ffcccc"; } } + if($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; if ($_GET['opta'] != "alerts") { $bg_image = "images/warning-background.png"; } } if($peer['bgpPeerAdminStatus'] == "start" || $peer['bgpPeerAdminStatus'] == "running") { $admin_col = "green"; } else { $admin_col = "gray"; } if($peer['bgpPeerRemoteAs'] == $peer['bgpLocalAs']) { $peer_type = "iBGP"; } else { $peer_type = "eBGP"; @@ -37,8 +37,8 @@ else if($peerhost) { $peername = generatedevicelink($peerhost, shorthost($peerhost['hostname'])); } else { unset($peername); } - echo(" - + echo(" + diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/bgp.inc.php index e7f502123..2907fa4fe 100644 --- a/html/pages/device/bgp.inc.php +++ b/html/pages/device/bgp.inc.php @@ -24,6 +24,7 @@ print_optionbar_end(); $i = "1"; $peer_query = mysql_query("select * from bgpPeers WHERE device_id = '".$device['device_id']."' ORDER BY bgpPeerRemoteAs, bgpPeerIdentifier"); while($peer = mysql_fetch_array($peer_query)) { + unset($bg_image); if(!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } #if($peer['bgpPeerAdminStatus'] == "start") { $img = "images/16/accept.png"; } else { $img = "images/16/delete.png"; } if($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; $bg_image = "images/warning-background.png"; } @@ -104,9 +105,9 @@ print_optionbar_end(); } if ($_GET['opta'] == "macaccounting") { if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ipv4_mac` AS I, mac_accounting AS M WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address"),0)) { - $acc = mysql_fetch_array(mysql_query("SELECT * FROM `ipv4_mac` AS I, mac_accounting AS M WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address")); - $graph_type = "mac_acc"; - $database = $config['rrd_dir'] . "/" . $device['hostname'] . "/mac-accounting/" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd"; + $acc = mysql_fetch_array(mysql_query("SELECT * FROM `ipv4_mac` AS I, mac_accounting AS M, interfaces AS P WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address AND P.interface_id = M.interface_id")); + $graph_type = "mac_acc_bits"; + $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"; @@ -116,7 +117,6 @@ print_optionbar_end(); $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("
Local addressPeer addressTypeRemote ASStateUptime
Local addressPeer addressTypeRemote ASStateUptime
" . $peer['bgpLocalAddr'] . "
".generatedevicelink($peer, shorthost($peer['hostname']))."
-> " . $peer['bgpPeerIdentifier'] . "
".$peername."
"); echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> ");