mirror of https://github.com/grafana/grafana
AzureMonitor: Remove deprecated configuration parameters (#45860)
parent
700f6863f2
commit
d4b05f9421
@ -1,7 +1,8 @@ |
||||
import React from 'react'; |
||||
import { render, screen } from '@testing-library/react'; |
||||
import AnalyticsConfig, { Props } from './AnalyticsConfig'; |
||||
import userEvent from '@testing-library/user-event'; |
||||
import React from 'react'; |
||||
|
||||
import AnalyticsConfig, { Props } from './AnalyticsConfig'; |
||||
|
||||
const setup = (propsFunc?: (props: Props) => Props) => { |
||||
let props: Props = { |
@ -1,8 +1,9 @@ |
||||
import { Alert, Button } from '@grafana/ui'; |
||||
import React, { FunctionComponent, useMemo } from 'react'; |
||||
import { AzureCredentialsForm } from './AzureCredentialsForm'; |
||||
import { Button, Alert } from '@grafana/ui'; |
||||
import { AzureDataSourceSettings } from '../types'; |
||||
import { getCredentials } from '../credentials'; |
||||
|
||||
import { getCredentials } from '../../../credentials'; |
||||
import { AzureDataSourceSettings } from '../../../types'; |
||||
import { AzureCredentialsForm } from '../../AzureCredentialsForm'; |
||||
|
||||
export interface Props { |
||||
options: AzureDataSourceSettings; |
@ -0,0 +1,13 @@ |
||||
import { config } from '@grafana/runtime'; |
||||
import { gt, valid } from 'semver'; |
||||
|
||||
import { AzureDataSourceSettings } from '../../types'; |
||||
|
||||
export function isAppInsightsConfigured(options: AzureDataSourceSettings) { |
||||
return !!(options.jsonData.appInsightsAppId && options.secureJsonFields.appInsightsApiKey); |
||||
} |
||||
|
||||
export function gtGrafana9() { |
||||
// AppInsights configuration will be removed with Grafana 9
|
||||
return valid(config.buildInfo.version) && gt(config.buildInfo.version, '9.0.0-beta1'); |
||||
} |
Loading…
Reference in new issue