File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
dashboards-observability/public/components/application_analytics Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,9 @@ export const Home = (props: HomeProps) => {
200200 . get ( `${ APP_ANALYTICS_API_PREFIX } /` )
201201 . then ( async ( res ) => {
202202 // Want to calculate availability going down the table
203+ const mainVisIdStore : Record < string , string > = { } ;
203204 for ( let i = 0 ; i < res . data . length ; i ++ ) {
205+ mainVisIdStore [ res . data [ i ] . id ] = res . data [ i ] . availability . mainVisId ;
204206 res . data [ i ] . availability = { name : 'loading' , color : '' , mainVisId : '' } ;
205207 }
206208 setApplicationList ( res . data ) ;
@@ -209,7 +211,7 @@ export const Home = (props: HomeProps) => {
209211 http ,
210212 pplService ,
211213 res . data [ i ] ,
212- res . data [ i ] . availability . mainVisId ,
214+ mainVisIdStore [ res . data [ i ] . id ] ,
213215 ( ) => { }
214216 ) ;
215217 // Need to set state with new object to trigger re-render
You can’t perform that action at this time.
0 commit comments