Skip to content

Commit aaeadb0

Browse files
authored
Fix change availability bug (#667)
Signed-off-by: Eugene Lee <[email protected]>
1 parent 0b8c57e commit aaeadb0

File tree

1 file changed

+3
-1
lines changed
  • dashboards-observability/public/components/application_analytics

1 file changed

+3
-1
lines changed

dashboards-observability/public/components/application_analytics/home.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)