diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/ConfigEditor.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/ConfigEditor.tsx index e97ba25f4dd..e97897b7eed 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/ConfigEditor.tsx +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/ConfigEditor.tsx @@ -296,7 +296,12 @@ export class ConfigEditor extends PureComponent { onLoadWorkspaces={this.getWorkspaces} /> - + ); } diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.test.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.test.tsx index bcbe3a9220d..fbfce5c210e 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.test.tsx +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.test.tsx @@ -35,6 +35,7 @@ const setup = (propOverrides?: object) => { readOnly: false, }, onUpdateOption: jest.fn(), + onUpdateSecureOption: jest.fn(), onResetOptionKey: jest.fn(), }; diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.tsx index 40ace1d96d8..eb1e9c9ea23 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.tsx +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.tsx @@ -4,16 +4,17 @@ import { AzureDataSourceSettings } from '../types'; export interface Props { options: AzureDataSourceSettings; - onUpdateOption: (key: string, val: any, secure: boolean) => void; + onUpdateOption: (key: string, val: any) => void; + onUpdateSecureOption: (key: string, val: any) => void; onResetOptionKey: (key: string) => void; } export class InsightsConfig extends PureComponent { onAppInsightsAppIdChange = (event: ChangeEvent) => { - this.props.onUpdateOption('appInsightsAppId', event.target.value, false); + this.props.onUpdateOption('appInsightsAppId', event.target.value); }; onAppInsightsApiKeyChange = (event: ChangeEvent) => { - this.props.onUpdateOption('appInsightsApiKey', event.target.value, true); + this.props.onUpdateSecureOption('appInsightsApiKey', event.target.value); }; onAppInsightsResetApiKey = () => { diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/__snapshots__/ConfigEditor.test.tsx.snap b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/__snapshots__/ConfigEditor.test.tsx.snap index d8072f5bea3..6a2dd524ec1 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/__snapshots__/ConfigEditor.test.tsx.snap +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/__snapshots__/ConfigEditor.test.tsx.snap @@ -80,6 +80,7 @@ exports[`Render should render component 1`] = `