mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Graphite: Fix for nested complex queries, where a query references a query that references another query (ie the #[A-Z] syntax), Fixes #1372
This commit is contained in:
parent
5cef73331c
commit
d3c37bda71
@ -13,6 +13,7 @@
|
|||||||
- [Issue #1298](https://github.com/grafana/grafana/issues/1298). InfluxDB: Fix handling of empty array in templating variable query
|
- [Issue #1298](https://github.com/grafana/grafana/issues/1298). InfluxDB: Fix handling of empty array in templating variable query
|
||||||
- [Issue #1309](https://github.com/grafana/grafana/issues/1309). Graph: Fixed issue when using zero as a grid threshold
|
- [Issue #1309](https://github.com/grafana/grafana/issues/1309). Graph: Fixed issue when using zero as a grid threshold
|
||||||
- [Issue #1345](https://github.com/grafana/grafana/issues/1345). UI: Fixed position of confirm modal when scrolled down
|
- [Issue #1345](https://github.com/grafana/grafana/issues/1345). UI: Fixed position of confirm modal when scrolled down
|
||||||
|
- [Issue #1372](https://github.com/grafana/grafana/issues/1372). Graphite: Fix for nested complex queries, where a query references a query that references another query (ie the #[A-Z] syntax)
|
||||||
|
|
||||||
**Tech**
|
**Tech**
|
||||||
- [Issue #1311](https://github.com/grafana/grafana/issues/1311). Tech: Updated Font-Awesome from 3.2 to 4.2
|
- [Issue #1311](https://github.com/grafana/grafana/issues/1311). Tech: Updated Font-Awesome from 3.2 to 4.2
|
||||||
|
@ -276,6 +276,7 @@ function (angular, _, $, config, kbn, moment) {
|
|||||||
|
|
||||||
targetValue = targets[this._seriesRefLetters[i]];
|
targetValue = targets[this._seriesRefLetters[i]];
|
||||||
targetValue = targetValue.replace(regex, nestedSeriesRegexReplacer);
|
targetValue = targetValue.replace(regex, nestedSeriesRegexReplacer);
|
||||||
|
targets[this._seriesRefLetters[i]] = targetValue;
|
||||||
|
|
||||||
clean_options.push("target=" + encodeURIComponent(targetValue));
|
clean_options.push("target=" + encodeURIComponent(targetValue));
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,13 @@ define([
|
|||||||
expect(results[2]).to.be('target=asPercent(series1%2Cseries2)');
|
expect(results[2]).to.be('target=asPercent(series1%2Cseries2)');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should replace target placeholder when nesting query references', function() {
|
||||||
|
var results = ctx.ds.buildGraphiteParams({
|
||||||
|
targets: [{target: 'series1'}, {target: 'sumSeries(#A)'}, {target: 'asPercent(#A,#B)'}]
|
||||||
|
});
|
||||||
|
expect(results[2]).to.be('target=' + encodeURIComponent("asPercent(series1,sumSeries(series1))"));
|
||||||
|
});
|
||||||
|
|
||||||
it('should fix wrong minute interval parameters', function() {
|
it('should fix wrong minute interval parameters', function() {
|
||||||
var results = ctx.ds.buildGraphiteParams({
|
var results = ctx.ds.buildGraphiteParams({
|
||||||
targets: [{target: "summarize(prod.25m.count, '25m', 'sum')" }]
|
targets: [{target: "summarize(prod.25m.count, '25m', 'sum')" }]
|
||||||
|
Loading…
Reference in New Issue
Block a user