Skip to content

Commit

Permalink
fix(ui): prevent unnecessary endpoint calls on custom dashboard (#6201)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Nov 29, 2024
1 parent 9f66f39 commit b93b834
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ui/src/components/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,17 @@
? moment().toISOString(true)
: route.query.endDate || moment().toISOString(true);
try {
await Promise.any([
fetchNumbers(),
fetchExecutions(),
fetchNamespaceExecutions(),
fetchLogs(),
]);
} catch (error) {
console.error("All promises failed:", error);
if (!custom.value.shown) {
try {
await Promise.any([
fetchNumbers(),
fetchExecutions(),
fetchNamespaceExecutions(),
fetchLogs(),
]);
} catch (error) {
console.error("All promises failed:", error);
}
}
};
Expand Down

0 comments on commit b93b834

Please sign in to comment.