File tree Expand file tree Collapse file tree 5 files changed +25
-7
lines changed
Expand file tree Collapse file tree 5 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ function ResourceTableContent<RowItem extends KubeObject>(props: ResourceTablePr
416416 id : 'namespace' ,
417417 header : t ( 'glossary|Namespace' ) ,
418418 gridTemplate : 'auto' ,
419- accessorFn : ( item : RowItem ) => item . getNamespace ( ) ?? '' ,
419+ accessorFn : ( item : RowItem ) => item . getNamespace ( ) ?? '(cluster-wide) ' ,
420420 filterVariant : 'multi-select' ,
421421 Cell : ( { row } : { row : MRT_Row < RowItem > } ) =>
422422 row . original ?. getNamespace ( ) ? (
Original file line number Diff line number Diff line change @@ -29,6 +29,24 @@ import ResourceListView from '../common/Resource/ResourceListView';
2929import { SimpleTableProps } from '../common/SimpleTable' ;
3030import LightTooltip from '../common/Tooltip/TooltipLight' ;
3131
32+ export function makeJobStatusValue ( job : Job ) {
33+ if ( ! job ?. status ?. conditions ) {
34+ return 'Unknown' ;
35+ }
36+ const conditionOptions = [ 'Failed' , 'Complete' , 'Suspended' ] ;
37+
38+ const condition = job . status . conditions . find (
39+ ( { status, type } : { status : string ; type : string } ) =>
40+ conditionOptions . includes ( type ) && status === 'True'
41+ ) ;
42+
43+ if ( ! condition ) {
44+ return 'Unknown' ;
45+ }
46+
47+ return condition . type ;
48+ }
49+
3250export function makeJobStatusLabel ( job : Job ) {
3351 if ( ! job ?. status ?. conditions ) {
3452 return null ;
@@ -127,10 +145,9 @@ export function JobsListRenderer(props: JobsListRendererProps) {
127145 {
128146 id : 'conditions' ,
129147 label : t ( 'translation|Conditions' ) ,
148+ filterVariant : 'multi-select' ,
130149 gridTemplate : 'min-content' ,
131- getValue : job =>
132- job . status ?. conditions ?. find ( ( { status } : { status : string } ) => status === 'True' ) ??
133- null ,
150+ getValue : job => makeJobStatusValue ( job ) ,
134151 render : job => makeJobStatusLabel ( job ) ,
135152 } ,
136153 {
Original file line number Diff line number Diff line change 494494 Conditions
495495 </div>
496496 <span
497- aria-label="Sort by Conditions descending "
497+ aria-label="Sort by Conditions ascending "
498498 class="MuiBadge-root css-1c32n2y-MuiBadge-root"
499499 data-mui-internal-clone-element="true"
500500 >
501501 <span
502- aria-label="Sort by Conditions descending "
502+ aria-label="Sort by Conditions ascending "
503503 class="MuiButtonBase-root MuiTableSortLabel-root Mui-active css-542clt-MuiButtonBase-root-MuiTableSortLabel-root"
504504 role="button"
505505 tabindex="0"
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ export function PodListRenderer(props: PodListProps) {
237237 gridTemplate : 'min-content' ,
238238 filterVariant : 'multi-select' ,
239239 label : t ( 'translation|Status' ) ,
240- getValue : pod => getPodStatus ( pod ) + '/' + pod . getDetailedStatus ( ) . reason ,
240+ getValue : pod => pod . getDetailedStatus ( ) . reason ,
241241 render : makePodStatusLabel ,
242242 } ,
243243 ...( metrics ?. length
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ export default function VolumeList() {
111111 {
112112 id : 'status' ,
113113 label : t ( 'translation|Status' ) ,
114+ filterVariant : 'multi-select' ,
114115 getValue : volume => volume . status ?. phase ,
115116 render : volume => makePVStatusLabel ( volume ) ,
116117 gridTemplate : 0.3 ,
You can’t perform that action at this time.
0 commit comments