mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@2340 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -35,7 +35,7 @@ if ($port_details)
|
||||
echo("$break <a class=interface-desc href=\"javascript:popUp('netcmd.php?cmd=whois&query=".$ip['ipv4_address']."')\">".$ip['ipv4_address']."/".$ip['ipv4_prefixlen']."</a>");
|
||||
$break = ",";
|
||||
}
|
||||
foreach (dbFetchRows("SELECT * FROM `ipv6_addresses` WHERE `interface_id` = ?", array($interface['interface_id']) as $ip6);
|
||||
foreach (dbFetchRows("SELECT * FROM `ipv6_addresses` WHERE `interface_id` = ?", array($interface['interface_id'])) as $ip6);
|
||||
{
|
||||
echo("$break <a class=interface-desc href=\"javascript:popUp('netcmd.php?cmd=whois&query=".$ip6['ipv6_address']."')\">".Net_IPv6::compress($ip6['ipv6_address'])."/".$ip6['ipv6_prefixlen']."</a>");
|
||||
$break = ",";
|
||||
@@ -44,48 +44,48 @@ if ($port_details)
|
||||
|
||||
echo("</span>");
|
||||
|
||||
$width="120"; $height="40"; $from = $day;
|
||||
$width="120"; $height="40"; $from = $config['time']['day'];
|
||||
|
||||
echo("</td><td width=135>");
|
||||
echo(formatRates($interface['ifInOctets_rate'] * 8)." <img class='optionicon' src='images/icons/arrow_updown.png' /> ".formatRates($interface['ifOutOctets_rate'] * 8));
|
||||
echo("<br />");
|
||||
$interface['graph_type'] = "port_bits";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$config['time']['now']."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
echo("</td><td width=135>");
|
||||
echo("".formatRates($interface['adslAturChanCurrTxRate']) . "/". formatRates($interface['adslAtucChanCurrTxRate']));
|
||||
echo("<br />");
|
||||
$interface['graph_type'] = "port_adsl_speed";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$config['time']['now']."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
echo("</td><td width=135>");
|
||||
echo("".formatRates($interface['adslAturCurrAttainableRate']) . "/". formatRates($interface['adslAtucCurrAttainableRate']));
|
||||
echo("<br />");
|
||||
$interface['graph_type'] = "port_adsl_attainable";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$config['time']['now']."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
echo("</td><td width=135>");
|
||||
echo("".$interface['adslAturCurrAtn'] . "dB/". $interface['adslAtucCurrAtn'] . "dB");
|
||||
echo("<br />");
|
||||
$interface['graph_type'] = "port_adsl_attenuation";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$config['time']['now']."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
echo("</td><td width=135>");
|
||||
echo("".$interface['adslAturCurrSnrMgn'] . "dB/". $interface['adslAtucCurrSnrMgn'] . "dB");
|
||||
echo("<br />");
|
||||
$interface['graph_type'] = "port_adsl_snr";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$config['time']['now']."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
echo("</td><td width=135>");
|
||||
echo("".$interface['adslAturCurrOutputPwr'] . "dBm/". $interface['adslAtucCurrOutputPwr'] . "dBm");
|
||||
echo("<br />");
|
||||
$interface['graph_type'] = "port_adsl_power";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=".$interface['graph_type']."&id=".$interface['interface_id']."&from=".$from."&to=".$config['time']['now']."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
# if ($interface[ifDuplex] != unknown) { echo("<span class=box-desc>Duplex " . $interface['ifDuplex'] . "</span>"); } else { echo("-"); }
|
||||
@@ -103,41 +103,4 @@ str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||
|
||||
echo("</td>");
|
||||
|
||||
if ($graph_type == "etherlike")
|
||||
{
|
||||
$graph_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/etherlike-". safename($interface['ifIndex']) . ".rrd";
|
||||
} else {
|
||||
$graph_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/". safename($interface['ifIndex']) . ".rrd";
|
||||
}
|
||||
|
||||
if ($graph_type && is_file($graph_file))
|
||||
{
|
||||
$type = $graph_type;
|
||||
|
||||
$daily_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$from&to=$now&width=210&height=100";
|
||||
$daily_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$from&to=$now&width=500&height=150";
|
||||
|
||||
$weekly_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$week&to=$now&width=210&height=100";
|
||||
$weekly_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$week&to=$now&width=500&height=150";
|
||||
|
||||
$monthly_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$month&to=$now&width=210&height=100";
|
||||
$monthly_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$month&to=$now&width=500&height=150";
|
||||
|
||||
$yearly_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$year&to=$now&width=210&height=100";
|
||||
$yearly_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$year&to=$now&width=500&height=150";
|
||||
|
||||
echo("<tr style='background-color: $bg; padding: 5px;'><td colspan=7>");
|
||||
|
||||
echo("<a href='device/" . $interface['device_id'] . "/port/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\"
|
||||
onmouseout=\"return nd();\"> <img src='$daily_traffic' border=0></a>");
|
||||
echo("<a href='device/" . $interface['device_id'] . "/port/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT".$config['overlib_defaults'].");\"
|
||||
onmouseout=\"return nd();\"> <img src='$weekly_traffic' border=0></a>");
|
||||
echo("<a href='device/" . $interface['device_id'] . "/port/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT, WIDTH, 350".$config['overlib_defaults'].");\"
|
||||
onmouseout=\"return nd();\"> <img src='$monthly_traffic' border=0></a>");
|
||||
echo("<a href='device/" . $interface['device_id'] . "/port/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT, WIDTH, 350".$config['overlib_defaults'].");\"
|
||||
onmouseout=\"return nd();\"> <img src='$yearly_traffic' border=0></a>");
|
||||
|
||||
echo("</td></tr>");
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user