|
|
@@ -4,6 +4,7 @@ import angular from 'angular';
|
|
|
import _ from 'lodash';
|
|
|
import coreModule from '../../core/core_module';
|
|
|
import config from 'app/core/config';
|
|
|
+import alertDef from './alert_def';
|
|
|
|
|
|
export class AlertPageCtrl {
|
|
|
|
|
|
@@ -16,7 +17,10 @@ export class AlertPageCtrl {
|
|
|
|
|
|
loadAlerts() {
|
|
|
this.backendSrv.get('/api/alerts').then(result => {
|
|
|
- this.alerts = result;
|
|
|
+ this.alerts = _.map(result, alert => {
|
|
|
+ alert.iconCss = alertDef.getCssForState(alert.state);
|
|
|
+ return alert;
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
}
|