mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 02:23:31 -06:00
* remove old page component * add test to check initDashboard is only called once (prevent variables loading twice) * add help node * update unit tests * remove last mentions of topnav * fix unit tests * remove unused props from ButtonRow interface * remove prop from test
28 lines
929 B
TypeScript
28 lines
929 B
TypeScript
import React from 'react';
|
|
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
|
|
|
import { EditDataSource } from '../components/EditDataSource';
|
|
import { EditDataSourceActions } from '../components/EditDataSourceActions';
|
|
import { useDataSourceSettingsNav } from '../state';
|
|
|
|
export interface Props extends GrafanaRouteComponentProps<{ uid: string }> {}
|
|
|
|
export function EditDataSourcePage(props: Props) {
|
|
const uid = props.match.params.uid;
|
|
const params = new URLSearchParams(props.location.search);
|
|
const pageId = params.get('page');
|
|
const nav = useDataSourceSettingsNav(uid, pageId);
|
|
|
|
return (
|
|
<Page navId="datasources" pageNav={nav.main} actions={<EditDataSourceActions uid={uid} />}>
|
|
<Page.Contents>
|
|
<EditDataSource uid={uid} pageId={pageId} />
|
|
</Page.Contents>
|
|
</Page>
|
|
);
|
|
}
|
|
|
|
export default EditDataSourcePage;
|