fix(console): show overview loading failures

Failed overview requests must not look like an empty dashboard or
a successful refresh. Show the reason while retaining prior data.
This commit is contained in:
翅膀 committed 2026-10-23 23:23:48 +08:00
1 parent 4fae01453c
commit a31f7cbe43
3 files changed
+22 -2

No files matched your search

+3
View File
@@ -8,6 +8,8 @@ const props = defineProps<{
groupsLoading: boolean;
logsLoading: boolean;
metricsLoading: boolean;
/** Why the latest load failed (what is shown may be empty or older). */
error?: string;
}>();
const { t } = useI18n();
@@ -72,6 +74,7 @@ function fmtTime(ts: number): string {
<template>
<div class="space-y-6">
<p v-if="error" class="err">{{ t("overview.loadFailed", { error }) }}</p>
<!-- KPI cards -->
<section class="grid grid-cols-2 gap-4 xl:grid-cols-4">
<RcCard v-for="k in kpis" :key="k.label" variant="outline" padding="md" class="p-5">