@@ -14,12 +14,12 @@ interface CellData<T> {
1414 cell : {
1515 value : T | null ; // null for grouping rows
1616 row : {
17- original ?: providersRow ; // missing for grouping rows
17+ original ?: ProvidersRow ; // missing for grouping rows
1818 }
1919 } ;
2020}
2121
22- type providersRow = {
22+ type ProvidersRow = {
2323 name : string
2424 version : string ;
2525 healthy : boolean ;
@@ -48,32 +48,32 @@ export function Providers() {
4848 {
4949 Header : t ( 'Providers.tableHeaderInstalled' ) ,
5050 accessor : 'installed' ,
51- Cell : ( cellData : CellData < providersRow [ 'installed' ] > ) => cellData . cell . row . original ?. installed != null ? < ResourceStatusCell value = { cellData . cell . row . original ?. installed } transitionTime = { cellData . cell . row . original ?. installedTransitionTime } /> : null
51+ Cell : ( cellData : CellData < ProvidersRow [ 'installed' ] > ) => cellData . cell . row . original ?. installed != null ? < ResourceStatusCell value = { cellData . cell . row . original ?. installed } transitionTime = { cellData . cell . row . original ?. installedTransitionTime } /> : null
5252 } ,
5353 {
5454 Header : t ( 'Providers.tableHeaderHealthy' ) ,
5555 accessor : 'healthy' ,
56- Cell : ( cellData : CellData < providersRow [ 'healthy' ] > ) => cellData . cell . row . original ?. installed != null ? < ResourceStatusCell value = { cellData . cell . row . original ?. healthy } transitionTime = { cellData . cell . row . original ?. healthyTransitionTime } /> : null
56+ Cell : ( cellData : CellData < ProvidersRow [ 'healthy' ] > ) => cellData . cell . row . original ?. installed != null ? < ResourceStatusCell value = { cellData . cell . row . original ?. healthy } transitionTime = { cellData . cell . row . original ?. healthyTransitionTime } /> : null
5757 } ,
5858 {
5959 Header : t ( 'Providers.tableHeaderCreated' ) ,
6060 accessor : 'created' ,
6161 } ,
6262 ] ;
6363
64- const rows : providersRow [ ] =
64+ const rows : ProvidersRow [ ] =
6565 providers ?. items ?. map ( ( item ) => {
6666 const installed = item . status . conditions ?. find ( ( condition ) => condition . type === 'Installed' ) ;
67- const healhty = item . status . conditions ?. find ( ( condition ) => condition . type === 'Healthy' ) ;
67+ const healthy = item . status . conditions ?. find ( ( condition ) => condition . type === 'Healthy' ) ;
6868
6969 return {
7070 name : item . metadata . name ,
7171 created : timeAgo . format ( new Date ( item . metadata . creationTimestamp ) ) ,
7272 installed : installed ?. status === "True" ,
7373 installedTransitionTime : installed ?. lastTransitionTime ?? "" ,
74- healthy : healhty ?. status === "True" ,
75- healthyTransitionTime : healhty ?. lastTransitionTime ?? "" ,
76- version : item . spec . package . match ( / \d + ( \. \d + ) + / g) ,
74+ healthy : healthy ?. status === "True" ,
75+ healthyTransitionTime : healthy ?. lastTransitionTime ?? "" ,
76+ version : item . spec . package . match ( / \d + ( \. \d + ) + / g) ?. toString ( ) ?? "" ,
7777 }
7878 } )
7979 ?? [ ] ;
0 commit comments