Option to enable triggers background highlighting, #532

This commit is contained in:
Alexander Zobnin
2018-03-15 17:49:49 +03:00
parent 22d1643caa
commit aa20e3dc36
14 changed files with 107 additions and 13 deletions

View File

@@ -675,6 +675,17 @@ System.register(['lodash', 'jquery', 'moment', '../datasource-zabbix/utils', 'ap
return statusClass;
}
}, {
key: 'getBackground',
value: function getBackground(trigger) {
// console.log(trigger.color, this.contextSrv.user.lightTheme);
var mainColor = trigger.color;
var secondColor = this.contextSrv.user.lightTheme ? '#dde4ed' : '#262628';
if (this.contextSrv.user.lightTheme) {
return 'linear-gradient(135deg, ' + secondColor + ', ' + mainColor + ')';
}
return 'linear-gradient(135deg, ' + mainColor + ', ' + secondColor + ')';
}
}, {
key: 'isNewTrigger',
value: function isNewTrigger(trigger) {