File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
cert-manager/src/components/certificates Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents' ;
2+ import { DateLabel } from '@kinvolk/headlamp-plugin/lib/components/common' ;
23import { useCertManagerInstalled } from '../../hooks/useCertManagerInstalled' ;
34import { Certificate } from '../../resources/certificate' ;
45import { NotInstalledBanner } from '../common/CommonComponents' ;
@@ -23,6 +24,21 @@ export function CertificatesList() {
2324 label : 'Secret' ,
2425 getValue : item => item . spec . secretName ,
2526 } ,
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+ } ,
2642 'age' ,
2743 ] }
2844 />
You can’t perform that action at this time.
0 commit comments