Iss #148 - fixed applications handling for Zabbix 2.2.

This commit is contained in:
Alexander Zobnin
2016-02-13 00:34:17 +03:00
parent ee02c78cf8
commit f2201f9461

View File

@@ -189,7 +189,11 @@ function (angular, _, utils) {
return _.map(_.groupBy(applications, 'name'), function(value, key) {
// Hack for supporting different apis (2.2 vs 2.4 vs 3.0)
var hostField = value['hosts'] ? 'hosts' : 'host';
var hostField = 'host';
if (value[0] && value[0]['hosts']) {
// For Zabbix 2.2
hostField = 'hosts';
}
return {
name: key,