From 769a59446ec26cc33c351922d25eb3352327f3da Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 10 Jul 2015 14:18:45 +0300 Subject: [PATCH] iss #46 - Handle case when All hosts single item selected (use alias for items). --- zabbix/datasource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix/datasource.js b/zabbix/datasource.js index db23d88..17a83a5 100644 --- a/zabbix/datasource.js +++ b/zabbix/datasource.js @@ -126,7 +126,7 @@ function (angular, _, kbn) { items = _.flatten(items); // Use alias only for single metric, otherwise use item names - var alias = items.length > 1 ? undefined : templateSrv.replace(target.alias); + var alias = target.item.name === 'All' || itemnames.length > 1 ? undefined : templateSrv.replace(target.alias); if ((from < useTrendsFrom) && self.trends) { return self.zabbixAPI.getTrends(items, from, to)