mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
New alert design (#9214)
* ux: updated alert design * fixed bg-color for alerts * more changes to alerts, index fixed
This commit is contained in:
committed by
Torkel Ödegaard
parent
057b8a6b2d
commit
90602942f5
@@ -33,6 +33,14 @@ export class AlertSrv {
|
||||
appEvents.on('confirm-modal', this.showConfirmModal.bind(this));
|
||||
}
|
||||
|
||||
getIconForSeverity(severity) {
|
||||
switch (severity) {
|
||||
case 'success': return 'fa fa-check';
|
||||
case 'error': return 'fa fa-exclamation-triangle';
|
||||
default: return 'fa fa-exclamation';
|
||||
}
|
||||
}
|
||||
|
||||
set(title, text, severity, timeout) {
|
||||
if (_.isObject(text)) {
|
||||
console.log('alert error', text);
|
||||
@@ -45,6 +53,7 @@ export class AlertSrv {
|
||||
title: title || '',
|
||||
text: text || '',
|
||||
severity: severity || 'info',
|
||||
icon: this.getIconForSeverity(severity)
|
||||
};
|
||||
|
||||
var newAlertJson = angular.toJson(newAlert);
|
||||
|
||||
Reference in New Issue
Block a user