From 1e221b645270587ffa657d77eec34d7577e500c1 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Tue, 17 Aug 2021 16:46:15 +0100 Subject: [PATCH] AzureMonitor: Show error message when subscriptions request fails in ConfigEditor (#37837) * Fix jsdoc description for datasourceRequest * Align default subscription width with other fields * AzureMonitor: Show error message when requesting default subscriptions in ConfigEditor * update snapshots: --- .../src/services/backendSrv.ts | 3 +- .../components/AzureCredentialsForm.tsx | 2 +- .../components/ConfigEditor.tsx | 40 ++++++++++++++++--- .../AzureCredentialsForm.test.tsx.snap | 6 +-- 4 files changed, 41 insertions(+), 10 deletions(-) diff --git a/packages/grafana-runtime/src/services/backendSrv.ts b/packages/grafana-runtime/src/services/backendSrv.ts index eb9249daf8a..8f39f2551c1 100644 --- a/packages/grafana-runtime/src/services/backendSrv.ts +++ b/packages/grafana-runtime/src/services/backendSrv.ts @@ -152,11 +152,12 @@ export interface BackendSrv { request(options: BackendSrvRequest): Promise; /** - * @deprecated Use the fetch function instead * Special function used to communicate with datasources that will emit core * events that the Grafana QueryInspector and QueryEditor is listening for to be able * to display datasource query information. Can be skipped by adding `option.silent` * when initializing the request. + * + * @deprecated Use the fetch function instead */ datasourceRequest(options: BackendSrvRequest): Promise>; diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/AzureCredentialsForm.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/AzureCredentialsForm.tsx index bdfa47550ef..57cc9517c9e 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/AzureCredentialsForm.tsx +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/AzureCredentialsForm.tsx @@ -252,7 +252,7 @@ export const AzureCredentialsForm: FunctionComponent = (props: Props) =>
Default Subscription -
+