more time period corrections

git-svn-id: http://www.observium.org/svn/observer/trunk@3145 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-05-06 23:10:09 +00:00
parent 7e96d87022
commit 96884a1baf
3 changed files with 22 additions and 22 deletions

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=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=" .$config['time']['twoday']."&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=".$config['time']['now']."&amp;width=132&amp;height=40&amp;legend=no'>
"<img src='graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=".$config['time']['twoday']."&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>");

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=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=".$config['time']['twoday']."&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=".$config['time']['now']."&amp;width=132&amp;height=40&amp;legend=no'>
"<img src='graph.php?type=$graph_type&amp;id=".$port['interface_id']."&amp;from=".$config['time']['twoday']."&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>");

View File

@ -34,73 +34,73 @@ if ($vars['subview'] == "top10")
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Day</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => '1day'))."'>
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => 'day'))."'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id'].
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=-1day&amp;to=now&amp;width=150&amp;height=50' />
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Two Day</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => '2day'))."/'>
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => 'twoday'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id'].
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=-2day&amp;to=now&amp;width=150&amp;height=50' />
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=".$config['time']['twoday']."&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Week</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => '1week'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=-1week&amp;to=now&amp;width=150&amp;height=50' />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => 'week'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=".$config['time']['week']."&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Month</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => '1month'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=-1month&amp;to=now&amp;width=150&amp;height=50' />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => 'month'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=".$config['time']['month']."&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Year</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => '1year'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=-1year&amp;to=now&amp;width=150&amp;height=50' />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => $vars['sort'], 'period' => 'year'))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=".$config['time']['year']."&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
</div>
<div style='float: left;'>
<img src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=$from&amp;to=now&amp;width=745&amp;height=300' />
<img src='graph.php?id=".$port['interface_id']."&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;stat=".$vars['graph']."&amp;from=$from&amp;to=".$config['time']['now']."&amp;width=745&amp;height=300' />
</div>
<div style=' margin:0px; float: left;';>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Traffic</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>'bits', sort => $vars['sort'], 'period' => $vars['period']))."'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;stat=bits&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=$from&amp;to=now&amp;width=150&amp;height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;stat=bits&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=$from&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Packets</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>'pkts', sort => $vars['sort'], 'period' => $vars['period']))."/'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;stat=pkts&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=$from&amp;to=now&amp;width=150&amp;height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id']."&amp;stat=pkts&amp;type=port_mac_acc_total&amp;sort=".$vars['sort']."&amp;from=$from&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Top Input</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => 'in', 'period' => $vars['period']))."'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id'].
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=in&amp;from=$from&amp;to=now&amp;width=150&amp;height=50' />
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=in&amp;from=$from&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Top Output</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => 'out', 'period' => $vars['period']))."'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id'].
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=out&amp;from=$from&amp;to=now&amp;width=150&amp;height=50' />
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=out&amp;from=$from&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Top Aggregate</span><br />
<a href='".generate_url($link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>$vars['graph'], sort => 'both', 'period' => $vars['period']))."'>
<img style='border: #5e5e5e 2px;' valign=middle src='graph.php?id=".$port['interface_id'].
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=both&amp;from=$from&amp;to=now&amp;width=150&amp;height=50' />
"&amp;stat=".$vars['graph']."&amp;type=port_mac_acc_total&amp;sort=both&amp;from=$from&amp;to=".$config['time']['now']."&amp;width=150&amp;height=50' />
</a>
</div>
</div>
@ -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=".$config['time']['now']."&amp;width=450&amp;height=150\'>\
<img src=\'graph.php?id=" . $acc['ma_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['twoday']."&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=".$config['time']['now']."&amp;width=213&amp;height=45'></a>
<img src='graph.php?id=" . $acc['ma_id'] . "&amp;type=$graph_type&amp;from=".$config['time']['twoday']."&amp;to=".$config['time']['now']."&amp;width=213&amp;height=45'></a>
<span style='font-size: 10px;'>".$name."</span>
</div>");