2009-09-07 11:07:59 +00:00
|
|
|
<?php
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2011-03-17 11:46:02 +00:00
|
|
|
$hostname = gethostbyid($entry['host']);
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2011-03-17 11:46:02 +00:00
|
|
|
unset($icon);
|
2017-01-29 01:44:36 +02:00
|
|
|
$icon_returned = geteventicon($entry['message']);
|
|
|
|
$icon_type = $icon_returned['icon'];
|
|
|
|
$icon_colour = $icon_returned['colour'];
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2017-01-29 01:44:36 +02:00
|
|
|
if ($icon_type) {
|
|
|
|
$icon = "<i class='fa $icon_type fa-lg' style='color:$icon_colour' aria-hidden='true'></i>";
|
|
|
|
} else {
|
|
|
|
$icon = "<i class='fa fa-bookmark-o fa-lg' style='color:black' aria-hidden='true'></i>";
|
2015-07-13 20:10:26 +02:00
|
|
|
}
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
echo '<tr>
|
2017-01-29 01:44:36 +02:00
|
|
|
<td>'.$icon.'
|
2015-07-13 20:10:26 +02:00
|
|
|
'.$entry['datetime'].'
|
|
|
|
</td>';
|
2010-06-20 21:37:05 +00:00
|
|
|
|
2011-11-07 19:39:15 +00:00
|
|
|
if (!isset($vars['device'])) {
|
2015-07-13 20:10:26 +02:00
|
|
|
$dev = device_by_id_cache($entry['host']);
|
|
|
|
echo '<td>
|
|
|
|
'.generate_device_link($dev, shorthost($dev['hostname'])).'
|
|
|
|
</td>';
|
2011-03-17 11:46:02 +00:00
|
|
|
}
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
if ($entry['type'] == 'interface') {
|
|
|
|
$this_if = ifLabel(getifbyid($entry['reference']));
|
|
|
|
$entry['link'] = '<b>'.generate_port_link($this_if, makeshortif(strtolower($this_if['label']))).'</b>';
|
2016-08-18 20:28:22 -05:00
|
|
|
} else {
|
2015-07-13 20:10:26 +02:00
|
|
|
$entry['link'] = 'System';
|
2011-03-17 11:46:02 +00:00
|
|
|
}
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
echo '<td>'.$entry['link'].'</td>';
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2016-02-17 13:59:58 +00:00
|
|
|
echo '<td>'.htmlspecialchars($entry['message']).'</td>
|
2015-07-13 20:10:26 +02:00
|
|
|
</tr>';
|