Fix alert icons wrongly defaults to blue info level (#10906)

* fix bad alert icons

* fix bad alert icons
This commit is contained in:
louis-oui
2019-12-05 15:51:58 +01:00
committed by Jellyfrog
parent 0f3c6baab3
commit b1e56c77ef

View File

@@ -146,15 +146,9 @@ foreach (dbFetchRows($sql, $param) as $alert) {
}
}
$severity = $alert['severity'];
if ($alert['state'] == 3) {
$severity .= ' <strong>+</strong>';
} elseif ($alert['state'] == 4) {
$severity .= ' <strong>-</strong>';
}
$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>';
$severity = $alert['severity'];
switch ($severity) {
case 'critical':
$severity_ico = '<span class="alert-status label-danger">&nbsp;</span>';
@@ -170,6 +164,12 @@ foreach (dbFetchRows($sql, $param) as $alert) {
break;
}
if ($alert['state'] == 3) {
$severity .= ' <strong>+</strong>';
} elseif ($alert['state'] == 4) {
$severity .= ' <strong>-</strong>';
}
if ((int)$alert['state'] === 2) {
$severity_ico = '<span class="alert-status label-primary">&nbsp;</span>';
}