triggers panel: fix icon for OK events
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
<label class="gf-form-label width-3">{{ trigger.priority }}</label>
|
||||
<label class="gf-form-label triggers-severity-config"
|
||||
ng-style="{color: trigger.color}">
|
||||
<i class="icon-gf" ng-class="ctrl.getAlertIconClass(trigger)"></i>
|
||||
<i class="icon-gf" ng-class="ctrl.getAlertIconClassBySeverity(trigger)"></i>
|
||||
</label>
|
||||
<input type="text"
|
||||
class="gf-form-input width-12"
|
||||
|
||||
@@ -490,9 +490,8 @@ export class TriggerPanelCtrl extends PanelCtrl {
|
||||
}
|
||||
|
||||
getAlertIconClass(trigger) {
|
||||
const triggerValue = Number(trigger.value);
|
||||
let iconClass = '';
|
||||
if (triggerValue || trigger.color) {
|
||||
if (trigger.value === '1') {
|
||||
if (trigger.priority >= 3) {
|
||||
iconClass = 'icon-gf-critical';
|
||||
} else {
|
||||
@@ -508,6 +507,14 @@ export class TriggerPanelCtrl extends PanelCtrl {
|
||||
return iconClass;
|
||||
}
|
||||
|
||||
getAlertIconClassBySeverity(triggerSeverity) {
|
||||
let iconClass = 'icon-gf-warning';
|
||||
if (triggerSeverity.priority >= 3) {
|
||||
iconClass = 'icon-gf-critical';
|
||||
}
|
||||
return iconClass;
|
||||
}
|
||||
|
||||
getAlertStateClass(trigger) {
|
||||
let statusClass = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user