mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Corrected div element IDs when listing alerts in tables (#10587)
Use $alert['id'] instead of $rulei as HTML div elements ids.
This commit is contained in:
@@ -153,7 +153,7 @@ foreach (dbFetchRows($sql, $param) as $alert) {
|
||||
$severity .= ' <strong>-</strong>';
|
||||
}
|
||||
|
||||
$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>';
|
||||
$hostname = '<div class="incident">' . generate_device_link($alert, format_hostname($alert, shorthost($alert['hostname']))) . '<div id="incident' . ($alert['id']) . '" class="collapse">' . $fault_detail . '</div></div>';
|
||||
|
||||
switch ($severity) {
|
||||
case 'critical':
|
||||
@@ -194,7 +194,7 @@ foreach (dbFetchRows($sql, $param) as $alert) {
|
||||
$response[] = array(
|
||||
'id' => $rulei++,
|
||||
'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>',
|
||||
'details' => '<a class="fa fa-plus incident-toggle" style="display:none" data-toggle="collapse" data-target="#incident' . ($alert['id']) . '" data-parent="#alerts"></a>',
|
||||
'hostname' => $hostname,
|
||||
'location' => generate_link($alert['location'], array('page' => 'devices', 'location' => $alert['location'])),
|
||||
'timestamp' => ($alert['timestamp'] ? $alert['timestamp'] : 'N/A'),
|
||||
|
Reference in New Issue
Block a user