From 36a7c10f679b5a0cd7e70fa5361d2ff74d80241f Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Tue, 2 Dec 2025 13:00:37 +0300 Subject: [PATCH] add history --- .../dashboard-scene/settings/version-history/HistorySrv.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/features/dashboard-scene/settings/version-history/HistorySrv.ts b/public/app/features/dashboard-scene/settings/version-history/HistorySrv.ts index 95cd468ec63..2cacdf9813d 100644 --- a/public/app/features/dashboard-scene/settings/version-history/HistorySrv.ts +++ b/public/app/features/dashboard-scene/settings/version-history/HistorySrv.ts @@ -19,6 +19,7 @@ export interface RevisionsModel { data: Dashboard; } +// TODO: this should be removed entirely export class HistorySrv { getHistoryList(dashboardUID: string, options: HistoryListOpts) { if (typeof dashboardUID !== 'string') { @@ -36,6 +37,8 @@ export class HistorySrv { return getBackendSrv().get(`api/dashboards/uid/${dashboardUID}/versions/${version}`); } + // restore should not be needed -- each result has the full dashboard data, + // so just update the dashboard with the data from the version you want to restore restoreDashboard(dashboardUID: string, version: number) { if (typeof dashboardUID !== 'string') { return Promise.resolve({});