mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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
25 lines
898 B
TypeScript
25 lines
898 B
TypeScript
import * as React from 'react';
|
|
import { useLocation, useParams } from 'react-router-dom';
|
|
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
import { EditDataSource } from 'app/features/datasources/components/EditDataSource';
|
|
import { EditDataSourceActions } from 'app/features/datasources/components/EditDataSourceActions';
|
|
|
|
import { useDataSourceSettingsNav } from '../hooks/useDataSourceSettingsNav';
|
|
|
|
export function EditDataSourcePage() {
|
|
const { uid } = useParams<{ uid: string }>();
|
|
const location = useLocation();
|
|
const params = new URLSearchParams(location.search);
|
|
const pageId = params.get('page');
|
|
const { navId, pageNav } = useDataSourceSettingsNav();
|
|
|
|
return (
|
|
<Page navId={navId} pageNav={pageNav} actions={<EditDataSourceActions uid={uid} />}>
|
|
<Page.Contents>
|
|
<EditDataSource uid={uid} pageId={pageId} />
|
|
</Page.Contents>
|
|
</Page>
|
|
);
|
|
}
|