mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* 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
27 lines
976 B
TypeScript
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;
|