Fixed #46 - wrong metric names when using templated variables and "All" value with "glob" format.

This commit is contained in:
Alexander Zobnin
2015-07-06 18:38:41 +03:00
parent fb30e70e2b
commit e8079bf4aa

View File

@@ -124,7 +124,9 @@ function (angular, _, kbn) {
return []; return [];
} else { } else {
items = _.flatten(items); items = _.flatten(items);
var alias = target.item.name === 'All' ? undefined : templateSrv.replace(target.alias);
// Use alias only for single metric, otherwise use item names
var alias = items.length > 1 ? undefined : templateSrv.replace(target.alias);
if ((from < useTrendsFrom) && self.trends) { if ((from < useTrendsFrom) && self.trends) {
return zabbix.getTrends(items, from, to) return zabbix.getTrends(items, from, to)