Correlations: Remove correlations feature toggle (#113752)
* Remove correlations feature toggle The correlations feature toggle has been removed from the registry and all usages throughout the codebase have been cleaned up. Correlations are now always available.
This commit is contained in:
@@ -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 |
|
||||
|
||||
@@ -50,11 +50,6 @@ export interface FeatureToggles {
|
||||
*/
|
||||
storage?: boolean;
|
||||
/**
|
||||
* Correlations page
|
||||
* @default true
|
||||
*/
|
||||
correlations?: boolean;
|
||||
/**
|
||||
* Allow elements nesting
|
||||
*/
|
||||
canvasPanelNesting?: boolean;
|
||||
|
||||
@@ -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",
|
||||
|
||||
Generated
-1
@@ -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
|
||||
|
||||
|
Generated
-4
@@ -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"
|
||||
|
||||
+1
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
|
||||
export default function FeatureTogglePage() {
|
||||
return (
|
||||
<Page navId="correlations">
|
||||
<Page.Contents>
|
||||
<h1>
|
||||
<Trans i18nKey="correlations.page-heading">Correlations are disabled</Trans>
|
||||
</h1>
|
||||
<Trans i18nKey="correlations.page-content">To enable Correlations, add it in the Grafana config:</Trans>
|
||||
<div>
|
||||
<pre>
|
||||
{`[feature_toggles]
|
||||
correlations = true
|
||||
`}
|
||||
</pre>
|
||||
</div>
|
||||
</Page.Contents>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
@@ -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',
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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: [
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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')
|
||||
),
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user