mirror of https://github.com/grafana/grafana
Remove feature toggle data source page header (#77751)
* remove feature toggle:dataSourcePageHeader * remove feature flag: dataSourcePageHeader * remove unused prop:alertingSupportedpull/77234/head^2
parent
352905e195
commit
4fbd9a55b2
|
@ -1,31 +1,13 @@ |
|||||||
import * as React from 'react'; |
import * as React from 'react'; |
||||||
import { useLocation, useParams } from 'react-router-dom'; |
import { useLocation, useParams } from 'react-router-dom'; |
||||||
|
|
||||||
import { config } from '@grafana/runtime'; |
|
||||||
import { Page } from 'app/core/components/Page/Page'; |
|
||||||
import DataSourceTabPage from 'app/features/datasources/components/DataSourceTabPage'; |
import DataSourceTabPage from 'app/features/datasources/components/DataSourceTabPage'; |
||||||
import { EditDataSource } from 'app/features/datasources/components/EditDataSource'; |
|
||||||
import { EditDataSourceActions } from 'app/features/datasources/components/EditDataSourceActions'; |
|
||||||
|
|
||||||
import { useDataSourceSettingsNav } from '../hooks/useDataSourceSettingsNav'; |
|
||||||
|
|
||||||
export function EditDataSourcePage() { |
export function EditDataSourcePage() { |
||||||
const { uid } = useParams<{ uid: string }>(); |
const { uid } = useParams<{ uid: string }>(); |
||||||
const location = useLocation(); |
const location = useLocation(); |
||||||
const params = new URLSearchParams(location.search); |
const params = new URLSearchParams(location.search); |
||||||
const pageId = params.get('page'); |
const pageId = params.get('page'); |
||||||
const dataSourcePageHeader = config.featureToggles.dataSourcePageHeader; |
|
||||||
const { navId, pageNav } = useDataSourceSettingsNav(); |
|
||||||
|
|
||||||
if (dataSourcePageHeader) { |
|
||||||
return <DataSourceTabPage uid={uid} pageId={pageId} />; |
return <DataSourceTabPage uid={uid} pageId={pageId} />; |
||||||
} |
|
||||||
|
|
||||||
return ( |
|
||||||
<Page navId={navId} pageNav={pageNav} actions={<EditDataSourceActions uid={uid} />}> |
|
||||||
<Page.Contents> |
|
||||||
<EditDataSource uid={uid} pageId={pageId} /> |
|
||||||
</Page.Contents> |
|
||||||
</Page> |
|
||||||
); |
|
||||||
} |
} |
||||||
|
Loading…
Reference in new issue