Connections: Add redirect notice for datasources and plugins pages (#61037)

* add redirect notice for datasources and plugins pages

* do not depend on the internal implementation of Alert

The deleted css piece was problematic because it relied on the internals
of Alert.
If we don't remove that padding, then the Alert looks a bit off, so I
added some title to the Alert to look better.

This way the Connections LinkButton is not vertically aligned to the
center, but this is the closest we can get to the designed alert without
doing hacks and reimplementing the Alert component.
This commit is contained in:
mikkancso
2023-01-06 09:00:29 +01:00
committed by GitHub
parent fc0e3d6c14
commit 8e8f498674
4 changed files with 66 additions and 1 deletions
@@ -2,6 +2,10 @@ import React from 'react';
import { config } from '@grafana/runtime';
import { Page } from 'app/core/components/Page/Page';
import {
ConnectionsRedirectNotice,
DestinationPage,
} from 'app/features/connections/components/ConnectionsRedirectNotice';
import { DataSourceAddButton } from '../components/DataSourceAddButton';
import { DataSourcesList } from '../components/DataSourcesList';
@@ -11,6 +15,9 @@ export function DataSourcesListPage() {
return (
<Page navId="datasources" actions={actions}>
<Page.Contents>
{config.featureToggles.dataConnectionsConsole && (
<ConnectionsRedirectNotice destinationPage={DestinationPage.dataSources} />
)}
<DataSourcesList />
</Page.Contents>
</Page>