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:
@@ -6,12 +6,9 @@ if (count($sensors))
|
||||
{
|
||||
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>');
|
||||
$i = '0';
|
||||
echo('<table width="100%" valign="top">');
|
||||
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 .= "</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'];
|
||||
$sensor_minigraph = generate_graph_tag($graph_array);
|
||||
|
||||
$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 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>
|
||||
</tr>");
|
||||
$i++;
|
||||
|
||||
}
|
||||
|
||||
echo("</table>");
|
||||
|
Reference in New Issue
Block a user