QueryOptions: update maxDataPoints text and show any value that is configured (#18761)

* update maxDataPoints UI

* use maxDataPoints to calculate interval

* don't change interval calculation
This commit is contained in:
Ryan McKinley
2019-09-10 22:45:08 -07:00
committed by Torkel Ödegaard
parent 4c0e5b14f5
commit 7b856ae040
4 changed files with 29 additions and 24 deletions

View File

@@ -175,9 +175,9 @@ export class SignalWorker extends StreamWorker {
};
initBuffer(refId: string) {
const { speed, buffer } = this.query;
const { speed } = this.query;
const request = this.stream.request;
const maxRows = buffer ? buffer : request.maxDataPoints;
const maxRows = request.maxDataPoints || 1000;
const times = new CircularVector({ capacity: maxRows });
const vals = new CircularVector({ capacity: maxRows });
this.values = [times, vals];
@@ -341,11 +341,11 @@ export class LogsWorker extends StreamWorker {
};
initBuffer(refId: string) {
const { speed, buffer } = this.query;
const { speed } = this.query;
const request = this.stream.request;
const maxRows = buffer ? buffer : request.maxDataPoints;
const maxRows = request.maxDataPoints || 1000;
const times = new CircularVector({ capacity: maxRows });
const lines = new CircularVector({ capacity: maxRows });

View File

@@ -9,7 +9,8 @@
"annotations": true,
"queryOptions": {
"minInterval": true
"minInterval": true,
"maxDataPoints": true
},
"info": {

View File

@@ -18,7 +18,6 @@ export interface StreamingQuery {
speed: number;
spread: number;
noise: number; // wiggle around the signal for min/max
bands?: number; // number of bands around the middle van
buffer?: number;
bands?: number; // number of bands around the middle band
url?: string; // the Fetch URL
}