File tree Expand file tree Collapse file tree 7 files changed +19
-17
lines changed Expand file tree Collapse file tree 7 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,11 @@ export default function FluxList() {
153153      return  { 
154154        name : item . metadata . name , 
155155        isReady :
156-           item . status . conditions . find ( ( x )  =>  x . type  ===  'Ready' ) ?. status  === 
156+           item ? .status ? .conditions ? .find ( ( x )  =>  x . type  ===  'Ready' ) ?. status  === 
157157          'True' , 
158-         statusUpdateTime : item . status . conditions . find ( ( x )  =>  x . type  ===  'Ready' ) 
159-           ?. lastTransitionTime , 
158+         statusUpdateTime : item . status ?. conditions ?. find ( 
159+           ( x )  =>  x . type  ===  'Ready' , 
160+         ) ?. lastTransitionTime , 
160161        revision : shortenCommitHash ( item . status . artifact ?. revision  ??  '-' ) , 
161162        created : timeAgo . format ( new  Date ( item . metadata . creationTimestamp ) ) , 
162163        item : item , 
@@ -168,10 +169,11 @@ export default function FluxList() {
168169      return  { 
169170        name : item . metadata . name , 
170171        isReady :
171-           item . status . conditions . find ( ( x )  =>  x . type  ===  'Ready' ) ?. status  === 
172+           item . status ? .conditions ? .find ( ( x )  =>  x . type  ===  'Ready' ) ?. status  === 
172173          'True' , 
173-         statusUpdateTime : item . status . conditions . find ( ( x )  =>  x . type  ===  'Ready' ) 
174-           ?. lastTransitionTime , 
174+         statusUpdateTime : item . status ?. conditions ?. find ( 
175+           ( x )  =>  x . type  ===  'Ready' , 
176+         ) ?. lastTransitionTime , 
175177        created : timeAgo . format ( new  Date ( item . metadata . creationTimestamp ) ) , 
176178        item : item , 
177179      } ; 
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export default function MCPHealthPopoverButton({
6363
6464    const  statusDetails  =  mcpStatus ?. conditions 
6565      ? `${ t ( 'MCPHealthPopoverButton.statusDetailsLabel' ) } ${ mcpStatus . status } ${ t ( 'MCPHealthPopoverButton.detailsLabel' ) }   + 
66-         mcpStatus . conditions 
66+         mcpStatus ? .conditions 
6767          . map ( ( condition )  =>  { 
6868            let  text  =  `- ${ condition . type } ${ condition . status }  ; 
6969            if  ( condition . reason ) 
@@ -160,7 +160,7 @@ function StatusTable({
160160        scaleWidthMode = "Smart" 
161161        columns = { tableColumns } 
162162        data = { 
163-           status ?. conditions . sort ( ( a ,  b )  =>  { 
163+           status ?. conditions ? .sort ( ( a ,  b )  =>  { 
164164            return  a . type  <  b . type  ? - 1  : 1 ; 
165165          } )  ??  [ ] 
166166        } 
Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ export function ManagedResources() {
106106      ?. filter ( ( managedResource )  =>  managedResource . items ) 
107107      . flatMap ( ( managedResource )  => 
108108        managedResource . items ?. map ( ( item )  =>  { 
109-           const  conditionSynced  =  item . status . conditions ?. find ( 
109+           const  conditionSynced  =  item . status ? .conditions ?. find ( 
110110            ( condition )  =>  condition . type  ===  'Synced' , 
111111          ) ; 
112-           const  conditionReady  =  item . status . conditions ?. find ( 
112+           const  conditionReady  =  item . status ? .conditions ?. find ( 
113113            ( condition )  =>  condition . type  ===  'Ready' , 
114114          ) ; 
115115
Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ export function Providers() {
106106
107107  const  rows : ProvidersRow [ ]  = 
108108    providers ?. items ?. map ( ( item )  =>  { 
109-       const  installed  =  item . status . conditions ?. find ( 
109+       const  installed  =  item . status ? .conditions ?. find ( 
110110        ( condition )  =>  condition . type  ===  'Installed' , 
111111      ) ; 
112-       const  healthy  =  item . status . conditions ?. find ( 
112+       const  healthy  =  item . status ? .conditions ?. find ( 
113113        ( condition )  =>  condition . type  ===  'Healthy' , 
114114      ) ; 
115115      return  { 
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ export type ManagedResourcesResponse = [
99          name : string ; 
1010          creationTimestamp : string ; 
1111        } ; 
12-         status : { 
13-           conditions : [ 
12+         status ? : { 
13+           conditions ? : [ 
1414            { 
1515              type : 'Ready'  |  'Synced'  |  unknown ; 
1616              status : 'True'  |  'False' ; 
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ export type ProvidersListResponse = {
1111        name : string ; 
1212        creationTimestamp : string ; 
1313      } ; 
14-       status : { 
15-         conditions : [ 
14+       status ? : { 
15+         conditions ? : [ 
1616          { 
1717            type : 'Healthy'  |  'Installed'  |  unknown ; 
1818            status : 'True'  |  'False' ; 
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export type GitReposResponse = {
1515        artifact : { 
1616          revision : string ; 
1717        } ; 
18-         conditions : [ 
18+         conditions ? : [ 
1919          { 
2020            status : string ; 
2121            type : string ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments