File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ export function Table(props: TableProps) {
94
94
case 'lastUpdated' :
95
95
return {
96
96
header : 'Last Updated' ,
97
- accessorFn : item => < DateLabel format = "mini" date = { prepareLastUpdated ( item ) } /> ,
97
+ accessorFn : item => prepareLastUpdated ( item ) ,
98
+ Cell : ( { cell } : any ) => < DateLabel format = "mini" date = { cell . getValue ( ) } /> ,
98
99
} ;
99
100
case 'age' :
100
101
return {
@@ -116,6 +117,10 @@ export function Table(props: TableProps) {
116
117
return {
117
118
header : 'Source' ,
118
119
accessorFn : item => {
120
+ const { name } = getSourceNameAndType ( item ) ;
121
+ return name ;
122
+ } ,
123
+ Cell : ( { row : { original : item } } : any ) => {
119
124
const { name, type } = getSourceNameAndType ( item ) ;
120
125
return (
121
126
< Link
Original file line number Diff line number Diff line change 1
1
import { K8s } from '@kinvolk/headlamp-plugin/lib' ;
2
2
import { DateLabel , Link } from '@kinvolk/headlamp-plugin/lib/components/common' ;
3
3
import { KubeObject } from '@kinvolk/headlamp-plugin/lib/lib/k8s/cluster' ;
4
- import React from 'react' ;
4
+ import React , { cloneElement } from 'react' ;
5
5
import Table from '../common/Table' ;
6
6
import { prepareNameLink } from '../helpers/index' ;
7
7
@@ -99,7 +99,8 @@ export function GetResourcesFromInventory(props: {
99
99
} ,
100
100
{
101
101
header : 'Age' ,
102
- accessorFn : item => < DateLabel date = { item ?. metadata ?. creationTimestamp } /> ,
102
+ accessorKey : 'metadata.creationTimestamp' ,
103
+ Cell : ( { cell } : any ) => < DateLabel date = { cell . getValue ( ) } /> ,
103
104
} ,
104
105
] }
105
106
/>
You can’t perform that action at this time.
0 commit comments