@@ -37,8 +37,8 @@ export default function FluxList() {
3737 type FluxRow = {
3838 name : string ;
3939 created : string ;
40- status : boolean ;
41- statusUptadeTime ?: string ;
40+ isReady : boolean ;
41+ statusUpdateTime ?: string ;
4242 } ;
4343
4444 if ( repoErr || kustomizationErr ) {
@@ -58,13 +58,13 @@ export default function FluxList() {
5858 {
5959 Header : t ( 'FluxList.tableStatusHeader' ) ,
6060 accessor : 'status' ,
61- Cell : ( cellData : CellData < FluxRow [ 'status ' ] > ) =>
62- cellData . cell . row . original ?. status != null ? (
61+ Cell : ( cellData : CellData < FluxRow [ 'isReady ' ] > ) =>
62+ cellData . cell . row . original ?. isReady != null ? (
6363 < ResourceStatusCell
64- value = { cellData . cell . row . original ?. status }
64+ value = { cellData . cell . row . original ?. isReady }
6565 transitionTime = {
66- cellData . cell . row . original ?. statusUptadeTime
67- ? cellData . cell . row . original ?. statusUptadeTime
66+ cellData . cell . row . original ?. statusUpdateTime
67+ ? cellData . cell . row . original ?. statusUpdateTime
6868 : ''
6969 }
7070 />
@@ -88,13 +88,13 @@ export default function FluxList() {
8888 {
8989 Header : t ( 'FluxList.tableStatusHeader' ) ,
9090 accessor : 'status' ,
91- Cell : ( cellData : CellData < FluxRow [ 'status ' ] > ) =>
92- cellData . cell . row . original ?. status != null ? (
91+ Cell : ( cellData : CellData < FluxRow [ 'isReady ' ] > ) =>
92+ cellData . cell . row . original ?. isReady != null ? (
9393 < ResourceStatusCell
94- value = { cellData . cell . row . original ?. status }
94+ value = { cellData . cell . row . original ?. isReady }
9595 transitionTime = {
96- cellData . cell . row . original ?. statusUptadeTime
97- ? cellData . cell . row . original ?. statusUptadeTime
96+ cellData . cell . row . original ?. statusUpdateTime
97+ ? cellData . cell . row . original ?. statusUpdateTime
9898 : ''
9999 }
100100 />
@@ -106,26 +106,14 @@ export default function FluxList() {
106106 } ,
107107 ] ;
108108
109- function shortenCommitHash ( commitHash : string ) : string {
110- //example hash: master@sha 1:b3396adb98a6a0f5eeedd1a600beaf5e954a1f28
111- const match = commitHash . match ( / ^ ( [ a - z A - Z 0 - 9 - _ ] + ) @ s h a 1 : ( [ a - f 0 - 9 ] { 40 } ) / ) ;
112-
113- if ( match && match [ 2 ] ) {
114- return `${ match [ 1 ] } @${ match [ 2 ] . slice ( 0 , 7 ) } ` ;
115- }
116-
117- //example output : master@b 3396ad
118- return commitHash ;
119- }
120-
121109 const gitReposRows : FluxRow [ ] =
122110 gitReposData ?. items ?. map ( ( item ) => {
123111 return {
124112 name : item . metadata . name ,
125- status :
113+ isReady :
126114 item . status . conditions . find ( ( x ) => x . type === 'Ready' ) ?. status ===
127115 'True' ,
128- statusUptadeTime : item . status . conditions . find ( ( x ) => x . type === 'Ready' )
116+ statusUpdateTime : item . status . conditions . find ( ( x ) => x . type === 'Ready' )
129117 ?. lastTransitionTime ,
130118 revision : shortenCommitHash ( item . status . artifact . revision ) ,
131119 created : timeAgo . format ( new Date ( item . metadata . creationTimestamp ) ) ,
@@ -136,10 +124,10 @@ export default function FluxList() {
136124 kustmizationData ?. items ?. map ( ( item ) => {
137125 return {
138126 name : item . metadata . name ,
139- status :
127+ isReady :
140128 item . status . conditions . find ( ( x ) => x . type === 'Ready' ) ?. status ===
141129 'True' ,
142- statusUptadeTime : item . status . conditions . find ( ( x ) => x . type === 'Ready' )
130+ statusUpdateTime : item . status . conditions . find ( ( x ) => x . type === 'Ready' )
143131 ?. lastTransitionTime ,
144132 created : timeAgo . format ( new Date ( item . metadata . creationTimestamp ) ) ,
145133 } ;
@@ -167,3 +155,15 @@ export default function FluxList() {
167155 </ >
168156 ) ;
169157}
158+
159+ function shortenCommitHash ( commitHash : string ) : string {
160+ //example hash: master@sha 1:b3396adb98a6a0f5eeedd1a600beaf5e954a1f28
161+ const match = commitHash . match ( / ^ ( [ a - z A - Z 0 - 9 - _ ] + ) @ s h a 1 : ( [ a - f 0 - 9 ] { 40 } ) / ) ;
162+
163+ if ( match && match [ 2 ] ) {
164+ return `${ match [ 1 ] } @${ match [ 2 ] . slice ( 0 , 7 ) } ` ;
165+ }
166+
167+ //example output : master@b 3396ad
168+ return commitHash ;
169+ }
0 commit comments