grafana/public/app/features/datasources/pages/DataSourcesListPage.tsx
Ashley Harrison 4abe0249ba
Chore: Clean up old navigation (#66287)
* remove code outside of the topnav feature flag

* delete NavBar folder

* remove topnav toggle from backend

* restructure AppChrome folder

* fix utils mock

* fix applinks tests

* remove tests since they're covered in e2e

* fix 1 of the approotpage tests

* Fix another dashboardpage test

* remove reverse portalling + test for plugins using deprecated onNavChanged method

* kick drone

* handle correlations
2023-04-14 09:43:11 +01:00

27 lines
976 B
TypeScript

import React from 'react';
import { config } from '@grafana/runtime';
import { Page } from 'app/core/components/Page/Page';
import { ConnectionsRedirectNotice } from 'app/features/connections/components/ConnectionsRedirectNotice';
import { StoreState, useSelector } from 'app/types';
import { DataSourceAddButton } from '../components/DataSourceAddButton';
import { DataSourcesList } from '../components/DataSourcesList';
import { getDataSourcesCount } from '../state';
export function DataSourcesListPage() {
const dataSourcesCount = useSelector(({ dataSources }: StoreState) => getDataSourcesCount(dataSources));
const actions = dataSourcesCount > 0 ? <DataSourceAddButton /> : undefined;
return (
<Page navId="datasources" actions={actions}>
<Page.Contents>
{config.featureToggles.dataConnectionsConsole && <ConnectionsRedirectNotice />}
<DataSourcesList />
</Page.Contents>
</Page>
);
}
export default DataSourcesListPage;