diff --git a/zabbix/datasource.js b/zabbix/datasource.js index a6cfcbd..9fdb34d 100644 --- a/zabbix/datasource.js +++ b/zabbix/datasource.js @@ -94,7 +94,7 @@ function (angular, _, kbn) { // Create request for each target var promises = _.map(options.targets, function(target) { - if (!target.ITService) { + if (!target.mode || target.mode === 0) { // Don't show undefined and hidden targets if (target.hide || !target.group || !target.host || !target.application || !target.item) { @@ -199,7 +199,10 @@ function (angular, _, kbn) { }); } }); - } else { + } + + // IT services mode + else if (target.mode === 1) { // Don't show undefined and hidden targets if (target.hide || !target.itservice || !target.slaProperty) { return []; @@ -208,6 +211,11 @@ function (angular, _, kbn) { .then(_.bind(zabbixHelperSrv.handleSLAResponse, zabbixHelperSrv, target.itservice, target.slaProperty)); } } + + // Text metrics mode + else if (target.mode === 2) { + return []; + } }, this); return $q.all(_.flatten(promises)).then(function (results) { diff --git a/zabbix/partials/query.editor.html b/zabbix/partials/query.editor.html index d5a7170..26e2ea5 100644 --- a/zabbix/partials/query.editor.html +++ b/zabbix/partials/query.editor.html @@ -16,14 +16,18 @@
-