Skip to content

Commit

Permalink
fix(datastore): have datastore table timeout properly when no data re…
Browse files Browse the repository at this point in the history
…turned
  • Loading branch information
brucetony committed Jul 29, 2024
1 parent 7397194 commit 50ee718
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions components/data-stores/DataStoreListTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ const dataStores = ref();
const consumers = ref();
const projectNameMap = ref();
const analysisNameMap = ref();
const loading = ref(true);
const dataRowUnixCols = ["created_at", "updated_at"];
const expandRowEntries = [];
onBeforeMount(() => {
nextTick(async () => {
await loadDetailedDataStoreTable();
loading.value = false;
const tableLoadSuccessful = await loadDetailedDataStoreTable();
projectNameMap.value = await fetchDataFromHub("/projects");
analysisNameMap.value = await fetchDataFromHub("/analyses");
if (tableLoadSuccessful) {
projectNameMap.value = await fetchDataFromHub("/projects");
analysisNameMap.value = await fetchDataFromHub("/analyses");
const consumerResp = (await $hubApi("/kong/analysis")) as ListConsumers;
consumers.value = consumerResp.data;
const consumerResp = (await $hubApi("/kong/analysis")) as ListConsumers;
consumers.value = consumerResp.data;
}
});
});
Expand All @@ -61,8 +61,10 @@ async function loadDetailedDataStoreTable() {
}
});
dataStores.value = formattedDataStores;
return true;
} else if (error.value?.statusCode === 500) {
showConnectionErrorToast();
dataStores.value = [];
}
}
Expand Down

0 comments on commit 50ee718

Please sign in to comment.