blink status WIP

This commit is contained in:
Alexander Zobnin
2017-12-12 23:01:27 +03:00
parent 1bc4c3384b
commit c1cb3b41d8
5 changed files with 40 additions and 7 deletions

View File

@@ -549,6 +549,24 @@ System.register(['lodash', 'jquery', 'moment', '../datasource-zabbix/utils', 'ap
}
return iconClass;
}
}, {
key: 'getStatusClass',
value: function getStatusClass(trigger) {
var statusClass = '';
if (trigger.value === '1') {
statusClass = 'alert-state-critical';
} else {
statusClass = 'alert-state-ok';
}
var durationSec = (Date.now() - trigger.lastchangeUnix * 1000) / 1000;
if (durationSec < 3000) {
statusClass += ' zabbix-trigger--blinked';
}
return statusClass;
}
}, {
key: 'link',
value: function link(scope, elem, attrs, ctrl) {