remove legacy variables, hopefully i didn't mess anything up

git-svn-id: http://www.observium.org/svn/observer/trunk@3134 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-05-06 18:38:11 +00:00
parent c450f2aea9
commit 8df2b9b3f5
53 changed files with 963 additions and 212 deletions
+2 -2
View File
@@ -40,10 +40,10 @@ echo('
$graph_array['height'] = "100";
$graph_array['width'] = "310";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $device['device_id'];
$graph_array['type'] = "device_bits";
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$graph_array['popup_title'] = $descr;
# $graph_array['link'] = generate_device_link($device_id);
+2 -2
View File
@@ -31,9 +31,9 @@ foreach ($vlan_ports as $port)
<a href='device/device=".$device['device_id']."/tab=port/port=".$port['interface_id']."/' onmouseover=\"return overlib('\
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
".$port['ifAlias']." \
<img src=\'graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$now."&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<img src='graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$now."&amp;width=132&amp;height=40&amp;legend=no'>
"<img src='graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$config['time']['now']."&amp;width=132&amp;height=40&amp;legend=no'>
</a>
<div style='font-size: 9px;'>".truncate(short_port_descr($port['ifAlias']), 22, '')."</div>
</div>");
+2 -2
View File
@@ -19,9 +19,9 @@ foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVrf` = ?"
<a href='device/".$device['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
".$port['ifAlias']." \
<img src=\'graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$now."&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<img src='graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$now."&amp;width=132&amp;height=40&amp;legend=no'>
"<img src='graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=-2day&amp;to=".$config['time']['now']."&amp;width=132&amp;height=40&amp;legend=no'>
</a>
<div style='font-size: 9px;'>".truncate(short_port_descr($port['ifAlias']), 22, '')."</div>
</div>");
-8
View File
@@ -100,14 +100,6 @@ include("includes/authenticate.inc.php");
if (strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; }
if (strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); }
$now = time();
$fourhour = time() - (4 * 60 * 60);
$day = time() - (24 * 60 * 60);
$twoday = time() - (2 * 24 * 60 * 60);
$week = time() - (7 * 24 * 60 * 60);
$month = time() - (31 * 24 * 60 * 60);
$year = time() - (365 * 24 * 60 * 60);
# Load the settings for Multi-Tenancy.
if (isset($config['branding']) && is_array($config['branding']))
{
+38 -37
View File
@@ -1,45 +1,46 @@
<?php
$graph_array['height'] = "100";
$graph_array['width'] = "220";
$graph_array['to'] = $now;
$graph_array['from'] = $config['time']['day'];
$graph_array_zoom = $graph_array;
$graph_array_zoom['height'] = "150";
$graph_array_zoom['width'] = "400";
$graph_array['legend'] = "no";
$graph_array['height'] = "100";
$graph_array['width'] = "220";
$graph_array['to'] = $config['time']['now'];
$graph_array['from'] = $config['time']['day'];
$graph_array_zoom = $graph_array;
$graph_array_zoom['height'] = "150";
$graph_array_zoom['width'] = "400";
$graph_array['legend'] = "no";
echo('<h2>'.$vars['app'].'</h2>');
echo('<table cellpadding=5 cellspacing=0 class=devicetable width=100%>');
$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($vars['app']));
foreach ($app_devices as $app_device)
{
echo('<tr class="list-device">');
echo('<td class="device-head" width=300px>'.generate_device_link($app_device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).'</td>');
echo('<td class="device-head" width=100px>'.$app_device['app_instance'].'</td>');
echo('<td class="device-head" width=100px>'.$app_device['app_status'].'</td>');
echo('<td></td>');
echo('</tr>');
echo('<tr class="list-device">');
echo('<td colspan=4>');
echo('<h2>'.$vars['app'].'</h2>');
echo('<table cellpadding=5 cellspacing=0 class=devicetable width=100%>');
$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($vars['app']));
foreach ($app_devices as $app_device)
{
echo('<tr class="list-device">');
echo('<td class="device-head" width=300px>'.generate_device_link($app_device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).'</td>');
echo('<td class="device-head" width=100px>'.$app_device['app_instance'].'</td>');
echo('<td class="device-head" width=100px>'.$app_device['app_status'].'</td>');
echo('<td></td>');
echo('</tr>');
echo('<tr class="list-device">');
echo('<td colspan=4>');
foreach ($graphs[$vars['app']] as $graph_type)
{
$graph_array['type'] = "application_".$vars['app']."_".$graph_type;
$graph_array['id'] = $app_device['app_id'];
$graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type;
$graph_array_zoom['id'] = $app_device['app_id'];
foreach ($graphs[$vars['app']] as $graph_type)
{
$graph_array['type'] = "application_".$vars['app']."_".$graph_type;
$graph_array['id'] = $app_device['app_id'];
$graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type;
$graph_array_zoom['id'] = $app_device['app_id'];
$link_array = $graph_array;
$link_array['page'] = "graphs";
unset($link_array['height'], $link_array['width']);
$link = generate_url($link_array);
$link_array = $graph_array;
$link_array['page'] = "graphs";
unset($link_array['height'], $link_array['width']);
$link = generate_url($link_array);
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
}
echo('</td>');
echo('</tr>');
}
echo('</table>');
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
}
echo('</td>');
echo('</tr>');
}
echo('</table>');
?>
+1 -1
View File
@@ -2,7 +2,7 @@
$graph_array['height'] = "100";
$graph_array['width'] = "218";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['from'] = $config['time']['day'];
$graph_array_zoom = $graph_array;
$graph_array_zoom['height'] = "150";
+1 -1
View File
@@ -13,7 +13,7 @@ foreach ($graphs as $key => $text)
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
+1 -1
View File
@@ -12,7 +12,7 @@ foreach ($graphs as $key => $text)
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
+1 -1
View File
@@ -11,7 +11,7 @@ foreach ($graphs as $key => $text)
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
+1 -1
View File
@@ -16,7 +16,7 @@ foreach ($graphs as $key => $text)
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
+1 -1
View File
@@ -61,7 +61,7 @@ foreach ($graphs[$vars['app_section']] as $key => $text)
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
echo('<h3>'.$text.'</h3>');
+1 -1
View File
@@ -10,7 +10,7 @@ foreach ($graphs as $key => $text)
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
echo('<h3>'.$text.'</h3>');
+1 -1
View File
@@ -9,7 +9,7 @@ foreach ($graphs as $key => $text) {
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
echo('<h3>'.$text.'</h3>');
+1 -1
View File
@@ -14,7 +14,7 @@ foreach ($graphs as $key => $text) {
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
echo('<h3>'.$text.'</h3>');
+1 -1
View File
@@ -15,7 +15,7 @@ foreach ($graphs as $key => $text)
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
+2 -2
View File
@@ -33,7 +33,7 @@ if (isset($total) && $total == true)
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
echo('<h3>'.$text.'</h3>');
@@ -60,7 +60,7 @@ foreach ($files as $id => $file)
$graph_type = $key;
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $app['app_id'];
$graph_array['type'] = "application_".$key;
$graph_array['hostname'] = $hostname;
+4 -2
View File
@@ -7,6 +7,8 @@ echo("<table width=100% cellpadding=6 cellspacing=0>");
$i = '1';
#FIXME css alternating colours
foreach (dbFetchRows("SELECT * FROM `mempools` WHERE device_id = ?", array($device['device_id'])) as $mempool)
{
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
@@ -14,10 +16,10 @@ foreach (dbFetchRows("SELECT * FROM `mempools` WHERE device_id = ?", array($devi
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
$mempool_url = "device/".$device['device_id']."/health/mempool/";
$mini_url = "graph.php?id=".$mempool['mempool_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mini_url = "graph.php?id=".$mempool['mempool_id']."&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=125\'>";
$mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
$total = formatStorage($mempool['mempool_total']);
+2 -2
View File
@@ -10,14 +10,14 @@ foreach (dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", array($de
{
$proc_url = "device/device=".$device['device_id']."/tab=health/metric=processor/";
$mini_url = "graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mini_url = "graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$config['time']['now']."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$text_descr = $proc['processor_descr'];
$text_descr = rewrite_entity_descr($text_descr);
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=125\'>";
$proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
$percent = round($proc['processor_usage']);
+1 -1
View File
@@ -28,7 +28,7 @@ foreach (dbFetchRows("SELECT * FROM `storage` WHERE device_id = ? ORDER BY stora
$fs_url = "device/device=".$device['device_id']."/tab=health/metric=storage/";
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['storage_descr'];
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=125\'>";
$fs_popup .= "', RIGHT, FGCOLOR, '#e5e5e5');\" onmouseout=\"return nd();\"";
$background = get_percentage_colours($percent);
+5 -5
View File
@@ -13,16 +13,16 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h
$proc_id = dbFetchCell("SELECT processor_id FROM processors WHERE device_id = '".$device['device_id']."' AND hrDeviceIndex = '".$hrdevice['hrDeviceIndex']."'");
$proc_url = "device/".$device['device_id']."/health/processor/";
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$hrdevice['hrDeviceDescr'];
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc_id . "&amp;type=processor_usage&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc_id . "&amp;type=processor_usage&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=125\'>";
$proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
echo("<td><a href='$proc_url' $proc_popup>".$hrdevice['hrDeviceDescr']."</a></td>");
$graph_array['height'] = "20";
$graph_array['width'] = "100";
$graph_array['to'] = $now;
$graph_array['to'] = ".$config['time']['now'].";
$graph_array['id'] = $proc_id;
$graph_array['type'] = 'processor_usage';
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400";
$mini_graph = overlib_link($proc_url, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
@@ -39,10 +39,10 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h
$graph_array['height'] = "20";
$graph_array['width'] = "100";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $interface['interface_id'];
$graph_array['type'] = 'port_bits';
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400";
# FIXME click on graph should also link to port, but can't use generate_port_link here...
+2 -2
View File
@@ -53,12 +53,12 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $device['device_id'];
$graph_array['mod'] = $index;
$graph_array['chan'] = $subindex;
$graph_array['type'] = "c6kxbar_util";
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$link_array = $graph_array;
@@ -27,7 +27,7 @@ if (count($sensors))
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $sensor['sensor_id'];
$graph_array['type'] = $graph_type;
$graph_array['from'] = $config['time']['day'];
+2 -2
View File
@@ -24,10 +24,10 @@ if (count($mempools))
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $mempool['mempool_id'];
$graph_array['type'] = $graph_type;
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$link_array = $graph_array;
+2 -2
View File
@@ -6,10 +6,10 @@ if ($ports['total'])
$graph_array['height'] = "100";
$graph_array['width'] = "485";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $device['device_id'];
$graph_array['type'] = "device_bits";
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$graph = generate_graph_tag($graph_array);
@@ -25,10 +25,10 @@ if (count($processors))
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $proc['processor_id'];
$graph_array['type'] = $graph_type;
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$link_array = $graph_array;
+2 -2
View File
@@ -49,10 +49,10 @@ if (count($drives))
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $drive['storage_id'];
$graph_array['type'] = $graph_type;
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$link_array = $graph_array;
+2 -2
View File
@@ -24,10 +24,10 @@ if (count($toners))
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $toner['toner_id'];
$graph_array['type'] = $graph_type;
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$link_array = $graph_array;
+1 -1
View File
@@ -16,7 +16,7 @@ foreach (dbFetchRows("SELECT * FROM juniAtmVp WHERE interface_id = ?", array($in
$graph_array['height'] = "100";
$graph_array['width'] = "214";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $vp['juniAtmVp_id'];
$graph_array['type'] = $graph_type;
+3 -3
View File
@@ -151,9 +151,9 @@ if ($vars['subview'] == "top10")
".$addy['ipv4_address']." - ".$asn."
<a href='#' onmouseover=\"return overlib('\
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #555555;\'>".$name." - ".$addy['ipv4_address']." - ".$asn."</div>\
<img src=\'graph.php?id=" . $acc['ma_id'] . "&amp;type=$graph_type&amp;from=-2day&amp;to=$now&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?id=" . $acc['ma_id'] . "&amp;type=$graph_type&amp;from=-2day&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >
<img src='graph.php?id=" . $acc['ma_id'] . "&amp;type=$graph_type&amp;from=-2day&amp;to=$now&amp;width=213&amp;height=45'></a>
<img src='graph.php?id=" . $acc['ma_id'] . "&amp;type=$graph_type&amp;from=-2day&amp;to=".$config['time']['now']."&amp;width=213&amp;height=45'></a>
<span style='font-size: 10px;'>".$name."</span>
</div>");
@@ -181,7 +181,7 @@ if ($vars['subview'] == "top10")
$graph_array['id'] = $acc['ma_id'];
$graph_array['height'] = "100";
$graph_array['width'] = "216";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
echo('<tr bgcolor="'.$bg_colour.'"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="7">');
include("includes/print-graphrow.inc.php");
+8 -8
View File
@@ -6,17 +6,17 @@ global $config;
if (!$graph_type) { $graph_type = "pagp_bits"; }
$daily_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$day&amp;to=$now&amp;width=215&amp;height=100";
$daily_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150";
$daily_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=215&amp;height=100";
$daily_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150";
$weekly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$week&amp;to=$now&amp;width=215&amp;height=100";
$weekly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$week&amp;to=$now&amp;width=500&amp;height=150";
$weekly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=215&amp;height=100";
$weekly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150";
$monthly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$month&amp;to=$now&amp;width=215&amp;height=100";
$monthly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$month&amp;to=$now&amp;width=500&amp;height=150";
$monthly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=215&amp;height=100";
$monthly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150";
$yearly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$year&amp;to=$now&amp;width=215&amp;height=100";
$yearly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$year&amp;to=$now&amp;width=500&amp;height=150";
$yearly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=215&amp;height=100";
$yearly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150";
echo("<a href='#' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
<img src='$daily_traffic' border=0></a> ");
+2 -2
View File
@@ -78,9 +78,9 @@ if ($vars['view'] == 'minigraphs')
<a href=\"" . generate_port_url($port) . "\" onmouseover=\"return overlib('\
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
".$port['ifAlias']." \
<img src=\'graph.php?type=".$graph_type."&amp;id=".$port['interface_id']."&amp;from=".$from."&amp;to=".$now."&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?type=".$graph_type."&amp;id=".$port['interface_id']."&amp;from=".$from."&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<img src='graph.php?type=".$graph_type."&amp;id=".$port['interface_id']."&amp;from=".$from."&amp;to=".$now."&amp;width=180&amp;height=45&amp;legend=no'>
"<img src='graph.php?type=".$graph_type."&amp;id=".$port['interface_id']."&amp;from=".$from."&amp;to=".$config['time']['now']."&amp;width=180&amp;height=45&amp;legend=no'>
</a>
<div style='font-size: 9px;'>".truncate(short_port_descr($port['ifAlias']), 32, '')."</div>
</div>");
+4 -4
View File
@@ -58,8 +58,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.interfa
{
$pw_a['width'] = "150";
$pw_a['height'] = "30";
$pw_a['from'] = $day;
$pw_a['to'] = $now;
$pw_a['from'] = $config['time']['day'];
$pw_a['to'] = $config['time']['now'];
$pw_a['bg'] = $bg;
$types = array('bits','upkts','errors');
foreach ($types as $graph_type)
@@ -74,8 +74,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.interfa
{
$pw_b['width'] = "150";
$pw_b['height'] = "30";
$pw_b['from'] = $day;
$pw_b['to'] = $now;
$pw_b['from'] = $config['time']['day'];
$pw_b['to'] = $config['time']['now'];
$pw_b['bg'] = $bg;
$types = array('bits','upkts','errors');
foreach ($types as $graph_type)
+2 -2
View File
@@ -127,7 +127,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b
unset($sep);
$graph_type = "bgp_updates";
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150";
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=500&amp;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>";
echo('<tr bgcolor="'.$bg_colour.'"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') .
@@ -183,7 +183,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b
{
$graph_array['height'] = "100";
$graph_array['width'] = "216";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
echo('<tr bgcolor="'.$bg_colour.'"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="7">');
include("includes/print-graphrow.inc.php");
+1 -1
View File
@@ -89,7 +89,7 @@ foreach (dbFetchRows("SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
{
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $cef['cef_switching_id'];
$graph_array['type'] = "cefswitching_graph";
+1 -1
View File
@@ -34,7 +34,7 @@ if (dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE device_id = ?",
{
$graph_array['height'] = "100";
$graph_array['width'] = "210";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $service['service_id'];
$graph_array['type'] = "service_availability";
+1 -1
View File
@@ -42,7 +42,7 @@ if ($config['warn']['ifdown'])
$interface = ifNameDescr($interface);
generate_front_box("#ffdd99", "<center><strong>".generate_device_link($interface, shorthost($interface['hostname']))."</strong><br />
<span style='font-size: 14px; font-weight: bold; margin: 5px; color: #c00;'>Port Down</span><br />
<!-- <img src='graph.php?type=bits&amp;if=".$interface['interface_id']."&amp;from=$day&amp;to=$now&amp;width=100&amp;height=32' /> -->
<!-- <img src='graph.php?type=bits&amp;if=".$interface['interface_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=100&amp;height=32' /> -->
<strong>".generate_port_link($interface, truncate(makeshortif($interface['label']),13,''))."</strong> <br />
" . ($interface['ifAlias'] ? '<span class="body-date-1">'.truncate($interface['ifAlias'], 20, '').'</span>' : '') . "
</center>");
+2 -2
View File
@@ -17,10 +17,10 @@ foreach ($dev_list as $device_id => $descr)
echo("<div style='font-size: 16px; font-weight: bold; color: #555555;'>".$descr."</div>");
$graph_array['height'] = "100";
$graph_array['width'] = "310";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $device_id;
$graph_array['type'] = "device_bits";
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$graph_array['popup_title'] = $descr;
# $graph_array['link'] = generate_device_link($device_id);
+6 -6
View File
@@ -143,28 +143,28 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['transit'])
{
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&amp;ports=".$ports['transit'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 18px; font-weight: bold;'>Internet Transit</div>".
"<img src='graph.php?type=multi_bits&amp;ports=".$ports['transit'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=200&amp;height=100'></a>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=200&amp;height=100'></a>");
}
if ($ports['l2tp'])
{
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&amp;ports=".$ports['l2tp'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 18px; font-weight: bold;'>L2TP ADSL</div>".
"<img src='graph.php?type=multi_bits&amp;ports=".$ports['l2tp'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=200&amp;height=100'></a>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=200&amp;height=100'></a>");
}
if ($ports['voip'])
{
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&amp;ports=".$ports['voip'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 18px; font-weight: bold;'>VoIP to PSTN</div>".
"<img src='graph.php?type=multi_bits&amp;ports=".$ports['voip'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=200&amp;height=100'></a>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=200&amp;height=100'></a>");
}
}
+21 -21
View File
@@ -142,12 +142,12 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['peering'] && $ports['transit']) {
echo("<div style='width: 235px; '>
<a href='internet/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Aggregate Internet Traffic</div>".
"<img src='graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=385&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=385&amp;height=100&amp;legend=no'></a></div>");
}
echo("</div>");
@@ -157,23 +157,23 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['transit']) {
echo("<div style='width: 235px; float: left;'>
<a href='iftype/transit/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Internet Transit</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['transit'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
}
if ($ports['peering']) {
echo("<div style='width: 235px; float: right;'>
<a href='iftype/peering/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Internet Peering</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['peering'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
}
echo("</div>");
@@ -183,12 +183,12 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['broadband'] && $ports['wave_broadband'] && $ports['new_broadband']) {
echo("<div style='width: 466px; '>
<a href='broadband/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits_trio&amp;id=".$ports['broadband']."&amp;idb=".$ports['new_broadband']."&amp;idc=".$ports['wave_broadband']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150&amp;inverse=c\'>\
<img src=\'graph.php?type=multiport_bits_trio&amp;id=".$ports['broadband']."&amp;idb=".$ports['new_broadband']."&amp;idc=".$ports['wave_broadband']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150&amp;inverse=c\'>\
<img src=\'graph.php?type=multiport_bits_trio&amp;id=".$ports['broadband']."&amp;idb=".$ports['new_broadband']."&amp;idc=".$ports['wave_broadband']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150&amp;inverse=c\'>\
<img src=\'graph.php?type=multiport_bits_trio&amp;id=".$ports['broadband']."&amp;idb=".$ports['new_broadband']."&amp;idc=".$ports['wave_broadband']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150&amp;inverse=c\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Aggregate Broadband Traffic</div>".
"<img src='graph.php?type=multiport_bits_trio&amp;id=".$ports['broadband']."&amp;idb=".$ports['new_broadband']."&amp;idc=".$ports['wave_broadband'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=385&amp;height=100&amp;legend=no&amp;inverse=c'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=385&amp;height=100&amp;legend=no&amp;inverse=c'></a></div>");
}
echo("<div style=' margin-bottom: 5px;'>");
@@ -196,12 +196,12 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['broadband']) {
echo("<div style='width: 235px; float: left;'>
<a onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['broadband']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['broadband']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['broadband']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['broadband']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Jersey Broadband ATM</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['broadband'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
}
echo("<div style=' margin-bottom: 5px;'>");
@@ -209,11 +209,11 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['new_broadband']) {
echo("<div style='width: 235px; float: left;'>
<a onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['new_broadband']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150&amp;inverse=0\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['new_broadband']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150&amp;inverse=0\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['new_broadband']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150&amp;inverse=0\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['new_broadband']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150&amp;inverse=0\'>\
', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Jersey Broadband NGN</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['new_broadband']."&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;inverse=0&amp;legend=no'></a></div>");
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['new_broadband']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;inverse=0&amp;legend=no'></a></div>");
}
echo("</div>");
@@ -221,11 +221,11 @@ if ($_SESSION['userlevel'] >= '5')
if ($ports['wave_broadband']) {
echo("<div style='width: 235px; float: left;'>
<a onmouseover=\"return overlib('\
<img src=\'graph.php?type=port_bits&amp;id=".$ports['wave_broadband']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150&amp;inverse=1&amp;legend=1\'>\
<img src=\'graph.php?type=port_bits&amp;id=".$ports['wave_broadband']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150&amp;inverse=1&amp;legend=1\'>\
<img src=\'graph.php?type=port_bits&amp;id=".$ports['wave_broadband']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150&amp;inverse=1&amp;legend=1\'>\
<img src=\'graph.php?type=port_bits&amp;id=".$ports['wave_broadband']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150&amp;inverse=1&amp;legend=1\'>\
', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". "
<div style='font-size: 16px; font-weight: bold; color: #555555;'>Wave Broadband</div>".
"<img src='graph.php?type=port_bits&amp;id=".$ports['wave_broadband']."&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;inverse=1&amp;legend=no'></a></div>");
"<img src='graph.php?type=port_bits&amp;id=".$ports['wave_broadband']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;inverse=1&amp;legend=no'></a></div>");
}
echo("</div>");
+20 -16
View File
@@ -141,52 +141,56 @@ if ($_SESSION['userlevel'] >= '5')
echo("<div style=' margin-bottom: 5px;'>");
if ($ports['peering'] && $ports['transit']) {
if ($ports['peering'] && $ports['transit'])
{
echo("<div style='width: 235px; '>
<a href='internet/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Aggregate Internet Traffic</div>".
"<img src='graph.php?type=multiport_bits_duo&amp;id=".$ports['peering']."&amp;idb=".$ports['transit'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=385&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=385&amp;height=100&amp;legend=no'></a></div>");
}
echo("</div>");
echo("<div style=' margin-bottom: 5px;'>");
if ($ports['transit']) {
if ($ports['transit'])
{
echo("<div style='width: 235px; float: left;'>
<a href='iftype/transit/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['transit']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Internet Transit</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['transit'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
}
if ($ports['peering']) {
if ($ports['peering'])
{
echo("<div style='width: 235px; float: right;'>
<a href='iftype/peering/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['peering']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Internet Peering</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['peering'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
}
if ($ports['core']) {
if ($ports['core'])
{
echo("<div style='width: 235px;'>
<a href='iftype/core/' onmouseover=\"return overlib('\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['core']."&amp;from=".$day."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['core']."&amp;from=".$week."&amp;to=".$now."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['core']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
<img src=\'graph.php?type=multiport_bits&amp;id=".$ports['core']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 16px; font-weight: bold; color: #555555;'>Core Traffic</div>".
"<img src='graph.php?type=multiport_bits&amp;id=".$ports['core'].
"&amp;from=".$day."&amp;to=".$now."&amp;width=385&amp;height=100&amp;legend=no'></a></div>");
"&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=385&amp;height=100&amp;legend=no'></a></div>");
}
echo("</div>");
+1 -1
View File
@@ -56,7 +56,7 @@ if (!$auth)
$graph_array['height'] = "60";
$graph_array['width'] = $thumb_width;
$graph_array['legend'] = "no";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
print_optionbar_start();
echo($title);
+10 -10
View File
@@ -20,10 +20,10 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
$text_descr = $mempool['mempool_descr'];
$mempool_url = "device/device=".$mempool['device_id']."/tab=health/metric=mempool/";
$mini_url = "graph.php?id=".$mempool['mempool_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mini_url = "graph.php?id=".$mempool['mempool_id']."&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=125\'>";
$mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
$total = formatStorage($mempool['mempool_total']);
@@ -46,17 +46,17 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
{
echo("<tr></tr><tr class='health'><td colspan=5>");
$daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=400&amp;height=150";
$daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$weekly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=211&amp;height=100";
$weekly_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=400&amp;height=150";
$weekly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$weekly_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$monthly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=211&amp;height=100";
$monthly_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=150";
$monthly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$monthly_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$yearly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=211&amp;height=100";
$yearly_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=400&amp;height=150";
$yearly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$yearly_url = "graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
echo("<a onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT);\" onmouseout=\"return nd();\">
<img src='$daily_graph' border=0></a> ");
+10 -10
View File
@@ -27,10 +27,10 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
$proc_url = "device/".$device['device_id']."/health/processor/";
$mini_url = "graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f400";
$mini_url = "graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=80&amp;height=20&amp;bg=f4f4f400";
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=125\'>";
$proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
$perc = round($proc['processor_usage']);
@@ -50,17 +50,17 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
{
echo(' <tr></tr><tr class="health"><td colspan="5">');
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=400&amp;height=150";
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=211&amp;height=100";
$weekly_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=400&amp;height=150";
$weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$weekly_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=211&amp;height=100";
$monthly_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=150";
$monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$monthly_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=211&amp;height=100";
$yearly_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=400&amp;height=150";
$yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$yearly_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
echo(" <a onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT);\" onmouseout=\"return nd();\">
<img src=\"$daily_graph\" border=\"0\"></a> ");
+14 -14
View File
@@ -38,16 +38,16 @@ foreach (dbFetchRows($sql, $param) as $sensor)
if ($sensor['sensor_current'] >= $sensor['sensor_limit']) { $alert = '<img src="images/16/flag_red.png" alt="alert" />'; } else { $alert = ""; }
}
$weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=500&amp;height=150";
$weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150";
$sensor_popup = "<a href=\"graphs/id=" . $sensor['sensor_id'] . "/type=".$graph_type."/\" onmouseover=\"return overlib('<img src=\'$weekly_sensor\'>', LEFT);\" onmouseout=\"return nd();\">
" . $sensor['sensor_descr'] . "</a>";
$sensor_day = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=300&amp;height=100";
$sensor_week = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=300&amp;height=100";
$sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=300&amp;height=100";
$sensor_year = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=300&amp;height=100";
$sensor_day = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=300&amp;height=100";
$sensor_week = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=300&amp;height=100";
$sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=300&amp;height=100";
$sensor_year = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['year']."&amp;to=".$config['time']['now']."&amp;width=300&amp;height=100";
$sensor_minigraph = "<img src='graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=100&amp;height=20&amp;bg=ffffff00'";
$sensor_minigraph = "<img src='graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=100&amp;height=20&amp;bg=ffffff00'";
$sensor_minigraph .= " onmouseover=\"return overlib('<div class=list-large>".$sensor['hostname']." - ".mres($sensor['sensor_descr']);
$sensor_minigraph .= "</div><div style=\'width: 750px\'><img src=\'$sensor_day\'><img src=\'$sensor_week\'><img src=\'$sensor_month\'><img src=\'$sensor_year\'></div>', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\" >";
@@ -65,17 +65,17 @@ foreach (dbFetchRows($sql, $param) as $sensor)
{
echo("<tr></tr><tr class='health'><td colspan=7>");
$daily_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=400&amp;height=150";
$daily_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$weekly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=211&amp;height=100";
$weekly_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$week&amp;to=$now&amp;width=400&amp;height=150";
$weekly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$weekly_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$monthly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=211&amp;height=100";
$monthly_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=150";
$monthly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$monthly_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
$yearly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=211&amp;height=100";
$yearly_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=$year&amp;to=$now&amp;width=400&amp;height=150";
$yearly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=211&amp;height=100";
$yearly_url = "graph.php?id=" . $sensor['sensor_id'] . "&amp;type=".$graph_type."&amp;from=".$config['time']['yearh']."&amp;to=".$config['time']['now']."&amp;width=400&amp;height=150";
echo("<a onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT);\" onmouseout=\"return nd();\">
<img src='$daily_graph' border=0></a> ");
+2 -2
View File
@@ -27,10 +27,10 @@ foreach ($ports as $port)
$graph_array = array();
$graph_array['height'] = 100;
$graph_array['width'] = 210;
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $port['interface_id'];
$graph_array['type'] = $graph_type;
$graph_array['from'] = $day;
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$link_array = $graph_array;
+4 -4
View File
@@ -58,8 +58,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I, devices AS D W
{
$pw_a['width'] = "150";
$pw_a['height'] = "30";
$pw_a['from'] = $day;
$pw_a['to'] = $now;
$pw_a['from'] = $config['time']['day'];
$pw_a['to'] = $config['time']['now'];
$pw_a['bg'] = $bg;
$types = array('bits','upkts','errors');
foreach ($types as $graph_type)
@@ -74,8 +74,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I, devices AS D W
{
$pw_b['width'] = "150";
$pw_b['height'] = "30";
$pw_b['from'] = $day;
$pw_b['to'] = $now;
$pw_b['from'] = $config['time']['day'];
$pw_b['to'] = $config['time']['now'];
$pw_b['bg'] = $bg;
$types = array('bits','upkts','errors');
foreach ($types as $graph_type)
+3 -3
View File
@@ -167,11 +167,11 @@ else
// display overlib graphs
$graph_type = "bgp_updates";
$local_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150&&afi=ipv4&safi=unicast";
$local_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150&&afi=ipv4&safi=unicast";
$localaddresslink = "<span class=list-large><a href='device/device=" . $peer['device_id'] . "/tab=routing/proto=bgp/' onmouseover=\"return overlib('<img src=\'$local_daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpLocalAddr'] . "</a></span>";
$graph_type = "bgp_updates";
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150";
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=500&amp;height=150";
$peeraddresslink = "<span class=list-large><a href='device/device=" . $peer['device_id'] . "/tab=routing/proto=bgp/' onmouseover=\"return overlib('<img src=\'$peer_daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . "</a></span>";
echo('<tr class="bgp"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') . ($peer['disabled'] ? ' bordercolor="#cccccc"' : '') . ">");
@@ -235,7 +235,7 @@ else
{
$graph_array['height'] = "100";
$graph_array['width'] = "218";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
echo('<tr></tr><tr class="bgp"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="9">');
include("includes/print-graphrow.inc.php");
+2 -2
View File
@@ -100,8 +100,8 @@ if($_GET['optb'] == "all" ) {
case 'errors':
$port['width'] = "130";
$port['height'] = "30";
$port['from'] = $day;
$port['to'] = $now;
$port['from'] = $config['time']['day'];
$port['to'] = $config['time']['now'];
$port['bg'] = "#".$bg;
$port['graph_type'] = "port_".$_GET['optc'];
echo("<div style='display: block; padding: 3px; margin: 3px; min-width: 135px; max-width:135px; min-height:75px; max-height:75px;
+1 -1
View File
@@ -52,7 +52,7 @@ if ($_SESSION['userlevel'] >= '5')
{
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $service['service_id'];
$graph_array['type'] = "service_availability";