DataSource: Adding possibility to hide queries from the inspector (#54892)

* adding the possibility to hide queries when they are executed via the DataSourceWithBackend.query
This commit is contained in:
Marcus Andersson
2022-09-13 13:27:16 +02:00
committed by GitHub
parent 6bc0d97c49
commit c95b530502
4 changed files with 80 additions and 19 deletions

View File

@@ -678,13 +678,17 @@ export function queryLogsVolume<TQuery extends DataQuery, TOptions extends DataS
): Observable<DataQueryResponse> {
const timespan = options.range.to.valueOf() - options.range.from.valueOf();
const intervalInfo = getIntervalInfo(logsVolumeRequest.scopedVars, timespan);
logsVolumeRequest.interval = intervalInfo.interval;
logsVolumeRequest.scopedVars.__interval = { value: intervalInfo.interval, text: intervalInfo.interval };
if (intervalInfo.intervalMs !== undefined) {
logsVolumeRequest.intervalMs = intervalInfo.intervalMs;
logsVolumeRequest.scopedVars.__interval_ms = { value: intervalInfo.intervalMs, text: intervalInfo.intervalMs };
}
logsVolumeRequest.hideFromInspector = true;
return new Observable((observer) => {
let rawLogsVolume: DataFrame[] = [];
observer.next({