mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
- Modified code to use graph generation functions instead of calling overlib directly.
The graph generation functions check for the status of 'web_mouseover'.
This commit is contained in:
@@ -200,10 +200,21 @@ foreach (dbFetchRows('SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b
|
||||
$peer['bgpPeerIdentifier'] = Net_IPv6::compress($peer['bgpPeerIdentifier']);
|
||||
}
|
||||
|
||||
// display overlib graphs
|
||||
$graph_array = array();
|
||||
$graph_array['type'] = 'bgp_updates';
|
||||
$graph_array['id'] = $peer['bgpPeer_id'];
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['from'] = $config['time']['day'];
|
||||
$graph_array['height'] = '110';
|
||||
$graph_array['width'] = $width;
|
||||
|
||||
$graph_type = 'bgp_updates';
|
||||
$peer_daily_url = 'graph.php?id='.$peer['bgpPeer_id'].'&type='.$graph_type.'&from='.$config['time']['day'].'&to='.$config['time']['now'].'&width=500&height=150';
|
||||
$peeraddresslink = "<span class=list-large><a onmouseover=\"return overlib('<img src=\'$peer_daily_url\'>', LEFT".$config['overlib_defaults'].');" onmouseout="return nd();">'.$peer['bgpPeerIdentifier'].'</a></span>';
|
||||
// Peer Address
|
||||
$graph_array_zoom = $graph_array;
|
||||
$graph_array_zoom['height'] = '150';
|
||||
$graph_array_zoom['width'] = '500';
|
||||
$overlib_link = "device/device=".$peer['device_id']."/tab=routing/proto=bgp/";
|
||||
$peeraddresslink = "<span class=list-large>".overlib_link(NULL, $peer['bgpPeerIdentifier'], generate_graph_tag($graph_array_zoom), NULL)."</span>";
|
||||
|
||||
echo '<tr bgcolor="'.$bg_colour.'"'.($peer['alert'] ? ' bordercolor="#cc0000"' : '').($peer['disabled'] ? ' bordercolor="#cccccc"' : '').'>
|
||||
';
|
||||
|
Reference in New Issue
Block a user