Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/public/components/pod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down Expand Up @@ -405,11 +406,11 @@ export const PodsDetailsPage: React.FC<PodDetailsPageProps> = (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),
Expand Down
6 changes: 3 additions & 3 deletions frontend/public/components/utils/horizontal-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export type Page = {
component?: React.ComponentType<any>;
};

type NavFactory = { [name: string]: (c?: React.ComponentType<any>) => Page };
type NavFactory = { [name: string]: (c?: React.ComponentType<any>, href?: string) => Page };
export const navFactory: NavFactory = {
details: (component) => ({
href: '',
details: (component, href = '') => ({
href,
name: 'Overview',
component,
}),
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/components/utils/href.ts
Original file line number Diff line number Diff line change
@@ -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';