diff --git a/packages/grafana-data/src/types/config.ts b/packages/grafana-data/src/types/config.ts index 5d61134d88d..c1e8219c900 100644 --- a/packages/grafana-data/src/types/config.ts +++ b/packages/grafana-data/src/types/config.ts @@ -38,7 +38,6 @@ export interface FeatureToggles { * Available only in Grafana Enterprise */ meta: boolean; - cloudwatchLogs: boolean; newVariables: boolean; } diff --git a/packages/grafana-runtime/src/config.ts b/packages/grafana-runtime/src/config.ts index 9dc31e6b6e6..1e4bb6582f3 100644 --- a/packages/grafana-runtime/src/config.ts +++ b/packages/grafana-runtime/src/config.ts @@ -52,7 +52,6 @@ export class GrafanaBootConfig implements GrafanaConfig { expressions: false, newEdit: false, meta: false, - cloudwatchLogs: false, newVariables: true, }; licenseInfo: LicenseInfo = {} as LicenseInfo; diff --git a/public/app/features/explore/Explore.tsx b/public/app/features/explore/Explore.tsx index 51f9d6ce5c2..3c13c78acd2 100644 --- a/public/app/features/explore/Explore.tsx +++ b/public/app/features/explore/Explore.tsx @@ -22,7 +22,6 @@ import { } from '@grafana/data'; import store from 'app/core/store'; -import config from 'app/core/config'; import LogsContainer from './LogsContainer'; import QueryRows from './QueryRows'; import TableContainer from './TableContainer'; @@ -306,10 +305,6 @@ export class Explore extends React.PureComponent { const StartPage = datasourceInstance?.components?.ExploreStartPage; const showStartPage = !queryResponse || queryResponse.state === LoadingState.NotStarted; - // TEMP: Remove for 7.0 - const cloudwatchLogsDisabled = - datasourceInstance?.meta?.id === 'cloudwatch' && !config.featureToggles.cloudwatchLogs; - // gets an error without a refID, so non-query-row-related error, like a connection error const queryErrors = queryResponse.error ? [queryResponse.error] : undefined; const queryError = getFirstNonQueryRowSpecificError(queryErrors); @@ -372,7 +367,7 @@ export class Explore extends React.PureComponent { {mode === ExploreMode.Metrics && ( )} - {mode === ExploreMode.Logs && !cloudwatchLogsDisabled && ( + {mode === ExploreMode.Logs && ( { return { @@ -77,7 +68,6 @@ interface StateProps { datasourceLoading?: boolean; containerWidth: number; datasourceName?: string; - datasourceInstance: DataSourceApi; } interface DispatchProps { @@ -188,7 +178,6 @@ export class UnConnectedExploreToolbar extends PureComponent { isPaused, originPanelId, datasourceLoading, - datasourceInstance, containerWidth, } = this.props; @@ -202,11 +191,7 @@ export class UnConnectedExploreToolbar extends PureComponent { const showSmallDataSourcePicker = (splitted ? containerWidth < 700 : containerWidth < 800) || false; const showSmallTimePicker = splitted || containerWidth < 1210; - // TEMP: Remove for 7.0 - const cloudwatchLogsDisabled = - datasourceInstance?.meta?.id === 'cloudwatch' && !config.featureToggles.cloudwatchLogs; - - const showModeToggle = supportedModes.length > 1 && !cloudwatchLogsDisabled; + const showModeToggle = supportedModes.length > 1; return (
@@ -395,7 +380,6 @@ const mapStateToProps = (state: StoreState, { exploreId }: OwnProps): StateProps return { datasourceMissing, datasourceName: datasourceInstance?.name, - datasourceInstance, loading, range, timeZone: getTimeZone(state.user), diff --git a/public/app/plugins/datasource/cloudwatch/components/PanelQueryEditor.tsx b/public/app/plugins/datasource/cloudwatch/components/PanelQueryEditor.tsx index 8c48f2f176b..d3b8641420f 100644 --- a/public/app/plugins/datasource/cloudwatch/components/PanelQueryEditor.tsx +++ b/public/app/plugins/datasource/cloudwatch/components/PanelQueryEditor.tsx @@ -6,7 +6,6 @@ import { CloudWatchDatasource } from '../datasource'; import { QueryInlineField } from './'; import { MetricsQueryEditor } from './MetricsQueryEditor'; import LogsQueryEditor from './LogsQueryEditor'; -import { config } from '@grafana/runtime'; export type Props = ExploreQueryFieldProps; @@ -25,22 +24,19 @@ export class PanelQueryEditor extends PureComponent { render() { const { queryMode } = this.state; - const cloudwatchLogsDisabled = !config.featureToggles.cloudwatchLogs; return ( <> - {!cloudwatchLogsDisabled && ( - - this.onQueryModeChange(value ?? ExploreMode.Metrics)} - /> - - )} + + this.onQueryModeChange(value ?? ExploreMode.Metrics)} + /> + {queryMode === ExploreMode.Logs ? : } );