File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 526526 "Kubelet version" : " Kubelet version" ,
527527 "Kube-Proxy version" : " Kube-Proxy version" ,
528528 "Configuration" : " Configuration" ,
529+ "Workload" : " Workload" ,
529530 "Machine set" : " Machine set" ,
530531 "This count is based on your access permissions and might not include all virtual machines." : " This count is based on your access permissions and might not include all virtual machines." ,
531532 "{{formattedCores}} cores / {{totalCores}} cores" : " {{formattedCores}} cores / {{totalCores}} cores" ,
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import NodeDashboard from './node-dashboard/NodeDashboard';
2121import NodeDetails from './NodeDetails' ;
2222import NodeLogs from './NodeLogs' ;
2323import NodeTerminal from './NodeTerminal' ;
24+ import { NodeWorkload } from './NodeWorkload' ;
2425
2526const NodePodsPage : FC < PageComponentProps < NodeKind > > = ( { obj } ) => (
2627 < PodsPage
@@ -55,10 +56,15 @@ export const NodeDetailsPage: FC<ComponentProps<typeof DetailsPage>> = (props) =
5556 nameKey : 'console-app~Configuration' ,
5657 component : NodeConfiguration ,
5758 } ,
59+ {
60+ href : 'workload' ,
61+ // t('console-app~Workload')
62+ nameKey : 'console-app~Workload' ,
63+ component : NodeWorkload ,
64+ } ,
65+ navFactory . editYaml ( ) ,
5866 ]
59- : [ ] ) ,
60- navFactory . editYaml ( ) ,
61- navFactory . pods ( NodePodsPage ) ,
67+ : [ navFactory . editYaml ( ) , navFactory . pods ( NodePodsPage ) ] ) ,
6268 navFactory . logs ( NodeLogs ) ,
6369 navFactory . events ( ResourceEventStream ) ,
6470 ...( ! isWindowsNode ( node ) ? [ navFactory . terminal ( NodeTerminal ) ] : [ ] ) ,
Original file line number Diff line number Diff line change 1+ import type { FC } from 'react' ;
2+ import type { NodeKind } from '@console/dynamic-plugin-sdk/src' ;
3+ import { PodsPage } from '@console/internal/components/pod-list' ;
4+ import type { PageComponentProps } from '@console/internal/components/utils' ;
5+ import { NodeSubNavPage } from './NodeSubNavPage' ;
6+
7+ const NodePodsPage : FC < PageComponentProps < NodeKind > > = ( { obj } ) => (
8+ < PodsPage
9+ fieldSelector = { `spec.nodeName=${ obj . metadata . name } ` }
10+ showNamespaceOverride
11+ hideFavoriteButton
12+ />
13+ ) ;
14+
15+ type NodeWorkloadProps = {
16+ obj : NodeKind ;
17+ } ;
18+
19+ const standardPages = [
20+ {
21+ tabId : 'pods' ,
22+ // t('console-app~Pods')
23+ nameKey : 'console-app~Pods' ,
24+ component : NodePodsPage ,
25+ priority : 30 ,
26+ } ,
27+ ] ;
28+
29+ export const NodeWorkload : FC < NodeWorkloadProps > = ( { obj } ) => (
30+ < NodeSubNavPage obj = { obj } pageId = "workload" standardPages = { standardPages } />
31+ ) ;
Original file line number Diff line number Diff line change @@ -588,6 +588,7 @@ export const PodsPage: FC<PodPageProps> = ({
588588 hideLabelFilter,
589589 hideColumnManagement,
590590 showNamespaceOverride,
591+ hideFavoriteButton,
591592} ) => {
592593 const { t } = useTranslation ( ) ;
593594 const dispatch = useConsoleDispatch ( ) ;
@@ -638,7 +639,10 @@ export const PodsPage: FC<PodPageProps> = ({
638639
639640 return (
640641 < >
641- < ListPageHeader title = { showTitle ? t ( 'public~Pods' ) : '' } >
642+ < ListPageHeader
643+ title = { showTitle ? t ( 'public~Pods' ) : '' }
644+ hideFavoriteButton = { hideFavoriteButton }
645+ >
642646 { canCreate && (
643647 < ListPageCreate groupVersionKind = { resourceKind } createAccessReview = { accessReview } >
644648 { t ( 'public~Create Pod' ) }
@@ -711,4 +715,5 @@ type PodPageProps = {
711715 hideNameLabelFilters ?: boolean ;
712716 hideColumnManagement ?: boolean ;
713717 showNamespaceOverride ?: boolean ;
718+ hideFavoriteButton ?: boolean ;
714719} ;
You can’t perform that action at this time.
0 commit comments