@grafana/async-query-data
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -40,2 +40,3 @@ import { DataSourceWithBackend, config, getBackendSrv, toDataQueryResponse } from '@grafana/runtime'; | ||
}; | ||
this.requestIdPrefix = instanceSettings.id; | ||
this.asyncQueryDataSupport = asyncQueryDataSupport; | ||
@@ -79,3 +80,3 @@ } | ||
return getRequestLooper( | ||
__spreadProps(__spreadValues({}, request), { targets: [target], requestId: `aws_ts_${this.requestCounter++}` }), | ||
__spreadProps(__spreadValues({}, request), { targets: [target], requestId: `${this.requestIdPrefix}_${this.requestCounter++}` }), | ||
{ | ||
@@ -133,5 +134,8 @@ /** | ||
}; | ||
return getBackendSrv().fetch(options).pipe(map((result) => ({ data: toDataQueryResponse(result).data })), catchError((err) => { | ||
return of(toDataQueryResponse(err)); | ||
})); | ||
return getBackendSrv().fetch(options).pipe( | ||
map((result) => ({ data: toDataQueryResponse(result).data })), | ||
catchError((err) => { | ||
return of(toDataQueryResponse(err)); | ||
}) | ||
); | ||
}, | ||
@@ -138,0 +142,0 @@ /** |
@@ -13,2 +13,3 @@ import { DataQuery, DataSourceJsonData, DataSourceInstanceSettings, DataQueryRequest, DataQueryResponse, LoadingState } from '@grafana/data'; | ||
private asyncQueryDataSupport; | ||
private requestIdPrefix; | ||
constructor(instanceSettings: DataSourceInstanceSettings<TOptions>, asyncQueryDataSupport?: boolean); | ||
@@ -15,0 +16,0 @@ query(request: DataQueryRequest<TQuery>): Observable<DataQueryResponse>; |
@@ -925,2 +925,3 @@ 'use strict'; | ||
}; | ||
this.requestIdPrefix = instanceSettings.id; | ||
this.asyncQueryDataSupport = asyncQueryDataSupport; | ||
@@ -964,3 +965,3 @@ } | ||
return getRequestLooper( | ||
__spreadProps(__spreadValues({}, request), { targets: [target], requestId: `aws_ts_${this.requestCounter++}` }), | ||
__spreadProps(__spreadValues({}, request), { targets: [target], requestId: `${this.requestIdPrefix}_${this.requestCounter++}` }), | ||
{ | ||
@@ -1018,5 +1019,8 @@ /** | ||
}; | ||
return runtime.getBackendSrv().fetch(options).pipe(map((result) => ({ data: runtime.toDataQueryResponse(result).data })), catchError((err) => { | ||
return rxjs.of(runtime.toDataQueryResponse(err)); | ||
})); | ||
return runtime.getBackendSrv().fetch(options).pipe( | ||
map((result) => ({ data: runtime.toDataQueryResponse(result).data })), | ||
catchError((err) => { | ||
return rxjs.of(runtime.toDataQueryResponse(err)); | ||
}) | ||
); | ||
}, | ||
@@ -1023,0 +1027,0 @@ /** |
{ | ||
"name": "@grafana/async-query-data", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "Async query support for Grafana", | ||
@@ -34,3 +34,3 @@ "main": "dist/index.js", | ||
"@grafana/data": "9.3.2", | ||
"@grafana/eslint-config": "^5.1.0", | ||
"@grafana/eslint-config": "^6.0.1", | ||
"@grafana/runtime": "9.3.2", | ||
@@ -51,3 +51,3 @@ "@grafana/tsconfig": "^1.2.0-rc1", | ||
"eslint": "^8.31.0", | ||
"eslint-plugin-jsdoc": "^39.6.4", | ||
"eslint-plugin-jsdoc": "^46.7.0", | ||
"eslint-plugin-react": "^7.31.11", | ||
@@ -54,0 +54,0 @@ "eslint-plugin-react-hooks": "^4.6.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
272836
2280