2007-04-03 14:10:23 +00:00
|
|
|
<?php
|
|
|
|
|
2011-09-19 02:20:16 +00:00
|
|
|
if ($device['status'] == '0') { $class = "div-alert"; } else { $class = "div-normal"; }
|
2011-04-21 12:59:44 +00:00
|
|
|
if ($device['ignore'] == '1')
|
|
|
|
{
|
2011-09-19 02:20:16 +00:00
|
|
|
$class = "div-ignore-alert";
|
2011-04-21 12:59:44 +00:00
|
|
|
if ($device['status'] == '1')
|
|
|
|
{
|
2011-09-19 02:20:16 +00:00
|
|
|
$class = "div-ignore";
|
2011-04-21 12:59:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($device['disabled'] == '1')
|
|
|
|
{
|
2011-09-19 02:20:16 +00:00
|
|
|
$class = "div-disabled";
|
2011-04-21 12:59:44 +00:00
|
|
|
}
|
|
|
|
|
2011-04-21 13:21:07 +00:00
|
|
|
$type = strtolower($device['os']);
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2012-04-24 22:50:15 +00:00
|
|
|
$image = getImage($device);
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2011-04-21 13:21:07 +00:00
|
|
|
echo('
|
2011-04-21 12:59:44 +00:00
|
|
|
<tr bgcolor="'.$device_colour.'" class="'.$class.'">
|
2011-09-19 02:20:16 +00:00
|
|
|
<td width="40" align=center valign=middle style="padding: 21px;">'.$image.'</td>
|
|
|
|
<td valign=middle style="padding: 0 15px;"><span style="font-size: 20px;">' . generate_device_link($device) . '</span>
|
2011-04-21 12:59:44 +00:00
|
|
|
<br />' . $device['location'] . '</td>
|
2011-09-19 02:20:16 +00:00
|
|
|
<td>');
|
|
|
|
|
|
|
|
if (isset($config['os'][$device['os']]['over']))
|
|
|
|
{
|
|
|
|
$graphs = $config['os'][$device['os']]['over'];
|
|
|
|
}
|
|
|
|
elseif (isset($device['os_group']) && isset($config['os'][$device['os_group']]['over']))
|
|
|
|
{
|
|
|
|
$graphs = $config['os'][$device['os_group']]['over'];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$graphs = $config['os']['default']['over'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$graph_array['height'] = "100";
|
|
|
|
$graph_array['width'] = "310";
|
|
|
|
$graph_array['to'] = $now;
|
|
|
|
$graph_array['id'] = $device['device_id'];
|
|
|
|
$graph_array['type'] = "device_bits";
|
|
|
|
$graph_array['from'] = $day;
|
|
|
|
$graph_array['legend'] = "no";
|
|
|
|
$graph_array['popup_title'] = $descr;
|
|
|
|
# $graph_array['link'] = generate_device_link($device_id);
|
|
|
|
# print_graph_popup($graph_array);
|
|
|
|
|
|
|
|
$graph_array['height'] = "45";
|
|
|
|
$graph_array['width'] = "150";
|
|
|
|
$graph_array['bg'] = "FFFFFF00";
|
|
|
|
|
|
|
|
foreach ($graphs as $entry)
|
|
|
|
{
|
|
|
|
$graph_array['type'] = $entry['graph'];
|
|
|
|
$graphhead = $entry['text'];
|
|
|
|
|
|
|
|
echo("<div style='float: right; text-align: center; padding: 1px 5px; margin: 0 1px; background: #f5f5f5;' class='rounded-5px'>");
|
|
|
|
print_graph_popup($graph_array);
|
|
|
|
echo("<div style='font-weight: bold; font-size: 7pt; margin: -3px;'>".$entry['text']."</div>");
|
|
|
|
echo("</div>");
|
|
|
|
}
|
|
|
|
|
|
|
|
unset($graph_array);
|
|
|
|
|
|
|
|
echo('</td>
|
|
|
|
</tr>');
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2011-09-19 02:20:16 +00:00
|
|
|
?>
|