|
@@ -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')" }]
|