Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files * Update eslint plugin * updated files
This commit is contained in:
@@ -59,10 +59,10 @@ export class DataSourceWithBackend<
|
||||
let targets = request.targets;
|
||||
|
||||
if (this.filterQuery) {
|
||||
targets = targets.filter(q => this.filterQuery!(q));
|
||||
targets = targets.filter((q) => this.filterQuery!(q));
|
||||
}
|
||||
|
||||
const queries = targets.map(q => {
|
||||
const queries = targets.map((q) => {
|
||||
let datasourceId = this.id;
|
||||
|
||||
if (q.datasource === ExpressionDatasourceID) {
|
||||
@@ -114,7 +114,7 @@ export class DataSourceWithBackend<
|
||||
map((rsp: any) => {
|
||||
return toDataQueryResponse(rsp);
|
||||
}),
|
||||
catchError(err => {
|
||||
catchError((err) => {
|
||||
return of(toDataQueryResponse(err));
|
||||
})
|
||||
);
|
||||
@@ -162,10 +162,10 @@ export class DataSourceWithBackend<
|
||||
async callHealthCheck(): Promise<HealthCheckResult> {
|
||||
return getBackendSrv()
|
||||
.request({ method: 'GET', url: `/api/datasources/${this.id}/health`, showErrorAlert: false })
|
||||
.then(v => {
|
||||
.then((v) => {
|
||||
return v as HealthCheckResult;
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
return err.data as HealthCheckResult;
|
||||
});
|
||||
}
|
||||
@@ -175,7 +175,7 @@ export class DataSourceWithBackend<
|
||||
* see public/app/features/datasources/state/actions.ts for what needs to be returned here
|
||||
*/
|
||||
async testDatasource(): Promise<any> {
|
||||
return this.callHealthCheck().then(res => {
|
||||
return this.callHealthCheck().then((res) => {
|
||||
if (res.status === HealthStatus.OK) {
|
||||
return {
|
||||
status: 'success',
|
||||
|
||||
Reference in New Issue
Block a user