mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix templating
This commit is contained in:
parent
add5bb47d5
commit
1bbd056797
@ -135,7 +135,12 @@ function (angular, _) {
|
||||
.filter(function(dimension) {
|
||||
return dimension.Name === dimensionKey;
|
||||
})
|
||||
.pluck('Value').uniq().sortBy().value();
|
||||
.pluck('Value')
|
||||
.uniq()
|
||||
.sortBy()
|
||||
.map(function(value) {
|
||||
return {value: value, text: value};
|
||||
}).value();
|
||||
});
|
||||
};
|
||||
|
||||
@ -204,11 +209,7 @@ function (angular, _) {
|
||||
dimensionPart = templateSrv.replace(dimensionValuesQuery[6]);
|
||||
|
||||
dimensions = parseDimensions(dimensionPart);
|
||||
return this.getDimensionValues(region, namespace, metricName, dimensionKey, dimensions).then(function(result) {
|
||||
return _.map(result, function(dimension_value) {
|
||||
return { text: dimension_value };
|
||||
});
|
||||
});
|
||||
return this.getDimensionValues(region, namespace, metricName, dimensionKey, dimensions);
|
||||
}
|
||||
|
||||
var dimensionsQuery = query.match(/^dimensions\(([^,]+?),\s?([^,]+?),\s?([^,]+?)(,\s?([^)]*))?\)/);
|
||||
|
Loading…
Reference in New Issue
Block a user