From 507720e60106c7f3d1bdf4e0d5852d60db2cc8bf Mon Sep 17 00:00:00 2001 From: Hugo Kiyodi Oshiro Date: Tue, 14 Oct 2025 15:34:33 -0300 Subject: [PATCH] Connections: Fix connections home page on enterprise (#111751) --- public/app/features/connections/Connections.test.tsx | 5 ++--- .../app/features/connections/pages/ConnectionsHomePage.tsx | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/public/app/features/connections/Connections.test.tsx b/public/app/features/connections/Connections.test.tsx index 1b92b5dfd1c..27a9fa9373e 100644 --- a/public/app/features/connections/Connections.test.tsx +++ b/public/app/features/connections/Connections.test.tsx @@ -2,7 +2,6 @@ import { RenderResult, screen } from '@testing-library/react'; import { Route, Routes } from 'react-router-dom-v5-compat'; import { render } from 'test/test-utils'; -import { GrafanaEdition } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { contextSrv } from 'app/core/services/context_srv'; import * as api from 'app/features/datasources/api'; @@ -46,7 +45,7 @@ describe('Connections', () => { }); test('shows the "Connections Homepage" page by default when edition is Cloud', async () => { - config.buildInfo.edition = GrafanaEdition.Enterprise; + config.pluginAdminExternalManageEnabled = true; renderPage(); // Add new connection card @@ -66,7 +65,7 @@ describe('Connections', () => { }); test('shows the OSS "Connections Homepage" page by default when edition is OpenSource', async () => { - config.buildInfo.edition = GrafanaEdition.OpenSource; + config.pluginAdminExternalManageEnabled = false; renderPage(); // Add new connection card diff --git a/public/app/features/connections/pages/ConnectionsHomePage.tsx b/public/app/features/connections/pages/ConnectionsHomePage.tsx index 647c3acfb50..46e5093cd0a 100644 --- a/public/app/features/connections/pages/ConnectionsHomePage.tsx +++ b/public/app/features/connections/pages/ConnectionsHomePage.tsx @@ -1,7 +1,6 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/internal'; import { Trans } from '@grafana/i18n'; import { config } from '@grafana/runtime'; import { useStyles2 } from '@grafana/ui'; @@ -13,9 +12,9 @@ import PageCard from '../components/PageCard/PageCard'; export default function ConnectionsHomePage() { const styles = useStyles2(getStyles); - const isOSS = config.buildInfo.edition === GrafanaEdition.OpenSource; + const isOnPrem = !config.pluginAdminExternalManageEnabled; - let cardsData = isOSS ? getOssCardData() : getCloudCardData(); + let cardsData = isOnPrem ? getOssCardData() : getCloudCardData(); return ( Welcome to Connections

- {isOSS ? ( + {isOnPrem ? ( Manage your data source connections in one place. Use this page to add a new data source or manage your existing connections.