Fixed host name displaying (not worked in Zabbix 3.0).

This commit is contained in:
Alexander Zobnin
2016-03-30 20:55:07 +03:00
parent 14d8caf61e
commit 98f77ee661
2 changed files with 6 additions and 1 deletions

View File

@@ -313,7 +313,7 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) {
value: 1
},
selectGroups: ['name'],
selectHosts: ['name'],
selectHosts: ['name', 'host'],
selectItems: ['name', 'key_', 'lastvalue'],
selectLastEvent: 'extend'
};

View File

@@ -122,6 +122,11 @@ class TriggerPanelCtrl extends MetricsPanelCtrl {
}
triggerObj.age = timestamp.fromNow(true);
// Set host that the trigger belongs
if (trigger.hosts.length) {
triggerObj.host = trigger.hosts[0].name;
}
// Set color
if (trigger.value === '1') {
triggerObj.color = self.panel.triggerSeverity[trigger.priority].color;