@@ -18,6 +18,7 @@ import { YamlViewButton } from '../Yaml/YamlViewButton.tsx';
1818import '@ui5/webcomponents-icons/dist/sys-enter-2' ;
1919import '@ui5/webcomponents-icons/dist/sys-cancel-2' ;
2020import StatusFilter from '../Shared/StatusFilter/StatusFilter.tsx' ;
21+ import { ResourceStatusCellWithButton } from '../Shared/ResourceStatusCellWithButton.tsx' ;
2122
2223interface CellData < T > {
2324 cell : {
@@ -33,8 +34,10 @@ type ProvidersRow = {
3334 version : string ;
3435 healthy : string ;
3536 healthyTransitionTime : string ;
37+ healthyMessage : string ;
3638 installed : string ;
3739 installedTransitionTime : string ;
40+ installedMessage : string ;
3841 created : string ;
3942 item : unknown ;
4043} ;
@@ -68,39 +71,44 @@ export function Providers() {
6871 Header : t ( 'Providers.tableHeaderInstalled' ) ,
6972 accessor : 'installed' ,
7073 hAlign : 'Center' ,
71- width : 85 ,
74+ width : 125 ,
7275 Filter : ( { column } ) => < StatusFilter column = { column } /> ,
7376 filter : 'equals' ,
7477 Cell : ( cellData : CellData < ProvidersRow [ 'installed' ] > ) =>
7578 cellData . cell . row . original ?. installed != null ? (
76- < ResourceStatusCell
79+ < ResourceStatusCellWithButton
7780 value = { cellData . cell . row . original ?. installed === 'true' }
7881 transitionTime = { cellData . cell . row . original ?. installedTransitionTime }
82+ positiveText = { 'Installed' }
83+ negativeText = { 'Install error' }
84+ message = { cellData . cell . row . original ?. installedMessage }
7985 />
8086 ) : null ,
8187 } ,
8288 {
8389 Header : t ( 'Providers.tableHeaderHealthy' ) ,
8490 accessor : 'healthy' ,
8591 hAlign : 'Center' ,
86- width : 85 ,
92+ width : 125 ,
8793 Filter : ( { column } ) => < StatusFilter column = { column } /> ,
8894 filter : 'equals' ,
8995 Cell : ( cellData : CellData < ProvidersRow [ 'healthy' ] > ) =>
9096 cellData . cell . row . original ?. installed != null ? (
9197 < div >
92- < ResourceStatusCell
98+ < ResourceStatusCellWithButton
9399 value = { cellData . cell . row . original ?. healthy === 'true' }
94100 transitionTime = { cellData . cell . row . original ?. healthyTransitionTime }
101+ positiveText = { 'Healthy' }
102+ negativeText = { 'Not healthy' }
103+ message = { cellData . cell . row . original ?. healthyMessage }
95104 />
96- here2
97105 </ div >
98106 ) : null ,
99107 } ,
100108 {
101109 Header : t ( 'yaml.YAML' ) ,
102110 hAlign : 'Center' ,
103- width : 85 ,
111+ width : 75 ,
104112 accessor : 'yaml' ,
105113 disableFilters : true ,
106114 Cell : ( cellData : CellData < ProvidersRow > ) => (
@@ -124,6 +132,8 @@ export function Providers() {
124132 healthyTransitionTime : healthy ?. lastTransitionTime ?? '' ,
125133 version : item . spec . package . match ( / \d + ( \. \d + ) + / g) ?. toString ( ) ?? '' ,
126134 item : item ,
135+ healthyMessage : healthy ?. message ?? healthy ?. reason ?? '' ,
136+ installedMessage : installed ?. message ?? installed ?. reason ?? '' ,
127137 } ;
128138 } ) ?? [ ] ;
129139
0 commit comments