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
@@ -110,7 +110,7 @@ class DataSourceWithBackend<
* Ideally final -- any other implementation may not work as expected
*/
query(request: DataQueryRequest<TQuery>): Observable<DataQueryResponse> {
const { intervalMs, maxDataPoints, range, requestId } = request;
const { intervalMs, maxDataPoints, range, requestId, hideFromInspector = false } = request;
let targets = request.targets;
if (this.filterQuery) {
@@ -174,6 +174,7 @@ class DataSourceWithBackend<
method: 'POST',
data: body,
requestId,
hideFromInspector,
})
.pipe(
switchMap((raw) => {