import React, { PureComponent } from 'react'; import { InlineFormLabel, Button, LegacyForms } from '@grafana/ui'; const { Input } = LegacyForms; import { AzureDataSourceSettings, AzureDataSourceJsonData, AzureDataSourceSecureJsonData } from '../types'; export interface Props { options: AzureDataSourceSettings; onUpdateJsonDataOption: ( key: keyof AzureDataSourceJsonData ) => (event: React.SyntheticEvent) => void; onUpdateSecureJsonDataOption: ( key: keyof AzureDataSourceSecureJsonData ) => (event: React.SyntheticEvent) => void; onResetOptionKey: (key: string) => void; } export class InsightsConfig extends PureComponent { onAppInsightsResetApiKey = () => { this.props.onResetOptionKey('appInsightsApiKey'); }; render() { const { options, onUpdateJsonDataOption, onUpdateSecureJsonDataOption } = this.props; return ( <>

Azure Application Insights Details

{options.secureJsonFields.appInsightsApiKey ? (
API Key
) : (
API Key
)}
Application ID
); } } export default InsightsConfig;