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:
@@ -13,12 +13,18 @@ function get_percentage_colours($percentage)
|
||||
|
||||
}
|
||||
|
||||
function generate_device_url($device, $linksuffix="")
|
||||
{
|
||||
return "device/" . $device['device_id'] . "/" . $linksuffix;
|
||||
}
|
||||
|
||||
function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0)
|
||||
{
|
||||
global $twoday, $day, $now, $config;
|
||||
global $config;
|
||||
|
||||
if (!$start) { $start = $config['time']['day']; }
|
||||
if (!$end) { $end = $config['time']['now']; }
|
||||
|
||||
if (!$start) { $start = $day; }
|
||||
if (!$end) { $end = $now; }
|
||||
$class = devclass($device);
|
||||
if (!$text) { $text = $device['hostname']; }
|
||||
|
||||
@@ -35,7 +41,7 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
|
||||
$graphs = $config['os']['default']['over'];
|
||||
}
|
||||
|
||||
$url = "device/" . $device['device_id'] . "/" . $linksuffix;
|
||||
$url = generate_device_url($device, $linksuffix);
|
||||
$contents = "<div class=list-large>".$device['hostname'];
|
||||
if ($device['hardware']) { $contents .= " - ".$device['hardware']; }
|
||||
$contents .= "</div>";
|
||||
@@ -55,7 +61,7 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
|
||||
$contents .= '<div style="width: 708px">';
|
||||
$contents .= '<span style="margin-left: 5px; font-size: 12px; font-weight: bold;">'.$graphhead.'</span><br />';
|
||||
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&from=$start&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&from=".$config['week']."&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&from=".$config['time']['week']."&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= '</div>';
|
||||
}
|
||||
|
||||
@@ -95,13 +101,13 @@ function generate_graph_popup($graph_array)
|
||||
$graph_array['legend'] = "yes";
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "340";
|
||||
$graph_array['from'] = $config['day'];
|
||||
$graph_array['from'] = $config['time']['day'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$graph_array['from'] = $config['week'];
|
||||
$graph_array['from'] = $config['time']['week'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$graph_array['from'] = $config['month'];
|
||||
$graph_array['from'] = $config['time']['month'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$graph_array['from'] = $config['year'];
|
||||
$graph_array['from'] = $config['time']['year'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$content .= "</div>";
|
||||
|
||||
@@ -236,7 +242,7 @@ function print_percentage_bar($width, $height, $percent, $left_text, $left_colou
|
||||
|
||||
function generate_port_link($args, $text = NULL, $type = NULL)
|
||||
{
|
||||
global $twoday, $now, $config, $day, $month;
|
||||
global $config;
|
||||
|
||||
$args = ifNameDescr($args);
|
||||
if (!$text) { $text = fixIfName($args['label']); }
|
||||
@@ -253,19 +259,19 @@ function generate_port_link($args, $text = NULL, $type = NULL)
|
||||
$graph_array['legend'] = "yes";
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "340";
|
||||
$graph_array['to'] = $config['now'];
|
||||
$graph_array['from'] = $config['day'];
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['from'] = $config['time']['day'];
|
||||
$graph_array['id'] = $args['interface_id'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$graph_array['from'] = $config['week'];
|
||||
$graph_array['from'] = $config['time']['week'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$graph_array['from'] = $config['month'];
|
||||
$graph_array['from'] = $config['time']['month'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$graph_array['from'] = $config['year'];
|
||||
$graph_array['from'] = $config['time']['year'];
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$content .= "</div>";
|
||||
|
||||
$url = "device/".$args['device_id']."/port/" . $args['interface_id'] . "/";
|
||||
$url = generate_port_url($args);
|
||||
|
||||
if (port_permitted($args['interface_id'])) {
|
||||
return overlib_link($url, $text, $content, $class);
|
||||
@@ -274,6 +280,10 @@ function generate_port_link($args, $text = NULL, $type = NULL)
|
||||
}
|
||||
}
|
||||
|
||||
function generate_port_url($args) {
|
||||
return $url = "device/".$args['device_id']."/port/" . $args['interface_id'] . "/";
|
||||
}
|
||||
|
||||
function generate_port_thumbnail($args)
|
||||
{
|
||||
if (!$args['bg']) { $args['bg'] = "FFFFF"; }
|
||||
|
||||
@@ -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>");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -4,10 +4,10 @@ global $config;
|
||||
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "215";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['id'] = $interface['interface_id'];
|
||||
$graph_array['type'] = $graph_type;
|
||||
|
||||
include("includes/print-quadgraphs.inc.php");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -59,11 +59,11 @@ echo("</td><td width=100>");
|
||||
if ($port_details)
|
||||
{
|
||||
$interface['graph_type'] = "port_bits";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=port_bits&id=".$interface['interface_id']."&from=".$day."&to=".$now."&width=100&height=20&legend=no&bg=".str_replace("#","", $row_colour)."'>"));
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=port_bits&id=".$interface['interface_id']."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=100&height=20&legend=no&bg=".str_replace("#","", $row_colour)."'>"));
|
||||
$interface['graph_type'] = "port_upkts";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=port_upkts&id=".$interface['interface_id']."&from=".$day."&to=".$now."&width=100&height=20&legend=no&bg=".str_replace("#","", $row_colour)."'>"));
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=port_upkts&id=".$interface['interface_id']."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=100&height=20&legend=no&bg=".str_replace("#","", $row_colour)."'>"));
|
||||
$interface['graph_type'] = "port_errors";
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=port_errors&id=".$interface['interface_id']."&from=".$day."&to=".$now."&width=100&height=20&legend=no&bg=".str_replace("#","", $row_colour)."'>"));
|
||||
echo(generate_port_link($interface, "<img src='graph.php?type=port_errors&id=".$interface['interface_id']."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=100&height=20&legend=no&bg=".str_replace("#","", $row_colour)."'>"));
|
||||
}
|
||||
|
||||
echo("</td><td width=120>");
|
||||
@@ -259,31 +259,10 @@ if ($graph_type && is_file($graph_file))
|
||||
{
|
||||
$type = $graph_type;
|
||||
|
||||
$daily_traffic = "graph.php?id=$if_id&type=" . $graph_type . "&from=$day&to=$now&width=210&height=100";
|
||||
$daily_url = "graph.php?id=$if_id&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150";
|
||||
|
||||
$weekly_traffic = "graph.php?id=$if_id&type=" . $graph_type . "&from=$week&to=$now&width=210&height=100";
|
||||
$weekly_url = "graph.php?id=$if_id&type=" . $graph_type . "&from=$week&to=$now&width=500&height=150";
|
||||
|
||||
$monthly_traffic = "graph.php?id=$if_id&type=" . $graph_type . "&from=$month&to=$now&width=210&height=100";
|
||||
$monthly_url = "graph.php?id=$if_id&type=" . $graph_type . "&from=$month&to=$now&width=500&height=150";
|
||||
|
||||
$yearly_traffic = "graph.php?id=$if_id&type=" . $graph_type . "&from=$year&to=$now&width=210&height=100";
|
||||
$yearly_url = "graph.php?id=$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("<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>");
|
||||
|
||||
include("includes/print-interface-graphs.inc.php");
|
||||
|
||||
# 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>");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$service_alerts = dbFetchCell("SELECT COUNT(service_id) FROM services WHERE service_status = '0'");
|
||||
$if_alerts = dbFetchCell("SELECT count(*) FROM `ports` WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND `ignore` = '0'");
|
||||
$if_alerts = dbFetchCell("SELECT COUNT(interface_id) FROM `ports` WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND `ignore` = '0'");
|
||||
|
||||
$device_alerts = "0";
|
||||
$device_alert_sql = "WHERE 0";
|
||||
@@ -16,8 +16,11 @@ foreach (dbFetchRows("SELECT * FROM `devices`") as $device)
|
||||
$this_alert = 0;
|
||||
if ($device['status'] == 0 && $device['ignore'] == '0') { $this_alert = "1"; } elseif ($device['ignore'] == '0')
|
||||
{
|
||||
if (dbFetchCell("SELECT count(service_id) FROM services WHERE service_status = '0' AND device_id = ?", array($device['device_id']))) { $this_alert = "1"; }
|
||||
if (dbFetchCell("SELECT count(*) FROM ports WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND device_id = ? AND `ignore` = '0'", array($device['device_id']))) { $this_alert = "1"; }
|
||||
|
||||
## sluggish. maybe we cache this at poll-time?
|
||||
|
||||
# if (dbFetchCell("SELECT count(service_id) FROM services WHERE service_status = '0' AND device_id = ?", array($device['device_id']))) { $this_alert = "1"; }
|
||||
# if (dbFetchCell("SELECT count(*) FROM ports WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND device_id = ? AND `ignore` = '0'", array($device['device_id']))) { $this_alert = "1"; }
|
||||
}
|
||||
if ($this_alert)
|
||||
{
|
||||
|
||||
@@ -5,18 +5,18 @@ global $config;
|
||||
if(!$graph_array['height']) { $graph_array['height'] = "100"; }
|
||||
if(!$graph_array['width']) { $graph_array['width'] = "215"; }
|
||||
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
|
||||
$periods = array('day', 'week', 'month', 'year');
|
||||
|
||||
foreach ($periods as $period)
|
||||
{
|
||||
$graph_array['from'] = $config[$period];
|
||||
$graph_array['from'] = $config['time'][$period];
|
||||
$graph_array_zoom = $graph_array;
|
||||
$graph_array_zoom['height'] = "150";
|
||||
$graph_array_zoom['width'] = "400";
|
||||
|
||||
$link = "graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['now'] . "/";
|
||||
$link = "graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['to'] . "/";
|
||||
|
||||
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ if ($service['service_checked'])
|
||||
$checked = formatUptime($checked);
|
||||
} else { $checked = "Never"; }
|
||||
|
||||
$mini_url = "graph.php?id=".$service['service_id']."&type=service_availability&from=".$day."&to=".$now."&width=80&height=20&bg=efefef";
|
||||
$mini_url = "graph.php?id=".$service['service_id']."&type=service_availability&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=efefef";
|
||||
|
||||
$popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$service['service_type'];
|
||||
$popup .= "</div><img src=\'graph.php?id=" . $service['service_id'] . "&type=service_availability&from=$day&to=$now&width=400&height=125\'>";
|
||||
$popup .= "</div><img src=\'graph.php?id=" . $service['service_id'] . "&type=service_availability&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=125\'>";
|
||||
$popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
||||
|
||||
echo("
|
||||
@@ -59,4 +59,4 @@ echo("
|
||||
|
||||
$i++;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user