diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index efd94d714db..0b802145d87 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -27,7 +27,6 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | | `publicDashboardsScene` | Enables public dashboard rendering using scenes | Yes | | `featureHighlights` | Highlight Grafana Enterprise features | | -| `correlations` | Correlations page | Yes | | `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | | `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | | `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | Yes | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 9b85c451ecf..2f8cc13e8df 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -50,11 +50,6 @@ export interface FeatureToggles { */ storage?: boolean; /** - * Correlations page - * @default true - */ - correlations?: boolean; - /** * Allow elements nesting */ canvasPanelNesting?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 0921c25d5ce..fe4834db0ae 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -69,14 +69,6 @@ var ( Stage: FeatureStageExperimental, Owner: grafanaSearchAndStorageSquad, }, - { - Name: "correlations", - Description: "Correlations page", - Stage: FeatureStageGeneralAvailability, - Owner: grafanaDataProSquad, - Expression: "true", // enabled by default - AllowSelfServe: true, - }, { Name: "canvasPanelNesting", Description: "Allow elements nesting", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 26f593dfcd3..e493b35ca1e 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -6,7 +6,6 @@ publicDashboardsScene,GA,@grafana/grafana-operator-experience-squad,false,false, lokiExperimentalStreaming,experimental,@grafana/observability-logs,false,false,false featureHighlights,GA,@grafana/grafana-operator-experience-squad,false,false,false storage,experimental,@grafana/search-and-storage,false,false,false -correlations,GA,@grafana/datapro,false,false,false canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,true logRequestsInstrumentedAsUnknown,experimental,@grafana/grafana-backend-group,false,false,false grpcServer,preview,@grafana/search-and-storage,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 1decb0d9f6e..b484694fef6 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -35,10 +35,6 @@ const ( // Configurable storage for dashboards, datasources, and resources FlagStorage = "storage" - // FlagCorrelations - // Correlations page - FlagCorrelations = "correlations" - // FlagCanvasPanelNesting // Allow elements nesting FlagCanvasPanelNesting = "canvasPanelNesting" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 48ca4bb3f18..1e511160a07 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -1024,6 +1024,7 @@ "name": "correlations", "resourceVersion": "1762442825881", "creationTimestamp": "2022-09-16T13:14:27Z", + "deletionTimestamp": "2025-11-12T13:11:31Z", "annotations": { "grafana.app/updatedTimestamp": "2025-11-06 15:27:05.88172 +0000 UTC" } diff --git a/pkg/services/navtree/navtreeimpl/admin.go b/pkg/services/navtree/navtreeimpl/admin.go index 02e9f44bdbd..7e2af182a87 100644 --- a/pkg/services/navtree/navtreeimpl/admin.go +++ b/pkg/services/navtree/navtreeimpl/admin.go @@ -89,7 +89,7 @@ func (s *ServiceImpl) getAdminNode(c *contextmodel.ReqContext) (*navtree.NavLink Url: s.cfg.AppSubURL + "/plugins", }) } - if s.features.IsEnabled(ctx, featuremgmt.FlagCorrelations) && hasAccess(correlations.ConfigurationPageAccess) { + if hasAccess(correlations.ConfigurationPageAccess) { pluginsNodeLinks = append(pluginsNodeLinks, &navtree.NavLink{ Text: "Correlations", Icon: "gf-glue", diff --git a/public/app/features/correlations/CorrelationsFeatureToggle.tsx b/public/app/features/correlations/CorrelationsFeatureToggle.tsx deleted file mode 100644 index ccbe05cb0e9..00000000000 --- a/public/app/features/correlations/CorrelationsFeatureToggle.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Trans } from '@grafana/i18n'; -import { Page } from 'app/core/components/Page/Page'; - -export default function FeatureTogglePage() { - return ( - - -

- Correlations are disabled -

- To enable Correlations, add it in the Grafana config: -
-
-            {`[feature_toggles]
-correlations = true
-`}
-          
-
-
-
- ); -} diff --git a/public/app/features/explore/ExploreActions.tsx b/public/app/features/explore/ExploreActions.tsx index 376cc25d715..56d8fa06776 100644 --- a/public/app/features/explore/ExploreActions.tsx +++ b/public/app/features/explore/ExploreActions.tsx @@ -1,7 +1,6 @@ import { useRegisterActions, useKBar, Action, Priority } from 'kbar'; import { useEffect, useState } from 'react'; -import { config } from '@grafana/runtime'; import { contextSrv } from 'app/core/services/context_srv'; import { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource'; import { AccessControlAction } from 'app/types/accessControl'; @@ -76,7 +75,7 @@ export const ExploreActions = () => { return pane?.datasourceInstance?.uid === MIXED_DATASOURCE_NAME; }); - if (config.featureToggles.correlations && canWriteCorrelations && !hasMixed) { + if (canWriteCorrelations && !hasMixed) { actionsArr.push({ id: 'explore/correlations-editor', name: 'Correlations editor', diff --git a/public/app/features/explore/ExplorePage.tsx b/public/app/features/explore/ExplorePage.tsx index ed3c0de6d3b..a5527be8b6c 100644 --- a/public/app/features/explore/ExplorePage.tsx +++ b/public/app/features/explore/ExplorePage.tsx @@ -3,7 +3,6 @@ import { useEffect } from 'react'; import { GrafanaTheme2 } from '@grafana/data'; import { t, Trans } from '@grafana/i18n'; -import { config } from '@grafana/runtime'; import { ErrorBoundaryAlert, LoadingPlaceholder, useStyles2, useTheme2 } from '@grafana/ui'; import { SplitPaneWrapper } from 'app/core/components/SplitPaneWrapper/SplitPaneWrapper'; import { useGrafana } from 'app/core/context/GrafanaContext'; @@ -50,7 +49,7 @@ function ExplorePageContent(props: GrafanaRouteComponentProps<{}, ExploreQueryPa const hasSplit = useSelector(isSplit); const correlationDetails = useSelector(selectCorrelationDetails); const { drawerOpened, setDrawerOpened } = useQueriesDrawerContext(); - const showCorrelationEditorBar = config.featureToggles.correlations && (correlationDetails?.editorMode || false); + const showCorrelationEditorBar = correlationDetails?.editorMode || false; useEffect(() => { //This is needed for breadcrumbs and topnav. diff --git a/public/app/features/explore/extensions/ToolbarExtensionPoint.test.tsx b/public/app/features/explore/extensions/ToolbarExtensionPoint.test.tsx index 0a72d621269..d3988d68e95 100644 --- a/public/app/features/explore/extensions/ToolbarExtensionPoint.test.tsx +++ b/public/app/features/explore/extensions/ToolbarExtensionPoint.test.tsx @@ -66,6 +66,7 @@ function setupToolbarExtensionPoint( describe('ToolbarExtensionPoint', () => { describe('with extension points', () => { beforeAll(() => { + contextSrvMock.hasPermission.mockReturnValue(false); usePluginLinksMock.mockReturnValue({ links: [ { @@ -183,6 +184,7 @@ describe('ToolbarExtensionPoint', () => { describe('with extension points without categories', () => { beforeAll(() => { + contextSrvMock.hasPermission.mockReturnValue(false); usePluginLinksMock.mockReturnValue({ links: [ { @@ -257,6 +259,7 @@ describe('ToolbarExtensionPoint', () => { describe('with multiple queryless apps links', () => { beforeAll(() => { + contextSrvMock.hasPermission.mockReturnValue(false); usePluginLinksMock.mockReturnValue({ links: [ { @@ -323,6 +326,7 @@ describe('ToolbarExtensionPoint', () => { describe('with single queryless apps link', () => { beforeAll(() => { + contextSrvMock.hasPermission.mockReturnValue(false); usePluginLinksMock.mockReturnValue({ links: [ { diff --git a/public/app/features/explore/extensions/ToolbarExtensionPoint.tsx b/public/app/features/explore/extensions/ToolbarExtensionPoint.tsx index 3c3a5f2286a..070e48caa47 100644 --- a/public/app/features/explore/extensions/ToolbarExtensionPoint.tsx +++ b/public/app/features/explore/extensions/ToolbarExtensionPoint.tsx @@ -1,7 +1,7 @@ import { ReactElement, useMemo, useState } from 'react'; import { type PluginExtensionLink, PluginExtensionPoints, RawTimeRange, getTimeZone } from '@grafana/data'; -import { config, reportInteraction, usePluginLinks } from '@grafana/runtime'; +import { reportInteraction, usePluginLinks } from '@grafana/runtime'; import { DataQuery, TimeZone } from '@grafana/schema'; import { contextSrv } from 'app/core/services/context_srv'; import { AccessControlAction } from 'app/types/accessControl'; @@ -109,12 +109,7 @@ function useExtensionPointContext(props: Props): PluginExtensionExploreContext { data: queryResponse, timeRange: range.raw, timeZone: getTimeZone({ timeZone }), - shouldShowAddCorrelation: - config.featureToggles.correlations === true && - canWriteCorrelations && - !isCorrelationsEditorMode && - isLeftPane && - numUniqueIds === 1, + shouldShowAddCorrelation: canWriteCorrelations && !isCorrelationsEditorMode && isLeftPane && numUniqueIds === 1, }; }, [ exploreId, diff --git a/public/app/routes/routes.tsx b/public/app/routes/routes.tsx index 3a688ea53dc..462e564bbe5 100644 --- a/public/app/routes/routes.tsx +++ b/public/app/routes/routes.tsx @@ -138,12 +138,8 @@ export function getAppRoutes(): RouteDescriptor[] { }, { path: '/datasources/correlations', - component: SafeDynamicImport(() => - config.featureToggles.correlations - ? import(/* webpackChunkName: "CorrelationsPage" */ 'app/features/correlations/CorrelationsPage') - : import( - /* webpackChunkName: "CorrelationsFeatureToggle" */ 'app/features/correlations/CorrelationsFeatureToggle' - ) + component: SafeDynamicImport( + () => import(/* webpackChunkName: "CorrelationsPage" */ 'app/features/correlations/CorrelationsPage') ), }, { diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index b59d15da0bd..a17404a80e6 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -4378,8 +4378,6 @@ "next-button": "Next", "save-button": "Save" }, - "page-content": "To enable Correlations, add it in the Grafana config:", - "page-heading": "Correlations are disabled", "query-editor": { "control-rules": "The selected target data source must export a query editor.", "data-source-text": "Please select a target data source first.",