iss #46 - Handle case when All hosts single item selected (use alias for items).

This commit is contained in:
Alexander Zobnin
2015-07-10 14:18:45 +03:00
parent ed30596abd
commit 769a59446e

View File

@@ -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)