From 359505a8aa46cbf3853d06e2ec929840d0e1a251 Mon Sep 17 00:00:00 2001 From: Yunwen Zheng Date: Tue, 23 Dec 2025 09:14:00 -0500 Subject: [PATCH] RecentlyViewedDashboards: Retry when error (#115649) --- .../components/RecentlyViewedDashboards.tsx | 14 +++++++++++++- public/locales/en-US/grafana.json | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/public/app/features/browse-dashboards/components/RecentlyViewedDashboards.tsx b/public/app/features/browse-dashboards/components/RecentlyViewedDashboards.tsx index 7b2d58fa423..8109de32145 100644 --- a/public/app/features/browse-dashboards/components/RecentlyViewedDashboards.tsx +++ b/public/app/features/browse-dashboards/components/RecentlyViewedDashboards.tsx @@ -25,6 +25,7 @@ export function RecentlyViewedDashboards() { value: recentDashboards = [], loading, retry, + error, } = useAsyncRetry(async () => { if (!evaluateBooleanFlag('recentlyViewedDashboards', false)) { return []; @@ -62,7 +63,18 @@ export function RecentlyViewedDashboards() { className={styles.title} contentClassName={styles.content} > - {/* placeholder */} + {error && ( + <> + + + Recently viewed dashboards couldn’t be loaded. + + + + + )} {loading && } {/* TODO: Better empty state https://github.com/grafana/grafana/issues/114804 */} {!loading && recentDashboards.length === 0 && ( diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 807d6fbfa4b..85563c43905 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -3748,6 +3748,8 @@ "recently-viewed": { "clear": "Clear history", "empty": "Nothing viewed yet", + "error": "Recently viewed dashboards couldn’t be loaded.", + "retry": "Retry", "title": "Recently viewed" }, "restore": {