File tree 1 file changed +16
-0
lines changed
cert-manager/src/components/certificates
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents' ;
2
+ import { DateLabel } from '@kinvolk/headlamp-plugin/lib/components/common' ;
2
3
import { useCertManagerInstalled } from '../../hooks/useCertManagerInstalled' ;
3
4
import { Certificate } from '../../resources/certificate' ;
4
5
import { NotInstalledBanner } from '../common/CommonComponents' ;
@@ -23,6 +24,21 @@ export function CertificatesList() {
23
24
label : 'Secret' ,
24
25
getValue : item => item . spec . secretName ,
25
26
} ,
27
+ {
28
+ id : 'expiresIn' ,
29
+ label : 'Expires In (Not After)' ,
30
+ render : item => {
31
+ return item ?. status ?. notAfter ? (
32
+ < DateLabel date = { item . status . notAfter } format = "mini" />
33
+ ) : null ;
34
+ } ,
35
+ getValue : item => item . status ?. notAfter ?? '' ,
36
+ sort : ( a , b ) => {
37
+ const dateA = new Date ( a . status ?. notAfter ) ;
38
+ const dateB = new Date ( b . status ?. notAfter ) ;
39
+ return dateA . getTime ( ) - dateB . getTime ( ) ;
40
+ } ,
41
+ } ,
26
42
'age' ,
27
43
] }
28
44
/>
You can’t perform that action at this time.
0 commit comments