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

Fix snapshots for the old arch
This commit is contained in:
Haris Rozajac
2025-01-14 07:33:29 -07:00
committed by GitHub
parent 3884c0e896
commit 125a11ca99
@@ -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)