11import * as _ from 'lodash-es' ;
22import type { FC , PropsWithChildren } from 'react' ;
33import { memo , useCallback } from 'react' ;
4- import { Helmet } from 'react-helmet' ;
54import { useTranslation } from 'react-i18next' ;
65
7- import {
8- Divider ,
9- PageSection ,
10- Split ,
11- SplitItem ,
12- Stack ,
13- StackItem ,
14- Title ,
15- } from '@patternfly/react-core' ;
6+ import { Divider , PageSection , Split , SplitItem , Stack , StackItem } from '@patternfly/react-core' ;
167import { usePerspective } from '../../hooks/usePerspective' ;
178import { CombinedDashboardMetadata } from '../perses/hooks/useDashboardsData' ;
189import { DashboardDropdown } from '../shared/dashboard-dropdown' ;
1910import { PollIntervalDropdown , TimespanDropdown } from './time-dropdowns' ;
2011import { LegacyDashboardsAllVariableDropdowns } from './legacy-variable-dropdowns' ;
12+ import { DocumentTitle , ListPageHeader } from '@openshift-console/dynamic-plugin-sdk' ;
2113
2214const HeaderTop : FC = memo ( ( ) => {
2315 const { t } = useTranslation ( process . env . I18N_NAMESPACE ) ;
2416
2517 return (
26- < Split hasGutter isWrappable >
27- < SplitItem isFilled >
28- < Title headingLevel = "h1" > { t ( 'Dashboards' ) } </ Title >
29- </ SplitItem >
30- < SplitItem >
31- < Split hasGutter isWrappable >
32- < SplitItem >
33- < TimespanDropdown />
34- </ SplitItem >
35- < SplitItem >
36- < PollIntervalDropdown />
37- </ SplitItem >
38- </ Split >
39- </ SplitItem >
40- </ Split >
18+ < ListPageHeader title = { t ( 'Dashboards' ) } >
19+ < Split hasGutter isWrappable >
20+ < SplitItem >
21+ < TimespanDropdown />
22+ </ SplitItem >
23+ < SplitItem >
24+ < PollIntervalDropdown />
25+ </ SplitItem >
26+ </ Split >
27+ </ ListPageHeader >
4128 ) ;
4229} ) ;
4330
@@ -62,13 +49,9 @@ export const DashboardSkeletonLegacy: FC<MonitoringDashboardsLegacyPageProps> =
6249
6350 return (
6451 < >
65- { perspective !== 'dev' && (
66- < Helmet >
67- < title > { t ( 'Metrics dashboards' ) } </ title >
68- </ Helmet >
69- ) }
52+ { perspective !== 'dev' && < DocumentTitle > { t ( 'Metrics dashboards' ) } </ DocumentTitle > }
53+ { perspective !== 'dev' && < HeaderTop /> }
7054 < PageSection hasBodyWrapper = { false } >
71- { perspective !== 'dev' && < HeaderTop /> }
7255 < Stack hasGutter >
7356 { ! _ . isEmpty ( boardItems ) && (
7457 < StackItem >
0 commit comments