diff --git a/frontend/public/components/pod.tsx b/frontend/public/components/pod.tsx index 6c663c9099b..40bb7aca788 100644 --- a/frontend/public/components/pod.tsx +++ b/frontend/public/components/pod.tsx @@ -39,6 +39,7 @@ import { formatDuration } from './utils/datetime'; import { CamelCaseWrap } from './utils/camel-case-wrap'; import { VolumesTable } from './volumes-table'; import { PodDashboard } from './pod-dashboard'; +import { POD_DETAIL_OVERVIEW_HREF } from './utils/href'; export const menuActions = [...Kebab.factory.common]; const validReadinessStates = new Set(['ContainersNotReady', 'Ready', 'PodCompleted']); @@ -405,11 +406,11 @@ export const PodsDetailsPage: React.FC = (props) => ( menuActions={menuActions} pages={[ { - href: 'dashboard', // TODO: make it default once additional Cards are implemented + href: '', name: 'Dashboard', component: PodDashboard, }, - navFactory.details(Details), + navFactory.details(Details, POD_DETAIL_OVERVIEW_HREF), navFactory.editYaml(), navFactory.envEditor(PodEnvironmentComponent), navFactory.logs(PodLogs), diff --git a/frontend/public/components/utils/horizontal-nav.tsx b/frontend/public/components/utils/horizontal-nav.tsx index 75a5a52db8d..50420228aed 100644 --- a/frontend/public/components/utils/horizontal-nav.tsx +++ b/frontend/public/components/utils/horizontal-nav.tsx @@ -46,10 +46,10 @@ export type Page = { component?: React.ComponentType; }; -type NavFactory = { [name: string]: (c?: React.ComponentType) => Page }; +type NavFactory = { [name: string]: (c?: React.ComponentType, href?: string) => Page }; export const navFactory: NavFactory = { - details: (component) => ({ - href: '', + details: (component, href = '') => ({ + href, name: 'Overview', component, }), diff --git a/frontend/public/components/utils/href.ts b/frontend/public/components/utils/href.ts index cab22b22d3e..6b78b1df307 100644 --- a/frontend/public/components/utils/href.ts +++ b/frontend/public/components/utils/href.ts @@ -1 +1 @@ -export const POD_DETAIL_OVERVIEW_HREF = ''; // TODO: see pod.tsx, will be changed once Pod Dashboard becomes the default tab +export const POD_DETAIL_OVERVIEW_HREF = 'overview';