[release-11.5.4] Dashboard: Fix snapshots for the old arch (#103345)

Dashboard: Fix snapshots for the old arch (#98902)

Fix snapshots for the old arch

(cherry picked from commit 125a11ca99)

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
This commit is contained in:
Sergej-Vlasov
2025-04-04 11:02:35 +01:00
committed by GitHub
co-authored by Haris Rozajac
parent 3ab43f8b7c
commit c348917df2
@@ -146,6 +146,14 @@ export class DashboardLoaderSrv extends DashboardLoaderSrvBase<DashboardDTO> {
if (type === 'script' && slug) {
promise = this.loadScriptedDashboard(slug);
// needed for the old architecture
// in scenes this is handled through loadSnapshot method
} else if (type === 'snapshot' && slug) {
promise = getDashboardSnapshotSrv()
.getSnapshot(slug)
.catch(() => {
return this._dashboardLoadFailed('Snapshot not found', true);
});
} else if (type === 'public' && uid) {
promise = backendSrv
.getPublicDashboardByUid(uid)