diff --git a/html/css/styles.css b/html/css/styles.css
index 2292b450c..e06fb31a1 100644
--- a/html/css/styles.css
+++ b/html/css/styles.css
@@ -408,6 +408,14 @@ A.purple:visited, a.purple, .purple { color: #740074; }
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 {
font-weight: bold;
}
@@ -1364,6 +1372,75 @@ a.interface-upup:hover, a.interface-updown:hover, a.interface-admindown:hover {
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 {
padding: 7px;
}
diff --git a/html/includes/print-device-graph.php b/html/includes/print-device-graph.php
index cdccc4174..eb43a59c7 100644
--- a/html/includes/print-device-graph.php
+++ b/html/includes/print-device-graph.php
@@ -3,7 +3,7 @@
$graph_array['type'] = $graph_type;
$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; }
echo('
');
diff --git a/html/includes/print-event.inc.php b/html/includes/print-event.inc.php
index fb76a8e85..d73df7b05 100644
--- a/html/includes/print-event.inc.php
+++ b/html/includes/print-event.inc.php
@@ -1,7 +1,5 @@
'; }
-echo('
+echo('
|
' . $entry['datetime'] . '
diff --git a/html/includes/print-syslog.inc.php b/html/includes/print-syslog.inc.php
index e48a1ec89..cade34cee 100644
--- a/html/includes/print-syslog.inc.php
+++ b/html/includes/print-syslog.inc.php
@@ -2,10 +2,7 @@
if (device_permitted($entry['device_id']))
{
- $syslog_iter++;
- if (!is_integer($syslog_iter/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
-
- echo(" |
+ echo("
| ");
$entry['hostname'] = shorthost($entry['hostname'], 20);
diff --git a/html/includes/print-vm.inc.php b/html/includes/print-vm.inc.php
index 3ecedd4e0..c75866a39 100644
--- a/html/includes/print-vm.inc.php
+++ b/html/includes/print-vm.inc.php
@@ -1,8 +1,6 @@
');
+echo('
');
echo('| ');
diff --git a/html/pages/deleted-ports.inc.php b/html/pages/deleted-ports.inc.php
index ec90a95ec..7e63a0d2b 100644
--- a/html/pages/deleted-ports.inc.php
+++ b/html/pages/deleted-ports.inc.php
@@ -19,8 +19,6 @@ if ($vars['purge'] == "all")
echo(" Deleted ".generate_device_link($interface)." - ".generate_port_link($interface)." ");
}
-$i_deleted = 1;
-
echo("");
echo(" | | | Purge All | ");
@@ -29,15 +27,11 @@ foreach (dbFetchRows("SELECT * FROM `ports` AS P, `devices` as D WHERE P.`delete
$interface = ifLabel($interface, $interface);
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("");
+ echo(" );
echo("| ".generate_device_link($interface)." | ");
echo("".generate_port_link($interface)." | ");
echo(" | ");
echo(" Purge | ");
-
- $i_deleted++;
}
}
diff --git a/html/pages/device/hrdevice.inc.php b/html/pages/device/hrdevice.inc.php
index 2d1ee8d59..096ffc0d3 100644
--- a/html/pages/device/hrdevice.inc.php
+++ b/html/pages/device/hrdevice.inc.php
@@ -2,9 +2,11 @@
echo('');
+# FIXME missing heading
+
foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `hrDeviceIndex`", array($device['device_id'])) as $hrdevice)
{
- echo("| ".$hrdevice['hrDeviceIndex']." | ");
+ echo(" | ".$hrdevice['hrDeviceIndex']." | ");
if ($hrdevice['hrDeviceType'] == "hrDeviceProcessor")
{
@@ -56,8 +58,8 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h
echo(" | ");
}
- echo("".$hrdevice['hrDeviceType']." | ".$hrdevice['hrDeviceStatus']." | ");
- echo("".$hrdevice['hrDeviceErrors']." | ".$hrdevice['hrProcessorLoad']." | ");
+ echo("".$hrdevice['hrDeviceType'].' | '.$hrdevice['hrDeviceStatus']." | ");
+ echo("".$hrdevice['hrDeviceErrors'].' | '.$hrdevice['hrProcessorLoad']." | ");
echo(" ");
}
diff --git a/html/pages/device/overview/c6kxbar.inc.php b/html/pages/device/overview/c6kxbar.inc.php
index 24eda1b14..5e41edfc1 100644
--- a/html/pages/device/overview/c6kxbar.inc.php
+++ b/html/pages/device/overview/c6kxbar.inc.php
@@ -5,12 +5,9 @@ echo("");
echo('');
echo(" Catalyst 6k Crossbar ");
echo("");
-$c6kxbar_rows = '0';
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? :>
$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);
- $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);
- echo("
+ echo("
|
Fabric ".$subindex." |
".
@@ -90,8 +87,6 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
| ");
}
}
-
- $c6kxbar_rows++;
}
echo(" ");
diff --git a/html/pages/device/overview/generic/sensor.inc.php b/html/pages/device/overview/generic/sensor.inc.php
index 167bcc720..96309dcff 100644
--- a/html/pages/device/overview/generic/sensor.inc.php
+++ b/html/pages/device/overview/generic/sensor.inc.php
@@ -6,12 +6,9 @@ if (count($sensors))
{
echo('');
echo(' ' . $sensor_type . '
');
- $i = '0';
echo(' ');
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 - 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 .= "";
- $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'];
$sensor_minigraph = generate_graph_tag($graph_array);
$sensor['sensor_descr'] = truncate($sensor['sensor_descr'], 48, '');
- echo("
+
+ echo("
| ".overlib_link($link, $sensor['sensor_descr'], $overlib_content)." |
".overlib_link($link, $sensor_minigraph, $overlib_content)." |
".overlib_link($link, " $sensor['sensor_limit'] ? "style='color: red'" : '') . '>' . $sensor['sensor_current'] . $sensor_unit . "", $overlib_content)." |
");
- $i++;
-
}
echo(" ");
diff --git a/html/pages/device/overview/mempools.inc.php b/html/pages/device/overview/mempools.inc.php
index 69f60fc32..80b2db411 100644
--- a/html/pages/device/overview/mempools.inc.php
+++ b/html/pages/device/overview/mempools.inc.php
@@ -11,11 +11,9 @@ if (count($mempools))
echo(' ');
echo(" Memory Pools");
echo(" ");
- $mempool_rows = '0';
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);
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
$total = formatStorage($mempool['mempool_total']);
@@ -39,18 +37,16 @@ if (count($mempools))
$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);
- echo("
+ echo("
| ".overlib_link($link, $text_descr, $overlib_content)." |
".overlib_link($link, $minigraph, $overlib_content)." |
".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
");
-
- $mempool_rows++;
}
echo(" ");
diff --git a/html/pages/device/overview/processors.inc.php b/html/pages/device/overview/processors.inc.php
index f5b92cd9e..51bfc9bd9 100644
--- a/html/pages/device/overview/processors.inc.php
+++ b/html/pages/device/overview/processors.inc.php
@@ -6,7 +6,6 @@ $processors = dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", arra
if (count($processors))
{
- $processor_rows = 0;
echo(" ");
echo(" ");
echo('');
@@ -15,9 +14,6 @@ if (count($processors))
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']);
# 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);
- $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);
- echo("
+ echo("
| ".overlib_link($link, $text_descr, $overlib_content)." |
".overlib_link($link, $minigraph, $overlib_content)." |
".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
");
- $processor_rows++;
}
echo(" ");
diff --git a/html/pages/device/overview/storage.inc.php b/html/pages/device/overview/storage.inc.php
index 9e3c74b2c..6ee7eab5e 100644
--- a/html/pages/device/overview/storage.inc.php
+++ b/html/pages/device/overview/storage.inc.php
@@ -11,7 +11,6 @@ if (count($drives))
echo('');
echo(" Storage");
echo("");
- $drive_rows = '0';
foreach ($drives as $drive)
{
@@ -41,7 +40,6 @@ if (count($drives))
}
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);
$total = formatStorage($drive['storage_size']);
$free = formatStorage($drive['storage_free']);
@@ -64,18 +62,16 @@ if (count($drives))
$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);
- echo("
+ echo("
| ".overlib_link($link, $drive['storage_descr'], $overlib_content)." |
".overlib_link($link, $minigraph, $overlib_content)." |
".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
");
-
- $drive_rows++;
}
echo(" ");
diff --git a/html/pages/device/overview/toner.inc.php b/html/pages/device/overview/toner.inc.php
index 9ad298a9e..22c8c2a19 100644
--- a/html/pages/device/overview/toner.inc.php
+++ b/html/pages/device/overview/toner.inc.php
@@ -11,11 +11,9 @@ if (count($toners))
echo('');
echo(" Toner");
echo("");
- $toner_rows = '0';
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);
$total = formatStorage($toner['toner_size']);
$free = formatStorage($toner['toner_free']);
@@ -46,18 +44,16 @@ if (count($toners))
$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);
- echo("
- | ".overlib_link($link, $toner['toner_descr'], $overlib_content)." |
+ echo("
+ | ".overlib_link($link, $toner['toner_descr'], $overlib_content)." |
".overlib_link($link, $minigraph, $overlib_content)." |
".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
");
-
- $toner_rows++;
}
echo(" ");
diff --git a/html/pages/health/mempool.inc.php b/html/pages/health/mempool.inc.php
index 10544d380..88f444aeb 100644
--- a/html/pages/health/mempool.inc.php
+++ b/html/pages/health/mempool.inc.php
@@ -13,13 +13,10 @@ echo("
| Used |
");
-$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)
{
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'];
$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']);
- echo("
+ echo("
| ".generate_device_link($mempool)." |
" . $text_descr . " |
 |
@@ -47,7 +44,7 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
if ($vars['view'] == "graphs")
{
- echo(" | ");
+ echo(" | |
");
$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";
@@ -71,8 +68,6 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
");
echo(" | ");
} # endif graphs
-
- $i++;
}
}
diff --git a/html/pages/health/processor.inc.php b/html/pages/health/processor.inc.php
index c6b17fd68..7e1ee048b 100644
--- a/html/pages/health/processor.inc.php
+++ b/html/pages/health/processor.inc.php
@@ -12,13 +12,10 @@ echo("
| Usage |
");
-$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)
{
if (device_permitted($proc['device_id']))
{
- if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
-
$device = $proc;
# 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/";
- $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('".$device['hostname']." - ".$text_descr;
$proc_popup .= " ";
@@ -40,7 +37,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
$background = get_percentage_colours($perc);
- echo("
+ echo("
| ".generate_device_link($proc)." |
" . $text_descr . " |
 |
@@ -50,9 +47,9 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
');
if ($vars['view'] == "graphs")
- { ## If graphs are requested, do them, else not!
- echo(' | ');
-
+ {
+ echo(' | |
| ');
+
$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";
@@ -77,8 +74,6 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
| ");
} #end graphs if
-
- $i++;
}
}
diff --git a/html/pages/health/sensors.inc.php b/html/pages/health/sensors.inc.php
index 54a7df699..445c769d6 100644
--- a/html/pages/health/sensors.inc.php
+++ b/html/pages/health/sensors.inc.php
@@ -23,12 +23,8 @@ echo('
| Notes |
');
-$row = 1;
-
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";
$sensor_popup = "', LEFT);\" onmouseout=\"return nd();\">
" . $sensor['sensor_descr'] . "";
@@ -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_year = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=300&height=100";
- $sensor_minigraph = " ".$sensor['hostname']." - ".mres($sensor['sensor_descr']);
$sensor_minigraph .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\" >";
- echo("
+ echo("
| " . generate_device_link($sensor) . " |
$sensor_popup |
$sensor_minigraph |
@@ -56,7 +52,7 @@ foreach (dbFetchRows($sql, $param) as $sensor)
if ($vars['view'] == "graphs")
{
- echo(" | ");
+ echo(" | |
");
$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";
@@ -80,8 +76,6 @@ foreach (dbFetchRows($sql, $param) as $sensor)
");
echo(" | ");
} # endif graphs
-
- $row++;
}
echo(" ");
diff --git a/html/pages/health/storage.inc.php b/html/pages/health/storage.inc.php
index cd051325d..6ab827a55 100644
--- a/html/pages/health/storage.inc.php
+++ b/html/pages/health/storage.inc.php
@@ -13,8 +13,6 @@ echo(" |
| Used |
");
-$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)
{
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 (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
$perc = round($drive['storage_perc'], 0);
$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);
- echo("
| " . generate_device_link($drive) . " | " . $drive['storage_descr'] . " |
+ echo("
| " . generate_device_link($drive) . " | " . $drive['storage_descr'] . " |
$mini_graph |
".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right'])."
@@ -74,8 +71,7 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
if ($vars['view'] == "graphs")
{
-
- echo(" |
| ");
+ echo(" |
|
| ");
$graph_array['height'] = "100";
$graph_array['width'] = "216";
@@ -88,8 +84,6 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
echo(" |
");
} # endif graphs
-
- $row++;
}
}
diff --git a/html/pages/health/toner.inc.php b/html/pages/health/toner.inc.php
index 508e3e8e2..a24636b2c 100644
--- a/html/pages/health/toner.inc.php
+++ b/html/pages/health/toner.inc.php
@@ -13,14 +13,10 @@ echo("
| Used |
");
-$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)
{
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'];
$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);
- echo("
| " . generate_device_link($toner) . " | " . $toner['toner_descr'] . " |
+ echo("
| " . generate_device_link($toner) . " | " . $toner['toner_descr'] . " |
$mini_graph |
".print_percentage_bar (400, 20, $perc, "$perc%", "ffffff", $background['left'], $free, "ffffff", $background['right'])."
@@ -46,8 +42,7 @@ foreach (dbFetchRows("SELECT * FROM `toner` AS S, `devices` AS D WHERE S.device_
if ($vars['view'] == "graphs")
{
-
- echo(" |
| ");
+ echo(" |
|
| ");
$graph_array['height'] = "100";
$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");
echo(" |
");
-
} # endif graphs
-
- $row++;
}
}
diff --git a/html/pages/iftype.inc.php b/html/pages/iftype.inc.php
index f8644b7a4..bdc7ba56a 100644
--- a/html/pages/iftype.inc.php
+++ b/html/pages/iftype.inc.php
@@ -26,12 +26,11 @@ $types_array = explode(',',$vars['type']);
for ($i = 0; $i < count($types_array);$i++) $types_array[$i] = ucfirst($types_array[$i]);
$types = implode(' + ',$types_array);
-echo("
- | Total Graph for ports of type : ".$types." |
");
+echo("
+ Total Graph for ports of type : ".$types." ");
if ($if_list)
{
- echo(" |
| ");
$graph_type = "multiport_bits_separate";
$port['interface_id'] = $if_list;
@@ -47,7 +46,7 @@ if ($if_list)
$port['ifAlias'] = str_ireplace("[PNI]", "Private", $port['ifAlias']);
$ifclass = ifclass($port['ifOperStatus'], $port['ifAdminStatus']);
if ($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg = "#ffffff"; }
- echo(" |
+ echo("
" . generate_port_link($port,$port['port_descr_descr']) . "
".generate_device_link($port)." ".generate_port_link($port)." ");
@@ -56,7 +55,7 @@ if ($if_list)
echo(" MAC Accounting");
}
- echo(" |
");
+ echo(' ');
if (file_exists($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . $port['ifIndex'] . ".rrd"))
{
@@ -71,7 +70,7 @@ if ($if_list)
}
else
{
- echo(" |
| None found. |
");
+ echo("None found.");
}
?>
diff --git a/html/pages/inventory.inc.php b/html/pages/inventory.inc.php
index bcb643b35..609ecc67b 100644
--- a/html/pages/inventory.inc.php
+++ b/html/pages/inventory.inc.php
@@ -92,9 +92,8 @@ echo("
| Hostname | Description | Name | Part No |
foreach (dbFetchRows($sql, $param) as $entry)
{
- if ($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
- echo(" |
|---|
| " . generate_device_link($entry, shortHost($entry['hostname'])) . " | " . $entry['entPhysicalDescr'] .
- " | " . $entry['entPhysicalName'] . " | " . $entry['entPhysicalModelName'] . " | " . $entry['entPhysicalSerialNum'] . " |
");
+ echo('
| ' . generate_device_link($entry, shortHost($entry['hostname'])) . ' | ' . $entry['entPhysicalDescr'] .
+ ' | ' . $entry['entPhysicalName'] . ' | ' . $entry['entPhysicalModelName'] . ' | ' . $entry['entPhysicalSerialNum'] . ' |
');
}
echo("");
diff --git a/html/pages/locations.inc.php b/html/pages/locations.inc.php
index 0ece462d3..7a5e2f815 100644
--- a/html/pages/locations.inc.php
+++ b/html/pages/locations.inc.php
@@ -4,7 +4,7 @@ $pagetitle[] = "Locations";
print_optionbar_start();
- echo('
Locations » ');
+echo('
Locations » ');
$menu_options = array('basic' => 'Basic',
'traffic' => 'Traffic');
@@ -35,8 +35,6 @@ echo('
')
foreach (getlocations() as $location)
{
- if (!isset($bg) || $bg == "#ffffff") { $bg = "#eeeeee"; } else { $bg="#ffffff"; }
-
if ($_SESSION['userlevel'] == '10')
{
$num = dbFetchCell("SELECT COUNT(device_id) FROM devices WHERE location = ?", array($location));
@@ -56,7 +54,7 @@ foreach (getlocations() as $location)
if ($location != "")
{
- echo('
+ echo('
| ' . $location . ' |
' . $alert . ' |
' . $num . ' devices |
@@ -68,16 +66,16 @@ foreach (getlocations() as $location)
if ($vars['view'] == "traffic")
{
- echo('
| ');
+ echo(' |
|
| ');
- $graph_array['type'] = "location_bits";
- $graph_array['height'] = "100";
- $graph_array['width'] = "220";
- $graph_array['to'] = $config['time']['now'];
- $graph_array['legend'] = "no";
- $graph_array['id'] = $location;
+ $graph_array['type'] = "location_bits";
+ $graph_array['height'] = "100";
+ $graph_array['width'] = "220";
+ $graph_array['to'] = $config['time']['now'];
+ $graph_array['legend'] = "no";
+ $graph_array['id'] = $location;
- include("includes/print-quadgraphs.inc.php");
+ include("includes/print-quadgraphs.inc.php");
echo(" |
");
}
diff --git a/html/pages/ports.inc.php b/html/pages/ports.inc.php
index 43ef684e2..d46ac5086 100644
--- a/html/pages/ports.inc.php
+++ b/html/pages/ports.inc.php
@@ -239,21 +239,6 @@ print_optionbar_end();
$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['disabled'])) { $vars['disabled'] = "0"; }
if(!isset($vars['deleted'])) { $vars['deleted'] = "0"; }
diff --git a/html/pages/ports/list.inc.php b/html/pages/ports/list.inc.php
index a9e1f2748..42534e512 100644
--- a/html/pages/ports/list.inc.php
+++ b/html/pages/ports/list.inc.php
@@ -25,8 +25,6 @@ foreach ($cols as $sort => $col)
echo(" ");
-$row = 1;
-
$ports_disabled = 0; $ports_down = 0; $ports_up = 0; $ports_total = 0;
foreach ($ports as $port)
@@ -39,8 +37,6 @@ foreach ($ports as $port)
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']);
$type = humanmedia($port['ifType']);
$ifclass = ifclass($port['ifOperStatus'], $port['ifAdminStatus']);
@@ -54,7 +50,7 @@ foreach ($ports as $port)
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
$port = ifLabel($port, $device);
- echo("
+ echo("
|
".$port['hostname']." |
".fixIfName($port['label'])." $error_img |
@@ -64,8 +60,6 @@ foreach ($ports as $port)
$type |
" . $port['ifAlias'] . " |
\n");
-
- $row++;
}
}
diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php
index 0aa4be5d4..240b54bbf 100644
--- a/html/pages/routing/bgp.inc.php
+++ b/html/pages/routing/bgp.inc.php
@@ -6,7 +6,6 @@ if ($_SESSION['userlevel'] < '5')
}
else
{
-
$link_array = array('page' => 'routing', 'protocol' => 'bgp');
print_optionbar_start('', '');
@@ -129,8 +128,6 @@ else
echo("");
echo(' | Local address | | Peer address | Type | Family | Remote AS | State | Uptime / Updates |
');
- $i = "1";
-
if ($vars['type'] == "external")
{
$where = "AND D.bgpLocalAs != B.bgpPeerRemoteAs";
@@ -156,8 +153,6 @@ else
{
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['bgpPeerAdminStatus'] == "start" || $peer['bgpPeerAdminStatus'] == "running") { $admin_col = "green"; } else { $admin_col = "gray"; }
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";
$peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . "";
- echo('");
+ echo('
");
unset($sep);
foreach (dbFetchRows("SELECT * FROM `bgpPeers_cbgp` WHERE `device_id` = ? AND bgpPeerIdentifier = ?", array($peer['device_id'], $peer['bgpPeerIdentifier'])) as $afisafi)
@@ -203,8 +198,7 @@ else
" . $peer['bgpPeerAdminStatus'] . " " . $peer['bgpPeerState'] . " |
" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "
Updates " . format_si($peer['bgpPeerInUpdates']) . "
- " . format_si($peer['bgpPeerOutUpdates']) . " |
-
");
+
" . format_si($peer['bgpPeerOutUpdates']) . "");
unset($invalid);
switch ($vars['graph'])
@@ -242,14 +236,12 @@ else
$graph_array['height'] = "100";
$graph_array['width'] = "218";
$graph_array['to'] = $now;
- echo('| ');
+ echo(' |
|
| ');
include("includes/print-quadgraphs.inc.php");
echo(" |
");
}
-
- $i++;
}
echo("
");
diff --git a/html/pages/search/ipv4.inc.php b/html/pages/search/ipv4.inc.php
index f7d87b27c..e8db87fda 100644
--- a/html/pages/search/ipv4.inc.php
+++ b/html/pages/search/ipv4.inc.php
@@ -55,8 +55,6 @@ $query .= " ORDER BY A.ipv4_address";
echo('| Device | Interface | Address | Description |
');
-$row = 1;
-
foreach (dbFetchRows($query, $param) as $interface)
{
if ($_POST['address'])
@@ -68,8 +66,6 @@ foreach (dbFetchRows($query, $param) as $interface)
if (!$ignore)
{
- if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
-
$speed = humanspeed($interface['ifSpeed']);
$type = humanmedia($interface['ifType']);
@@ -84,14 +80,12 @@ foreach (dbFetchRows($query, $param) as $interface)
{
$interface = ifLabel ($interface, $interface);
- echo('
+ echo('
| ' . generate_device_link($interface) . ' |
' . generate_port_link($interface) . ' ' . $error_img . ' |
' . $interface['ipv4_address'] . '/'.$length.' |
' . $interface['ifAlias'] . " |
\n");
-
- $row++;
}
}
diff --git a/html/pages/search/ipv6.inc.php b/html/pages/search/ipv6.inc.php
index 5124a8d3f..60ec16c4d 100644
--- a/html/pages/search/ipv6.inc.php
+++ b/html/pages/search/ipv6.inc.php
@@ -55,8 +55,6 @@ $query .= " ORDER BY A.ipv6_address";
echo('| Device | Interface | Address | Description |
');
-$row = 1;
-
foreach (dbFetchRows($query, $param) as $interface)
{
if ($_POST['address'])
@@ -68,8 +66,6 @@ foreach (dbFetchRows($query, $param) as $interface)
if (!$ignore)
{
- if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
-
$speed = humanspeed($interface['ifSpeed']);
$type = humanmedia($interface['ifType']);
@@ -84,14 +80,12 @@ foreach (dbFetchRows($query, $param) as $interface)
{
$interface = ifLabel ($interface, $interface);
- echo('
+ echo('
| ' . generate_device_link($interface) . ' |
' . generate_port_link($interface, makeshortif(fixifname($interface['ifDescr']))) . ' ' . $error_img . ' |
' . Net_IPv6::compress($interface['ipv6_address']) . '/'.$length.' |
' . $interface['ifAlias'] . " |
\n");
-
- $row++;
}
}
diff --git a/html/pages/search/mac.inc.php b/html/pages/search/mac.inc.php
index b2eabc2c5..debd44b89 100644
--- a/html/pages/search/mac.inc.php
+++ b/html/pages/search/mac.inc.php
@@ -56,14 +56,10 @@ if ($_POST['interface'])
$query .= " ORDER BY P.ifPhysAddress";
echo('| Device | Interface | MAC Address | Description |
');
-$row = 1;
foreach (dbFetchRows($query, $param) as $entry)
{
-
if (!$ignore)
{
- if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
-
$speed = humanspeed($entry['ifSpeed']);
$type = humanmedia($entry['ifType']);
@@ -76,14 +72,12 @@ foreach (dbFetchRows($query, $param) as $entry)
{
$interface = ifLabel ($interface, $interface);
- echo('
+ echo('
| ' . generate_device_link($entry) . ' |
' . generate_port_link($entry, makeshortif(fixifname($entry['ifDescr']))) . ' ' . $error_img . ' |
' . formatMac($entry['ifPhysAddress']) . ' |
' . $entry['ifAlias'] . " |
\n");
-
- $row++;
}
}