Fixed templates.
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user