mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
change more tables to css colouring, some more to do but not for now...
git-svn-id: http://www.observium.org/svn/observer/trunk@3020 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -408,6 +408,14 @@ A.purple:visited, a.purple, .purple { color: #740074; }
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr.device-overview:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.device-overview:nth-child(even) {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
a.list-device, a.list-device-ignored, a.list-device-down, a.list-device-ignored-up, a.list-device-disabled {
|
a.list-device, a.list-device-ignored, a.list-device-down, a.list-device-ignored-up, a.list-device-disabled {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -1364,6 +1372,75 @@ a.interface-upup:hover, a.interface-updown:hover, a.interface-admindown:hover {
|
|||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr.iftype:nth-child(odd) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.iftype:nth-child(even) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.health:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.ports:nth-child(even) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.bgp:nth-child(even) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.locations:nth-child(even) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.locations:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.inventory:nth-child(even) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.inventory:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.list:nth-child(odd) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.list:nth-child(even) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.eventlog:nth-child(even) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.eventlog:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.syslog:nth-child(even) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.syslog:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.search:nth-child(even) {
|
||||||
|
background: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.search:nth-child(odd) {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.paddedcell {
|
.paddedcell {
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
$graph_array['type'] = $graph_type;
|
$graph_array['type'] = $graph_type;
|
||||||
$graph_array['id'] = $device['device_id'];
|
$graph_array['id'] = $device['device_id'];
|
||||||
|
|
||||||
$g_i++;
|
# FIXME not css alternating yet
|
||||||
if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
|
|
||||||
echo('<div style="background-color: '.$row_colour.';">');
|
echo('<div style="background-color: '.$row_colour.';">');
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (isset($bg) && $bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
|
||||||
|
|
||||||
$hostname = gethostbyid($entry['host']);
|
$hostname = gethostbyid($entry['host']);
|
||||||
|
|
||||||
unset($icon);
|
unset($icon);
|
||||||
@@ -9,7 +7,7 @@ unset($icon);
|
|||||||
$icon = geteventicon($entry['message']);
|
$icon = geteventicon($entry['message']);
|
||||||
if ($icon) { $icon = '<img src="images/16/' . $icon . '" />'; }
|
if ($icon) { $icon = '<img src="images/16/' . $icon . '" />'; }
|
||||||
|
|
||||||
echo('<tr style="background-color: ' . $bg . '">
|
echo('<tr class="eventlog">
|
||||||
<td width="0"></td>
|
<td width="0"></td>
|
||||||
<td class="syslog" width="160">
|
<td class="syslog" width="160">
|
||||||
' . $entry['datetime'] . '
|
' . $entry['datetime'] . '
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
if (device_permitted($entry['device_id']))
|
if (device_permitted($entry['device_id']))
|
||||||
{
|
{
|
||||||
$syslog_iter++;
|
echo("<tr class=\"syslog\">
|
||||||
if (!is_integer($syslog_iter/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
echo("<tr style=\"background-color: $bg_colour\">
|
|
||||||
<td width=0></td>");
|
<td width=0></td>");
|
||||||
|
|
||||||
$entry['hostname'] = shorthost($entry['hostname'], 20);
|
$entry['hostname'] = shorthost($entry['hostname'], 20);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
|
echo('<tr class="list">');
|
||||||
|
|
||||||
echo('<tr bgcolor="' . $bg_colour . '">');
|
|
||||||
|
|
||||||
echo('<td class="list">');
|
echo('<td class="list">');
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ if ($vars['purge'] == "all")
|
|||||||
echo("<div class=infobox>Deleted ".generate_device_link($interface)." - ".generate_port_link($interface)."</div>");
|
echo("<div class=infobox>Deleted ".generate_device_link($interface)." - ".generate_port_link($interface)."</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$i_deleted = 1;
|
|
||||||
|
|
||||||
echo("<table cellpadding=5 cellspacing=0 border=0 width=100%>");
|
echo("<table cellpadding=5 cellspacing=0 border=0 width=100%>");
|
||||||
echo("<tr><td></td><td></td><td></td><td><a href='deleted-ports/purge=all/'><img src='images/16/cross.png' align=absmiddle></img> Purge All</a></td></tr>");
|
echo("<tr><td></td><td></td><td></td><td><a href='deleted-ports/purge=all/'><img src='images/16/cross.png' align=absmiddle></img> Purge All</a></td></tr>");
|
||||||
|
|
||||||
@@ -29,15 +27,11 @@ foreach (dbFetchRows("SELECT * FROM `ports` AS P, `devices` as D WHERE P.`delete
|
|||||||
$interface = ifLabel($interface, $interface);
|
$interface = ifLabel($interface, $interface);
|
||||||
if (port_permitted($interface['interface_id'], $interface['device_id']))
|
if (port_permitted($interface['interface_id'], $interface['device_id']))
|
||||||
{
|
{
|
||||||
if (is_integer($i_deleted/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
echo("<tr class=list">);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>");
|
|
||||||
echo("<td width=250>".generate_device_link($interface)."</td>");
|
echo("<td width=250>".generate_device_link($interface)."</td>");
|
||||||
echo("<td width=250>".generate_port_link($interface)."</td>");
|
echo("<td width=250>".generate_port_link($interface)."</td>");
|
||||||
echo("<td></td>");
|
echo("<td></td>");
|
||||||
echo("<td width=100><a href='deleted-ports/purge=".$interface['interface_id']."/'><img src='images/16/cross.png' align=absmiddle></img> Purge</a></td>");
|
echo("<td width=100><a href='deleted-ports/purge=".$interface['interface_id']."/'><img src='images/16/cross.png' align=absmiddle></img> Purge</a></td>");
|
||||||
|
|
||||||
$i_deleted++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
echo('<table width="100%">');
|
echo('<table width="100%">');
|
||||||
|
|
||||||
|
# FIXME missing heading
|
||||||
|
|
||||||
foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `hrDeviceIndex`", array($device['device_id'])) as $hrdevice)
|
foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `hrDeviceIndex`", array($device['device_id'])) as $hrdevice)
|
||||||
{
|
{
|
||||||
echo("<tr><td>".$hrdevice['hrDeviceIndex']."</td>");
|
echo("<tr class='list'><td>".$hrdevice['hrDeviceIndex']."</td>");
|
||||||
|
|
||||||
if ($hrdevice['hrDeviceType'] == "hrDeviceProcessor")
|
if ($hrdevice['hrDeviceType'] == "hrDeviceProcessor")
|
||||||
{
|
{
|
||||||
@@ -56,8 +58,8 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h
|
|||||||
echo("<td></td>");
|
echo("<td></td>");
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("<td>".$hrdevice['hrDeviceType']."</td><td>".$hrdevice['hrDeviceStatus']."</td>");
|
echo("<td>".$hrdevice['hrDeviceType'].'</td><td>'.$hrdevice['hrDeviceStatus']."</td>");
|
||||||
echo("<td>".$hrdevice['hrDeviceErrors']."</td><td>".$hrdevice['hrProcessorLoad']."</td>");
|
echo("<td>".$hrdevice['hrDeviceErrors'].'</td><td>'.$hrdevice['hrProcessorLoad']."</td>");
|
||||||
echo("</tr>");
|
echo("</tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,9 @@ echo("<p style='padding: 0px 5px 5px;' class=sectionhead>");
|
|||||||
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=mempool/">');
|
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=mempool/">');
|
||||||
echo("<img align='absmiddle' src='images/16/arrow_switch.png'> Catalyst 6k Crossbar</a></p>");
|
echo("<img align='absmiddle' src='images/16/arrow_switch.png'> Catalyst 6k Crossbar</a></p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$c6kxbar_rows = '0';
|
|
||||||
|
|
||||||
foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
|
foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
|
||||||
{
|
{
|
||||||
if (is_integer($c6kxbar_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
// FIXME i'm not sure if this is the correct way to decide what entphysical index it is. slotnum+1? :>
|
// FIXME i'm not sure if this is the correct way to decide what entphysical index it is. slotnum+1? :>
|
||||||
$entity = dbFetchRow("SELECT * FROM entPhysical WHERE device_id = ? AND entPhysicalIndex = ?", array($device['device_id'], $index+1));
|
$entity = dbFetchRow("SELECT * FROM entPhysical WHERE device_id = ? AND entPhysicalIndex = ?", array($device['device_id'], $index+1));
|
||||||
|
|
||||||
@@ -73,11 +70,11 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
|
|||||||
|
|
||||||
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
|
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
|
||||||
|
|
||||||
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = $graph_colour;
|
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
|
||||||
|
|
||||||
$minigraph = generate_graph_tag($graph_array);
|
$minigraph = generate_graph_tag($graph_array);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class=device-overview>
|
||||||
<td width=10></td>
|
<td width=10></td>
|
||||||
<td width=200><strong>Fabric ".$subindex."</strong></td>
|
<td width=200><strong>Fabric ".$subindex."</strong></td>
|
||||||
<td><span style='font-weight: bold;' class=".$fabric['mode_class'].">".
|
<td><span style='font-weight: bold;' class=".$fabric['mode_class'].">".
|
||||||
@@ -90,8 +87,6 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
|
|||||||
</tr>");
|
</tr>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$c6kxbar_rows++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -6,12 +6,9 @@ if (count($sensors))
|
|||||||
{
|
{
|
||||||
echo('<div style="background-color: #eeeeee; margin: 5px; padding: 5px;">');
|
echo('<div style="background-color: #eeeeee; margin: 5px; padding: 5px;">');
|
||||||
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=' . strtolower($sensor_type) . '/"><img align="absmiddle" src="images/icons/' . strtolower($sensor_type) . '.png"> ' . $sensor_type . '</a></p>');
|
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=' . strtolower($sensor_type) . '/"><img align="absmiddle" src="images/icons/' . strtolower($sensor_type) . '.png"> ' . $sensor_type . '</a></p>');
|
||||||
$i = '0';
|
|
||||||
echo('<table width="100%" valign="top">');
|
echo('<table width="100%" valign="top">');
|
||||||
foreach ($sensors as $sensor)
|
foreach ($sensors as $sensor)
|
||||||
{
|
{
|
||||||
if (is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
### FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
|
### FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
|
||||||
|
|
||||||
### FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-quadgraphs"?
|
### FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-quadgraphs"?
|
||||||
@@ -40,18 +37,17 @@ if (count($sensors))
|
|||||||
}
|
}
|
||||||
$overlib_content .= "</div>";
|
$overlib_content .= "</div>";
|
||||||
|
|
||||||
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = $graph_colour;
|
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
|
||||||
$graph_array['from'] = $config['time']['day'];
|
$graph_array['from'] = $config['time']['day'];
|
||||||
$sensor_minigraph = generate_graph_tag($graph_array);
|
$sensor_minigraph = generate_graph_tag($graph_array);
|
||||||
|
|
||||||
$sensor['sensor_descr'] = truncate($sensor['sensor_descr'], 48, '');
|
$sensor['sensor_descr'] = truncate($sensor['sensor_descr'], 48, '');
|
||||||
echo("<tr bgcolor='$row_colour'>
|
|
||||||
|
echo("<tr class=device-overview>
|
||||||
<td class=tablehead style='padding-left:5px;'><strong>".overlib_link($link, $sensor['sensor_descr'], $overlib_content)."</strong></td>
|
<td class=tablehead style='padding-left:5px;'><strong>".overlib_link($link, $sensor['sensor_descr'], $overlib_content)."</strong></td>
|
||||||
<td width=80 align=right class=tablehead>".overlib_link($link, $sensor_minigraph, $overlib_content)."</td>
|
<td width=80 align=right class=tablehead>".overlib_link($link, $sensor_minigraph, $overlib_content)."</td>
|
||||||
<td width=80 align=right class=tablehead>".overlib_link($link, "<span " . ($sensor['sensor_current'] < $sensor['sensor_limit_low'] || $sensor['sensor_current'] > $sensor['sensor_limit'] ? "style='color: red'" : '') . '>' . $sensor['sensor_current'] . $sensor_unit . "</span>", $overlib_content)."</td>
|
<td width=80 align=right class=tablehead>".overlib_link($link, "<span " . ($sensor['sensor_current'] < $sensor['sensor_limit_low'] || $sensor['sensor_current'] > $sensor['sensor_limit'] ? "style='color: red'" : '') . '>' . $sensor['sensor_current'] . $sensor_unit . "</span>", $overlib_content)."</td>
|
||||||
</tr>");
|
</tr>");
|
||||||
$i++;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ if (count($mempools))
|
|||||||
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=mempool/">');
|
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=mempool/">');
|
||||||
echo("<img align='absmiddle' src='images/icons/memory.png'> Memory Pools</a></p>");
|
echo("<img align='absmiddle' src='images/icons/memory.png'> Memory Pools</a></p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$mempool_rows = '0';
|
|
||||||
|
|
||||||
foreach ($mempools as $mempool)
|
foreach ($mempools as $mempool)
|
||||||
{
|
{
|
||||||
if (is_integer($mempool_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
$percent= round($mempool['mempool_perc'],0);
|
$percent= round($mempool['mempool_perc'],0);
|
||||||
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
||||||
$total = formatStorage($mempool['mempool_total']);
|
$total = formatStorage($mempool['mempool_total']);
|
||||||
@@ -39,18 +37,16 @@ if (count($mempools))
|
|||||||
|
|
||||||
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
|
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
|
||||||
|
|
||||||
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = $graph_colour;
|
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
|
||||||
|
|
||||||
$minigraph = generate_graph_tag($graph_array);
|
$minigraph = generate_graph_tag($graph_array);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class=device-overview>
|
||||||
<td class=tablehead>".overlib_link($link, $text_descr, $overlib_content)."</td>
|
<td class=tablehead>".overlib_link($link, $text_descr, $overlib_content)."</td>
|
||||||
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
||||||
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
||||||
</a></td>
|
</a></td>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$mempool_rows++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ $processors = dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", arra
|
|||||||
|
|
||||||
if (count($processors))
|
if (count($processors))
|
||||||
{
|
{
|
||||||
$processor_rows = 0;
|
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p style='padding: 0px 5px 5px;' class=sectionhead>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead>");
|
||||||
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=processor/">');
|
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=processor/">');
|
||||||
@@ -15,9 +14,6 @@ if (count($processors))
|
|||||||
|
|
||||||
foreach ($processors as $proc)
|
foreach ($processors as $proc)
|
||||||
{
|
{
|
||||||
if (is_integer($processor_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
## REPLACE THIS SHITTY CODE. IT IS ALSO ELSEWHERE.
|
|
||||||
|
|
||||||
$text_descr = rewrite_entity_descr($proc['processor_descr']);
|
$text_descr = rewrite_entity_descr($proc['processor_descr']);
|
||||||
|
|
||||||
# disable short hrDeviceDescr. need to make this prettier.
|
# disable short hrDeviceDescr. need to make this prettier.
|
||||||
@@ -42,17 +38,16 @@ if (count($processors))
|
|||||||
|
|
||||||
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
|
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
|
||||||
|
|
||||||
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = $graph_colour;
|
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
|
||||||
|
|
||||||
$minigraph = generate_graph_tag($graph_array);
|
$minigraph = generate_graph_tag($graph_array);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class=device-overview>
|
||||||
<td class=tablehead>".overlib_link($link, $text_descr, $overlib_content)."</td>
|
<td class=tablehead>".overlib_link($link, $text_descr, $overlib_content)."</td>
|
||||||
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
||||||
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
||||||
</a></td>
|
</a></td>
|
||||||
</tr>");
|
</tr>");
|
||||||
$processor_rows++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ if (count($drives))
|
|||||||
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=storage/">');
|
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=storage/">');
|
||||||
echo("<img align='absmiddle' src='images/icons/storage.png'> Storage</a></p>");
|
echo("<img align='absmiddle' src='images/icons/storage.png'> Storage</a></p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$drive_rows = '0';
|
|
||||||
|
|
||||||
foreach ($drives as $drive)
|
foreach ($drives as $drive)
|
||||||
{
|
{
|
||||||
@@ -41,7 +40,6 @@ if (count($drives))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($skipdrive) { continue; }
|
if ($skipdrive) { continue; }
|
||||||
if (is_integer($drive_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
$percent = round($drive['storage_perc'], 0);
|
$percent = round($drive['storage_perc'], 0);
|
||||||
$total = formatStorage($drive['storage_size']);
|
$total = formatStorage($drive['storage_size']);
|
||||||
$free = formatStorage($drive['storage_free']);
|
$free = formatStorage($drive['storage_free']);
|
||||||
@@ -64,18 +62,16 @@ if (count($drives))
|
|||||||
|
|
||||||
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $drive['storage_descr']);
|
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $drive['storage_descr']);
|
||||||
|
|
||||||
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = $graph_colour;
|
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
|
||||||
|
|
||||||
$minigraph = generate_graph_tag($graph_array);
|
$minigraph = generate_graph_tag($graph_array);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class=device-overview>
|
||||||
<td class=tablehead>".overlib_link($link, $drive['storage_descr'], $overlib_content)."</td>
|
<td class=tablehead>".overlib_link($link, $drive['storage_descr'], $overlib_content)."</td>
|
||||||
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
||||||
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
||||||
</a></td>
|
</a></td>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$drive_rows++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ if (count($toners))
|
|||||||
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=toner/">');
|
echo('<a class="sectionhead" href="device/device='.$device['device_id'].'/tab=toner/">');
|
||||||
echo("<img align='absmiddle' src='images/icons/toner.png'> Toner</a></p>");
|
echo("<img align='absmiddle' src='images/icons/toner.png'> Toner</a></p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$toner_rows = '0';
|
|
||||||
|
|
||||||
foreach ($toners as $toner)
|
foreach ($toners as $toner)
|
||||||
{
|
{
|
||||||
if (is_integer($toner_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
$percent = round($toner['toner_current'], 0);
|
$percent = round($toner['toner_current'], 0);
|
||||||
$total = formatStorage($toner['toner_size']);
|
$total = formatStorage($toner['toner_size']);
|
||||||
$free = formatStorage($toner['toner_free']);
|
$free = formatStorage($toner['toner_free']);
|
||||||
@@ -46,18 +44,16 @@ if (count($toners))
|
|||||||
|
|
||||||
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $toner['toner_descr']);
|
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $toner['toner_descr']);
|
||||||
|
|
||||||
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = $graph_colour;
|
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
|
||||||
|
|
||||||
$minigraph = generate_graph_tag($graph_array);
|
$minigraph = generate_graph_tag($graph_array);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class=device-overview>
|
||||||
<td class=tablehead>".overlib_link($link, $toner['toner_descr'], $overlib_content)."</td>
|
<td class=tablehead>".overlib_link($link, $toner['toner_descr'], $overlib_content)."</td>
|
||||||
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
||||||
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
||||||
</a></td>
|
</a></td>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$toner_rows++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -13,13 +13,10 @@ echo("<tr class=tablehead>
|
|||||||
<th width=50>Used</th>
|
<th width=50>Used</th>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$i = '1';
|
|
||||||
foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.device_id = M.device_id ORDER BY D.hostname") as $mempool)
|
foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.device_id = M.device_id ORDER BY D.hostname") as $mempool)
|
||||||
{
|
{
|
||||||
if (device_permitted($mempool['device_id']))
|
if (device_permitted($mempool['device_id']))
|
||||||
{
|
{
|
||||||
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$text_descr = $mempool['mempool_descr'];
|
$text_descr = $mempool['mempool_descr'];
|
||||||
|
|
||||||
$mempool_url = "device/device=".$mempool['device_id']."/tab=health/metric=mempool/";
|
$mempool_url = "device/device=".$mempool['device_id']."/tab=health/metric=mempool/";
|
||||||
@@ -35,7 +32,7 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
|
|||||||
|
|
||||||
$background = get_percentage_colours($mempool['mempool_perc']);
|
$background = get_percentage_colours($mempool['mempool_perc']);
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class='health'>
|
||||||
<td>".generate_device_link($mempool)."</td>
|
<td>".generate_device_link($mempool)."</td>
|
||||||
<td class=tablehead><a href='".$mempool_url."' $mempool_popup>" . $text_descr . "</a></td>
|
<td class=tablehead><a href='".$mempool_url."' $mempool_popup>" . $text_descr . "</a></td>
|
||||||
<td width=90><a href='".$mempool_url."' $mempool_popup><img src='$mini_url'></a></td>
|
<td width=90><a href='".$mempool_url."' $mempool_popup><img src='$mini_url'></a></td>
|
||||||
@@ -47,7 +44,7 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
|
|||||||
|
|
||||||
if ($vars['view'] == "graphs")
|
if ($vars['view'] == "graphs")
|
||||||
{
|
{
|
||||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
echo("<tr></tr><tr class='health'><td colspan=5>");
|
||||||
|
|
||||||
$daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
$daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
||||||
$daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
$daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
||||||
@@ -71,8 +68,6 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
|
|||||||
<img src='$yearly_graph' border=0></a>");
|
<img src='$yearly_graph' border=0></a>");
|
||||||
echo("</td></tr>");
|
echo("</td></tr>");
|
||||||
} # endif graphs
|
} # endif graphs
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,10 @@ echo("<tr class=tablehead>
|
|||||||
<th width=280>Usage</th>
|
<th width=280>Usage</th>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$i = '1';
|
|
||||||
foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.device_id = P.device_id ORDER BY D.hostname") as $proc)
|
foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.device_id = P.device_id ORDER BY D.hostname") as $proc)
|
||||||
{
|
{
|
||||||
if (device_permitted($proc['device_id']))
|
if (device_permitted($proc['device_id']))
|
||||||
{
|
{
|
||||||
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$device = $proc;
|
$device = $proc;
|
||||||
|
|
||||||
# FIXME should that really be done here? :-)
|
# FIXME should that really be done here? :-)
|
||||||
@@ -30,7 +27,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
|
|||||||
|
|
||||||
$proc_url = "device/".$device['device_id']."/health/processor/";
|
$proc_url = "device/".$device['device_id']."/health/processor/";
|
||||||
|
|
||||||
$mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
$mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f400";
|
||||||
|
|
||||||
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$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'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=125\'>";
|
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=125\'>";
|
||||||
@@ -40,7 +37,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
|
|||||||
|
|
||||||
$background = get_percentage_colours($perc);
|
$background = get_percentage_colours($perc);
|
||||||
|
|
||||||
echo(" <tr bgcolor=\"$row_colour\">
|
echo(" <tr class=\"health\">
|
||||||
<td>".generate_device_link($proc)."</td>
|
<td>".generate_device_link($proc)."</td>
|
||||||
<td class=\"tablehead\"><a href='".$proc_url."' $proc_popup>" . $text_descr . "</a></td>
|
<td class=\"tablehead\"><a href='".$proc_url."' $proc_popup>" . $text_descr . "</a></td>
|
||||||
<td width=\"90\"><a href=\"".$proc_url."\" $proc_popup><img src=\"$mini_url\" /></a></td>
|
<td width=\"90\"><a href=\"".$proc_url."\" $proc_popup><img src=\"$mini_url\" /></a></td>
|
||||||
@@ -50,9 +47,9 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
|
|||||||
</tr>');
|
</tr>');
|
||||||
|
|
||||||
if ($vars['view'] == "graphs")
|
if ($vars['view'] == "graphs")
|
||||||
{ ## If graphs are requested, do them, else not!
|
{
|
||||||
echo(' <tr bgcolor="'.$row_colour.'"><td colspan="5">');
|
echo(' <tr></tr><tr class="health"><td colspan="5">');
|
||||||
|
|
||||||
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
||||||
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
||||||
|
|
||||||
@@ -77,8 +74,6 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
|
|||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
} #end graphs if
|
} #end graphs if
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,12 +23,8 @@ echo('<tr class=tablehead>
|
|||||||
<th>Notes</th>
|
<th>Notes</th>
|
||||||
</tr>');
|
</tr>');
|
||||||
|
|
||||||
$row = 1;
|
|
||||||
|
|
||||||
foreach (dbFetchRows($sql, $param) as $sensor)
|
foreach (dbFetchRows($sql, $param) as $sensor)
|
||||||
{
|
{
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=500&height=150";
|
$weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=500&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_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['sensor_descr'] . "</a>";
|
||||||
@@ -40,11 +36,11 @@ foreach (dbFetchRows($sql, $param) as $sensor)
|
|||||||
$sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=300&height=100";
|
$sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=300&height=100";
|
||||||
$sensor_year = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=300&height=100";
|
$sensor_year = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=300&height=100";
|
||||||
|
|
||||||
$sensor_minigraph = "<img src='graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=100&height=20'";
|
$sensor_minigraph = "<img src='graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=100&height=20&bg=ffffff00'";
|
||||||
$sensor_minigraph .= " onmouseover=\"return overlib('<div class=list-large>".$sensor['hostname']." - ".mres($sensor['sensor_descr']);
|
$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();\" >";
|
$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();\" >";
|
||||||
|
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class='health'>
|
||||||
<td class=list-bold>" . generate_device_link($sensor) . "</td>
|
<td class=list-bold>" . generate_device_link($sensor) . "</td>
|
||||||
<td>$sensor_popup</td>
|
<td>$sensor_popup</td>
|
||||||
<td width=100>$sensor_minigraph</td>
|
<td width=100>$sensor_minigraph</td>
|
||||||
@@ -56,7 +52,7 @@ foreach (dbFetchRows($sql, $param) as $sensor)
|
|||||||
|
|
||||||
if ($vars['view'] == "graphs")
|
if ($vars['view'] == "graphs")
|
||||||
{
|
{
|
||||||
echo("<tr bgcolor='$row_colour'><td colspan=7>");
|
echo("<tr></tr><tr class='health'><td colspan=7>");
|
||||||
|
|
||||||
$daily_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
$daily_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
||||||
$daily_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
$daily_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
||||||
@@ -80,8 +76,6 @@ foreach (dbFetchRows($sql, $param) as $sensor)
|
|||||||
<img src='$yearly_graph' border=0></a>");
|
<img src='$yearly_graph' border=0></a>");
|
||||||
echo("</td></tr>");
|
echo("</td></tr>");
|
||||||
} # endif graphs
|
} # endif graphs
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ echo("<tr class=tablehead>
|
|||||||
<th width=50>Used</th>
|
<th width=50>Used</th>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$row = 1;
|
|
||||||
|
|
||||||
foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY D.hostname, S.storage_descr") as $drive)
|
foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY D.hostname, S.storage_descr") as $drive)
|
||||||
{
|
{
|
||||||
if (device_permitted($drive['device_id']))
|
if (device_permitted($drive['device_id']))
|
||||||
@@ -45,7 +43,6 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($skipdrive) { continue; }
|
if ($skipdrive) { continue; }
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$perc = round($drive['storage_perc'], 0);
|
$perc = round($drive['storage_perc'], 0);
|
||||||
$total = formatStorage($drive['storage_size']);
|
$total = formatStorage($drive['storage_size']);
|
||||||
@@ -66,7 +63,7 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
|
|||||||
|
|
||||||
$background = get_percentage_colours($perc);
|
$background = get_percentage_colours($perc);
|
||||||
|
|
||||||
echo("<tr bgcolor='$row_colour'><td>" . generate_device_link($drive) . "</td><td class=tablehead>" . $drive['storage_descr'] . "</td>
|
echo("<tr class='health'><td>" . generate_device_link($drive) . "</td><td class=tablehead>" . $drive['storage_descr'] . "</td>
|
||||||
<td>$mini_graph</td>
|
<td>$mini_graph</td>
|
||||||
<td>
|
<td>
|
||||||
<a href='#' $store_popup>".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right'])."</a>
|
<a href='#' $store_popup>".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right'])."</a>
|
||||||
@@ -74,8 +71,7 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
|
|||||||
|
|
||||||
if ($vars['view'] == "graphs")
|
if ($vars['view'] == "graphs")
|
||||||
{
|
{
|
||||||
|
echo("<tr></tr><tr class='health'><td colspan=5>");
|
||||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
|
||||||
|
|
||||||
$graph_array['height'] = "100";
|
$graph_array['height'] = "100";
|
||||||
$graph_array['width'] = "216";
|
$graph_array['width'] = "216";
|
||||||
@@ -88,8 +84,6 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
|
|||||||
echo("</td></tr>");
|
echo("</td></tr>");
|
||||||
|
|
||||||
} # endif graphs
|
} # endif graphs
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,10 @@ echo("<tr class=tablehead>
|
|||||||
<th width=50>Used</th>
|
<th width=50>Used</th>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
$row = 1;
|
|
||||||
|
|
||||||
foreach (dbFetchRows("SELECT * FROM `toner` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY D.hostname, S.toner_descr") as $toner)
|
foreach (dbFetchRows("SELECT * FROM `toner` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY D.hostname, S.toner_descr") as $toner)
|
||||||
{
|
{
|
||||||
if (device_permitted($toner['device_id']))
|
if (device_permitted($toner['device_id']))
|
||||||
{
|
{
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$total = $toner['toner_capacity'];
|
$total = $toner['toner_capacity'];
|
||||||
$perc = $toner['toner_current'];
|
$perc = $toner['toner_current'];
|
||||||
|
|
||||||
@@ -38,7 +34,7 @@ foreach (dbFetchRows("SELECT * FROM `toner` AS S, `devices` AS D WHERE S.device_
|
|||||||
|
|
||||||
$background = get_percentage_colours(100 - $perc);
|
$background = get_percentage_colours(100 - $perc);
|
||||||
|
|
||||||
echo("<tr bgcolor='$row_colour'><td>" . generate_device_link($toner) . "</td><td class=tablehead>" . $toner['toner_descr'] . "</td>
|
echo("<tr class='health'><td>" . generate_device_link($toner) . "</td><td class=tablehead>" . $toner['toner_descr'] . "</td>
|
||||||
<td>$mini_graph</td>
|
<td>$mini_graph</td>
|
||||||
<td>
|
<td>
|
||||||
<a href='#' $store_popup>".print_percentage_bar (400, 20, $perc, "$perc%", "ffffff", $background['left'], $free, "ffffff", $background['right'])."</a>
|
<a href='#' $store_popup>".print_percentage_bar (400, 20, $perc, "$perc%", "ffffff", $background['left'], $free, "ffffff", $background['right'])."</a>
|
||||||
@@ -46,8 +42,7 @@ foreach (dbFetchRows("SELECT * FROM `toner` AS S, `devices` AS D WHERE S.device_
|
|||||||
|
|
||||||
if ($vars['view'] == "graphs")
|
if ($vars['view'] == "graphs")
|
||||||
{
|
{
|
||||||
|
echo("<tr></tr><tr class='health'><td colspan=5>");
|
||||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
|
||||||
|
|
||||||
$graph_array['height'] = "100";
|
$graph_array['height'] = "100";
|
||||||
$graph_array['width'] = "216";
|
$graph_array['width'] = "216";
|
||||||
@@ -58,10 +53,7 @@ foreach (dbFetchRows("SELECT * FROM `toner` AS S, `devices` AS D WHERE S.device_
|
|||||||
include("includes/print-quadgraphs.inc.php");
|
include("includes/print-quadgraphs.inc.php");
|
||||||
|
|
||||||
echo("</td></tr>");
|
echo("</td></tr>");
|
||||||
|
|
||||||
} # endif graphs
|
} # endif graphs
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,11 @@ $types_array = explode(',',$vars['type']);
|
|||||||
for ($i = 0; $i < count($types_array);$i++) $types_array[$i] = ucfirst($types_array[$i]);
|
for ($i = 0; $i < count($types_array);$i++) $types_array[$i] = ucfirst($types_array[$i]);
|
||||||
$types = implode(' + ',$types_array);
|
$types = implode(' + ',$types_array);
|
||||||
|
|
||||||
echo("<tr bgcolor='$bg'>
|
echo("<tr class='iftype'>
|
||||||
<td><span class=list-large>Total Graph for ports of type : ".$types."</span></td></tr>");
|
<td><span class=list-large>Total Graph for ports of type : ".$types."</span><br />");
|
||||||
|
|
||||||
if ($if_list)
|
if ($if_list)
|
||||||
{
|
{
|
||||||
echo("<tr bgcolor='$bg'><td>");
|
|
||||||
$graph_type = "multiport_bits_separate";
|
$graph_type = "multiport_bits_separate";
|
||||||
$port['interface_id'] = $if_list;
|
$port['interface_id'] = $if_list;
|
||||||
|
|
||||||
@@ -47,7 +46,7 @@ if ($if_list)
|
|||||||
$port['ifAlias'] = str_ireplace("[PNI]", "Private", $port['ifAlias']);
|
$port['ifAlias'] = str_ireplace("[PNI]", "Private", $port['ifAlias']);
|
||||||
$ifclass = ifclass($port['ifOperStatus'], $port['ifAdminStatus']);
|
$ifclass = ifclass($port['ifOperStatus'], $port['ifAdminStatus']);
|
||||||
if ($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg = "#ffffff"; }
|
if ($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg = "#ffffff"; }
|
||||||
echo("<tr bgcolor='$bg'>
|
echo("<tr class='iftype'>
|
||||||
<td><span class=list-large>" . generate_port_link($port,$port['port_descr_descr']) . "</span><br />
|
<td><span class=list-large>" . generate_port_link($port,$port['port_descr_descr']) . "</span><br />
|
||||||
<span class=interface-desc style='float: left;'>".generate_device_link($port)." ".generate_port_link($port)." </span>");
|
<span class=interface-desc style='float: left;'>".generate_device_link($port)." ".generate_port_link($port)." </span>");
|
||||||
|
|
||||||
@@ -56,7 +55,7 @@ if ($if_list)
|
|||||||
echo("<span style='float: right;'><a href='device/".$port['device_id']."/port/".$port['interface_id']."/macaccounting/'><img src='/images/16/chart_curve.png' align='absmiddle'> MAC Accounting</a></span>");
|
echo("<span style='float: right;'><a href='device/".$port['device_id']."/port/".$port['interface_id']."/macaccounting/'><img src='/images/16/chart_curve.png' align='absmiddle'> MAC Accounting</a></span>");
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</td></tr><tr bgcolor='$bg'><td>");
|
echo('<br />');
|
||||||
|
|
||||||
if (file_exists($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . $port['ifIndex'] . ".rrd"))
|
if (file_exists($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . $port['ifIndex'] . ".rrd"))
|
||||||
{
|
{
|
||||||
@@ -71,7 +70,7 @@ if ($if_list)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo("<tr><td>None found.</td></tr>");
|
echo("None found.</td></tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -92,9 +92,8 @@ echo("<tr><th>Hostname</th><th>Description</th><th>Name</th><th>Part No</th><th>
|
|||||||
|
|
||||||
foreach (dbFetchRows($sql, $param) as $entry)
|
foreach (dbFetchRows($sql, $param) as $entry)
|
||||||
{
|
{
|
||||||
if ($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
echo('<tr class="inventory"><td>' . generate_device_link($entry, shortHost($entry['hostname'])) . '</td><td>' . $entry['entPhysicalDescr'] .
|
||||||
echo("<tr style=\"background-color: $bg\"><td>" . generate_device_link($entry, shortHost($entry['hostname'])) . "</td><td>" . $entry['entPhysicalDescr'] .
|
'</td><td>' . $entry['entPhysicalName'] . '</td><td>' . $entry['entPhysicalModelName'] . '</td><td>' . $entry['entPhysicalSerialNum'] . '</td></tr>');
|
||||||
"</td><td>" . $entry['entPhysicalName'] . "</td><td>" . $entry['entPhysicalModelName'] . "</td><td>" . $entry['entPhysicalSerialNum'] . "</td></tr>");
|
|
||||||
}
|
}
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ $pagetitle[] = "Locations";
|
|||||||
|
|
||||||
print_optionbar_start();
|
print_optionbar_start();
|
||||||
|
|
||||||
echo('<span style="font-weight: bold;">Locations</span> » ');
|
echo('<span style="font-weight: bold;">Locations</span> » ');
|
||||||
|
|
||||||
$menu_options = array('basic' => 'Basic',
|
$menu_options = array('basic' => 'Basic',
|
||||||
'traffic' => 'Traffic');
|
'traffic' => 'Traffic');
|
||||||
@@ -35,8 +35,6 @@ echo('<table cellpadding="7" cellspacing="0" class="devicetable" width="100%">')
|
|||||||
|
|
||||||
foreach (getlocations() as $location)
|
foreach (getlocations() as $location)
|
||||||
{
|
{
|
||||||
if (!isset($bg) || $bg == "#ffffff") { $bg = "#eeeeee"; } else { $bg="#ffffff"; }
|
|
||||||
|
|
||||||
if ($_SESSION['userlevel'] == '10')
|
if ($_SESSION['userlevel'] == '10')
|
||||||
{
|
{
|
||||||
$num = dbFetchCell("SELECT COUNT(device_id) FROM devices WHERE location = ?", array($location));
|
$num = dbFetchCell("SELECT COUNT(device_id) FROM devices WHERE location = ?", array($location));
|
||||||
@@ -56,7 +54,7 @@ foreach (getlocations() as $location)
|
|||||||
|
|
||||||
if ($location != "")
|
if ($location != "")
|
||||||
{
|
{
|
||||||
echo(' <tr bgcolor="' . $bg . '">
|
echo(' <tr class="locations">
|
||||||
<td class="interface" width="300"><a class="list-bold" href="devices/location=' . urlencode($location) . '/">' . $location . '</a></td>
|
<td class="interface" width="300"><a class="list-bold" href="devices/location=' . urlencode($location) . '/">' . $location . '</a></td>
|
||||||
<td width="100">' . $alert . '</td>
|
<td width="100">' . $alert . '</td>
|
||||||
<td width="100">' . $num . ' devices</td>
|
<td width="100">' . $num . ' devices</td>
|
||||||
@@ -68,16 +66,16 @@ foreach (getlocations() as $location)
|
|||||||
|
|
||||||
if ($vars['view'] == "traffic")
|
if ($vars['view'] == "traffic")
|
||||||
{
|
{
|
||||||
echo('<tr bgcolor="' . $bg . '"><td colspan=6>');
|
echo('<tr></tr><tr class="locations"><td colspan=6>');
|
||||||
|
|
||||||
$graph_array['type'] = "location_bits";
|
$graph_array['type'] = "location_bits";
|
||||||
$graph_array['height'] = "100";
|
$graph_array['height'] = "100";
|
||||||
$graph_array['width'] = "220";
|
$graph_array['width'] = "220";
|
||||||
$graph_array['to'] = $config['time']['now'];
|
$graph_array['to'] = $config['time']['now'];
|
||||||
$graph_array['legend'] = "no";
|
$graph_array['legend'] = "no";
|
||||||
$graph_array['id'] = $location;
|
$graph_array['id'] = $location;
|
||||||
|
|
||||||
include("includes/print-quadgraphs.inc.php");
|
include("includes/print-quadgraphs.inc.php");
|
||||||
|
|
||||||
echo("</tr></td>");
|
echo("</tr></td>");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,21 +239,6 @@ print_optionbar_end();
|
|||||||
|
|
||||||
$param = array();
|
$param = array();
|
||||||
|
|
||||||
# FIXME block below is not totally used, at least the iftype stuff is bogus?
|
|
||||||
#if ($vars['status'] == "down" || $_GET['type'] == "down" || $vars['state'] == "down")
|
|
||||||
#{
|
|
||||||
# $where .= "AND I.ifAdminStatus = 'up' AND I.ifOperStatus = 'down' AND I.ignore = '0'";
|
|
||||||
#}
|
|
||||||
#if ($_GET['optb'] == "admindown" || $_GET['type'] == "admindown" || $vars['state'] == "admindown") {
|
|
||||||
# $where .= "AND I.ifAdminStatus = 'down'";
|
|
||||||
#}
|
|
||||||
#if ($_GET['optb'] == "errors" || $_GET['type'] == "errors" || $vars['state'] == "errors") {
|
|
||||||
# $where .= "AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')";
|
|
||||||
#}
|
|
||||||
#if ($vars['state'] == "up") {
|
|
||||||
# $where .= "AND I.ifOperStatus = 'up'";
|
|
||||||
#}
|
|
||||||
|
|
||||||
if(!isset($vars['ignore'])) { $vars['ignore'] = "0"; }
|
if(!isset($vars['ignore'])) { $vars['ignore'] = "0"; }
|
||||||
if(!isset($vars['disabled'])) { $vars['disabled'] = "0"; }
|
if(!isset($vars['disabled'])) { $vars['disabled'] = "0"; }
|
||||||
if(!isset($vars['deleted'])) { $vars['deleted'] = "0"; }
|
if(!isset($vars['deleted'])) { $vars['deleted'] = "0"; }
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ foreach ($cols as $sort => $col)
|
|||||||
|
|
||||||
echo(" </tr>");
|
echo(" </tr>");
|
||||||
|
|
||||||
$row = 1;
|
|
||||||
|
|
||||||
$ports_disabled = 0; $ports_down = 0; $ports_up = 0; $ports_total = 0;
|
$ports_disabled = 0; $ports_down = 0; $ports_up = 0; $ports_total = 0;
|
||||||
|
|
||||||
foreach ($ports as $port)
|
foreach ($ports as $port)
|
||||||
@@ -39,8 +37,6 @@ foreach ($ports as $port)
|
|||||||
|
|
||||||
if (port_permitted($port['interface_id'], $port['device_id']))
|
if (port_permitted($port['interface_id'], $port['device_id']))
|
||||||
{
|
{
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$speed = humanspeed($port['ifSpeed']);
|
$speed = humanspeed($port['ifSpeed']);
|
||||||
$type = humanmedia($port['ifType']);
|
$type = humanmedia($port['ifType']);
|
||||||
$ifclass = ifclass($port['ifOperStatus'], $port['ifAdminStatus']);
|
$ifclass = ifclass($port['ifOperStatus'], $port['ifAdminStatus']);
|
||||||
@@ -54,7 +50,7 @@ foreach ($ports as $port)
|
|||||||
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
|
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
|
||||||
|
|
||||||
$port = ifLabel($port, $device);
|
$port = ifLabel($port, $device);
|
||||||
echo("<tr bgcolor=$row_colour>
|
echo("<tr class='ports'>
|
||||||
<td width=5></td>
|
<td width=5></td>
|
||||||
<td width=200 class=list-bold><a href='" . generate_device_url($port) . "'>".$port['hostname']."</a></td>
|
<td width=200 class=list-bold><a href='" . generate_device_url($port) . "'>".$port['hostname']."</a></td>
|
||||||
<td width=150 class=list-bold><a class='".$ifclass."'href='" . generate_port_url($port) . "'>".fixIfName($port['label'])." $error_img</td>
|
<td width=150 class=list-bold><a class='".$ifclass."'href='" . generate_port_url($port) . "'>".fixIfName($port['label'])." $error_img</td>
|
||||||
@@ -64,8 +60,6 @@ foreach ($ports as $port)
|
|||||||
<td width=150>$type</td>
|
<td width=150>$type</td>
|
||||||
<td>" . $port['ifAlias'] . "</td>
|
<td>" . $port['ifAlias'] . "</td>
|
||||||
</tr>\n");
|
</tr>\n");
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ if ($_SESSION['userlevel'] < '5')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$link_array = array('page' => 'routing', 'protocol' => 'bgp');
|
$link_array = array('page' => 'routing', 'protocol' => 'bgp');
|
||||||
|
|
||||||
print_optionbar_start('', '');
|
print_optionbar_start('', '');
|
||||||
@@ -129,8 +128,6 @@ else
|
|||||||
echo("<table border=0 cellspacing=0 cellpadding=5 width=100% class='sortable'>");
|
echo("<table border=0 cellspacing=0 cellpadding=5 width=100% class='sortable'>");
|
||||||
echo('<tr style="height: 30px"><td width=1></td><th>Local address</th><th></th><th>Peer address</th><th>Type</th><th>Family</th><th>Remote AS</th><th>State</th><th width=200>Uptime / Updates</th></tr>');
|
echo('<tr style="height: 30px"><td width=1></td><th>Local address</th><th></th><th>Peer address</th><th>Type</th><th>Family</th><th>Remote AS</th><th>State</th><th width=200>Uptime / Updates</th></tr>');
|
||||||
|
|
||||||
$i = "1";
|
|
||||||
|
|
||||||
if ($vars['type'] == "external")
|
if ($vars['type'] == "external")
|
||||||
{
|
{
|
||||||
$where = "AND D.bgpLocalAs != B.bgpPeerRemoteAs";
|
$where = "AND D.bgpLocalAs != B.bgpPeerRemoteAs";
|
||||||
@@ -156,8 +153,6 @@ else
|
|||||||
{
|
{
|
||||||
unset ($alert, $bg_image);
|
unset ($alert, $bg_image);
|
||||||
|
|
||||||
if (!is_integer($i/2)) { $bg_colour = $list_colour_b; } else { $bg_colour = $list_colour_a; }
|
|
||||||
|
|
||||||
if ($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; $peer['alert']=1; }
|
if ($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; $peer['alert']=1; }
|
||||||
if ($peer['bgpPeerAdminStatus'] == "start" || $peer['bgpPeerAdminStatus'] == "running") { $admin_col = "green"; } else { $admin_col = "gray"; }
|
if ($peer['bgpPeerAdminStatus'] == "start" || $peer['bgpPeerAdminStatus'] == "running") { $admin_col = "green"; } else { $admin_col = "gray"; }
|
||||||
if ($peer['bgpPeerAdminStatus'] == "stop") { $peer['alert']=0; $peer['disabled']=1; }
|
if ($peer['bgpPeerAdminStatus'] == "stop") { $peer['alert']=0; $peer['disabled']=1; }
|
||||||
@@ -179,7 +174,7 @@ else
|
|||||||
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150";
|
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&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>";
|
$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 bgcolor="'.$bg_colour.'"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') . ($peer['disabled'] ? ' bordercolor="#cccccc"' : '') . ">");
|
echo('<tr class="bgp"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') . ($peer['disabled'] ? ' bordercolor="#cccccc"' : '') . ">");
|
||||||
|
|
||||||
unset($sep);
|
unset($sep);
|
||||||
foreach (dbFetchRows("SELECT * FROM `bgpPeers_cbgp` WHERE `device_id` = ? AND bgpPeerIdentifier = ?", array($peer['device_id'], $peer['bgpPeerIdentifier'])) as $afisafi)
|
foreach (dbFetchRows("SELECT * FROM `bgpPeers_cbgp` WHERE `device_id` = ? AND bgpPeerIdentifier = ?", array($peer['device_id'], $peer['bgpPeerIdentifier'])) as $afisafi)
|
||||||
@@ -203,8 +198,7 @@ else
|
|||||||
<td><strong><span style='color: $admin_col;'>" . $peer['bgpPeerAdminStatus'] . "</span><br /><span style='color: $col;'>" . $peer['bgpPeerState'] . "</span></strong></td>
|
<td><strong><span style='color: $admin_col;'>" . $peer['bgpPeerAdminStatus'] . "</span><br /><span style='color: $col;'>" . $peer['bgpPeerState'] . "</span></strong></td>
|
||||||
<td>" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "<br />
|
<td>" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "<br />
|
||||||
Updates <img src='images/16/arrow_down.png' align=absmiddle /> " . format_si($peer['bgpPeerInUpdates']) . "
|
Updates <img src='images/16/arrow_down.png' align=absmiddle /> " . format_si($peer['bgpPeerInUpdates']) . "
|
||||||
<img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr>
|
<img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr>");
|
||||||
<tr height=5></tr>");
|
|
||||||
|
|
||||||
unset($invalid);
|
unset($invalid);
|
||||||
switch ($vars['graph'])
|
switch ($vars['graph'])
|
||||||
@@ -242,14 +236,12 @@ else
|
|||||||
$graph_array['height'] = "100";
|
$graph_array['height'] = "100";
|
||||||
$graph_array['width'] = "218";
|
$graph_array['width'] = "218";
|
||||||
$graph_array['to'] = $now;
|
$graph_array['to'] = $now;
|
||||||
echo('<tr bgcolor="'.$bg_colour.'"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="9">');
|
echo('<tr></tr><tr class="bgp"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="9">');
|
||||||
|
|
||||||
include("includes/print-quadgraphs.inc.php");
|
include("includes/print-quadgraphs.inc.php");
|
||||||
|
|
||||||
echo("</td></tr>");
|
echo("</td></tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ $query .= " ORDER BY A.ipv4_address";
|
|||||||
|
|
||||||
echo('<tr class="tablehead"><th>Device</a></th><th>Interface</th><th>Address</th><th>Description</th></tr>');
|
echo('<tr class="tablehead"><th>Device</a></th><th>Interface</th><th>Address</th><th>Description</th></tr>');
|
||||||
|
|
||||||
$row = 1;
|
|
||||||
|
|
||||||
foreach (dbFetchRows($query, $param) as $interface)
|
foreach (dbFetchRows($query, $param) as $interface)
|
||||||
{
|
{
|
||||||
if ($_POST['address'])
|
if ($_POST['address'])
|
||||||
@@ -68,8 +66,6 @@ foreach (dbFetchRows($query, $param) as $interface)
|
|||||||
|
|
||||||
if (!$ignore)
|
if (!$ignore)
|
||||||
{
|
{
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$speed = humanspeed($interface['ifSpeed']);
|
$speed = humanspeed($interface['ifSpeed']);
|
||||||
$type = humanmedia($interface['ifType']);
|
$type = humanmedia($interface['ifType']);
|
||||||
|
|
||||||
@@ -84,14 +80,12 @@ foreach (dbFetchRows($query, $param) as $interface)
|
|||||||
{
|
{
|
||||||
$interface = ifLabel ($interface, $interface);
|
$interface = ifLabel ($interface, $interface);
|
||||||
|
|
||||||
echo('<tr bgcolor="' . $row_colour . '">
|
echo('<tr class="search">
|
||||||
<td class="list-bold">' . generate_device_link($interface) . '</td>
|
<td class="list-bold">' . generate_device_link($interface) . '</td>
|
||||||
<td class="list-bold">' . generate_port_link($interface) . ' ' . $error_img . '</td>
|
<td class="list-bold">' . generate_port_link($interface) . ' ' . $error_img . '</td>
|
||||||
<td>' . $interface['ipv4_address'] . '/'.$length.'</td>
|
<td>' . $interface['ipv4_address'] . '/'.$length.'</td>
|
||||||
<td>' . $interface['ifAlias'] . "</td>
|
<td>' . $interface['ifAlias'] . "</td>
|
||||||
</tr>\n");
|
</tr>\n");
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ $query .= " ORDER BY A.ipv6_address";
|
|||||||
|
|
||||||
echo('<tr class="tablehead"><th>Device</a></th><th>Interface</th><th>Address</th><th>Description</th></tr>');
|
echo('<tr class="tablehead"><th>Device</a></th><th>Interface</th><th>Address</th><th>Description</th></tr>');
|
||||||
|
|
||||||
$row = 1;
|
|
||||||
|
|
||||||
foreach (dbFetchRows($query, $param) as $interface)
|
foreach (dbFetchRows($query, $param) as $interface)
|
||||||
{
|
{
|
||||||
if ($_POST['address'])
|
if ($_POST['address'])
|
||||||
@@ -68,8 +66,6 @@ foreach (dbFetchRows($query, $param) as $interface)
|
|||||||
|
|
||||||
if (!$ignore)
|
if (!$ignore)
|
||||||
{
|
{
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$speed = humanspeed($interface['ifSpeed']);
|
$speed = humanspeed($interface['ifSpeed']);
|
||||||
$type = humanmedia($interface['ifType']);
|
$type = humanmedia($interface['ifType']);
|
||||||
|
|
||||||
@@ -84,14 +80,12 @@ foreach (dbFetchRows($query, $param) as $interface)
|
|||||||
{
|
{
|
||||||
$interface = ifLabel ($interface, $interface);
|
$interface = ifLabel ($interface, $interface);
|
||||||
|
|
||||||
echo('<tr bgcolor="' . $row_colour . '">
|
echo('<tr class="search">
|
||||||
<td class="list-bold">' . generate_device_link($interface) . '</td>
|
<td class="list-bold">' . generate_device_link($interface) . '</td>
|
||||||
<td class="list-bold">' . generate_port_link($interface, makeshortif(fixifname($interface['ifDescr']))) . ' ' . $error_img . '</td>
|
<td class="list-bold">' . generate_port_link($interface, makeshortif(fixifname($interface['ifDescr']))) . ' ' . $error_img . '</td>
|
||||||
<td>' . Net_IPv6::compress($interface['ipv6_address']) . '/'.$length.'</td>
|
<td>' . Net_IPv6::compress($interface['ipv6_address']) . '/'.$length.'</td>
|
||||||
<td>' . $interface['ifAlias'] . "</td>
|
<td>' . $interface['ifAlias'] . "</td>
|
||||||
</tr>\n");
|
</tr>\n");
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,14 +56,10 @@ if ($_POST['interface'])
|
|||||||
$query .= " ORDER BY P.ifPhysAddress";
|
$query .= " ORDER BY P.ifPhysAddress";
|
||||||
|
|
||||||
echo('<tr class="tablehead"><th>Device</a></th><th>Interface</th><th>MAC Address</th><th>Description</th></tr>');
|
echo('<tr class="tablehead"><th>Device</a></th><th>Interface</th><th>MAC Address</th><th>Description</th></tr>');
|
||||||
$row = 1;
|
|
||||||
foreach (dbFetchRows($query, $param) as $entry)
|
foreach (dbFetchRows($query, $param) as $entry)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!$ignore)
|
if (!$ignore)
|
||||||
{
|
{
|
||||||
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
||||||
|
|
||||||
$speed = humanspeed($entry['ifSpeed']);
|
$speed = humanspeed($entry['ifSpeed']);
|
||||||
$type = humanmedia($entry['ifType']);
|
$type = humanmedia($entry['ifType']);
|
||||||
|
|
||||||
@@ -76,14 +72,12 @@ foreach (dbFetchRows($query, $param) as $entry)
|
|||||||
{
|
{
|
||||||
$interface = ifLabel ($interface, $interface);
|
$interface = ifLabel ($interface, $interface);
|
||||||
|
|
||||||
echo('<tr bgcolor="' . $row_colour . '">
|
echo('<tr class="search">
|
||||||
<td class="list-bold">' . generate_device_link($entry) . '</td>
|
<td class="list-bold">' . generate_device_link($entry) . '</td>
|
||||||
<td class="list-bold">' . generate_port_link($entry, makeshortif(fixifname($entry['ifDescr']))) . ' ' . $error_img . '</td>
|
<td class="list-bold">' . generate_port_link($entry, makeshortif(fixifname($entry['ifDescr']))) . ' ' . $error_img . '</td>
|
||||||
<td>' . formatMac($entry['ifPhysAddress']) . '</td>
|
<td>' . formatMac($entry['ifPhysAddress']) . '</td>
|
||||||
<td>' . $entry['ifAlias'] . "</td>
|
<td>' . $entry['ifAlias'] . "</td>
|
||||||
</tr>\n");
|
</tr>\n");
|
||||||
|
|
||||||
$row++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user