Fixed templates.

This commit is contained in:
Alexander Zobnin
2016-02-02 17:15:56 +03:00
parent fa10d76e2b
commit 38b83eee29

View File

@@ -285,13 +285,12 @@ function (angular, _, dateMath, utils, metricFunctions) {
var parts = []; var parts = [];
_.each(query.split('.'), function (part) { _.each(query.split('.'), function (part) {
part = templateSrv.replace(part); part = templateSrv.replace(part);
if (part[0] === '{') {
// Convert multiple mettrics to array // Replace wildcard to regex
// "{metric1,metcic2,...,metricN}" --> [metric1, metcic2,..., metricN] if (part === '*') {
parts.push(zabbixHelperSrv.splitMetrics(part)); part = '/.*/';
} else {
parts.push(part);
} }
parts.push(part);
}); });
var template = _.object(['group', 'host', 'app', 'item'], parts); var template = _.object(['group', 'host', 'app', 'item'], parts);