Add more detail to webgui alerts (#10388)
* alert sysname * use existing config option * add location to alert table * made location a link * fix formating * Update alerts.inc.php
This commit is contained in:
parent
06b85f5b07
commit
fd42ea6e83
|
@ -230,6 +230,7 @@ if (defined('SHOW_SETTINGS')) {
|
|||
<th data-column-id="rule">Rule</th>
|
||||
<th data-column-id="details" data-sortable="false"></th>
|
||||
<th data-column-id="hostname">Hostname</th>
|
||||
<th data-column-id="location">Location</th>
|
||||
<th data-column-id="ack_ico" data-sortable="false">ACK</th>
|
||||
<th data-column-id="notes" data-sortable="false">Notes</th>';
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
|
||||
use LibreNMS\Authentication\LegacyAuth;
|
||||
use LibreNMS\Config;
|
||||
|
||||
$where = ' `devices`.`disabled` = 0';
|
||||
|
||||
|
@ -155,7 +156,7 @@ foreach (dbFetchRows($sql, $param) as $alert) {
|
|||
$severity .= ' <strong>-</strong>';
|
||||
}
|
||||
|
||||
$hostname = '<div class="incident">' . generate_device_link($alert, shorthost($alert['hostname'])) . '<div id="incident' . ($rulei + 1) . '" class="collapse">' . $fault_detail . '</div></div>';
|
||||
$hostname = '<div class="incident">' . generate_device_link($alert, format_hostname($alert, shorthost($alert['hostname']))) . '<div id="incident' . ($rulei + 1) . '" class="collapse">' . $fault_detail . '</div></div>';
|
||||
|
||||
switch ($severity) {
|
||||
case 'critical':
|
||||
|
@ -198,6 +199,7 @@ foreach (dbFetchRows($sql, $param) as $alert) {
|
|||
'rule' => '<i title="' . htmlentities($alert['rule']) . '"><a href="' . generate_url(array('page' => 'alert-rules')) . '">' . htmlentities($alert['name']) . '</a></i>',
|
||||
'details' => '<a class="fa fa-plus incident-toggle" style="display:none" data-toggle="collapse" data-target="#incident' . ($rulei) . '" data-parent="#alerts"></a>',
|
||||
'hostname' => $hostname,
|
||||
'location' => generate_link($alert['location'], array('page' => 'devices', 'location' => $alert['location'])),
|
||||
'timestamp' => ($alert['timestamp'] ? $alert['timestamp'] : 'N/A'),
|
||||
'severity' => $severity_ico,
|
||||
'state' => $alert['state'],
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<th data-column-id="rule">Rule</th>
|
||||
<th data-column-id="details" data-sortable="false"></th>
|
||||
<th data-column-id="hostname">Hostname</th>
|
||||
<th data-column-id="location">Location</th>
|
||||
<th data-column-id="ack_ico" data-sortable="false">ACK</th>
|
||||
<th data-column-id="notes" data-sortable="false">Notes</th>
|
||||
<th data-column-id="proc" data-sortable="false" data-visible="{{ $proc ? 'true' : 'false' }}">URL</th>
|
||||
|
|
Loading…
Reference in New Issue