mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:32:13 +08:00

* feat(Connections): create sub-pages wrapped by `<Page>` * feat(Connections): rename the Connections page and update routes * feat(Connections): use new url for editing datasources * refactor(Connections): remove unused tab components * feat(Connections): update routes and nav titles * tests: fix tests for Connections * tests: fix typo in backend tests
25 lines
882 B
TypeScript
25 lines
882 B
TypeScript
import * as React from 'react';
|
|
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
import { StoreState, useSelector } from 'app/types';
|
|
|
|
export function DataSourceDetailsPage() {
|
|
const overrideNavId = 'standalone-plugin-page-/connections/connect-data';
|
|
const navIndex = useSelector((state: StoreState) => state.navIndex);
|
|
const isConnectDataPageOverriden = Boolean(navIndex[overrideNavId]);
|
|
const navId = isConnectDataPageOverriden ? overrideNavId : 'connections-connect-data'; // The nav id changes (gets a prefix) if it is overriden by a plugin
|
|
|
|
return (
|
|
<Page
|
|
navId={navId}
|
|
pageNav={{
|
|
text: 'Datasource details',
|
|
subTitle: 'This is going to be the details page for a datasource',
|
|
active: true,
|
|
}}
|
|
>
|
|
<Page.Contents>Data Source Details (no exposed component from plugins yet)</Page.Contents>
|
|
</Page>
|
|
);
|
|
}
|