From 3ba8aeb9a742eec05bf29125802a6997b59062ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 7 Jun 2017 14:02:45 +0200 Subject: [PATCH] dashboard_history: fix for scenario where reverted dashbord has different title and url must change not just route reload --- public/app/features/dashboard/history/history.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/history/history.ts b/public/app/features/dashboard/history/history.ts index 5bd8ef7c895..10ab3f3fa28 100644 --- a/public/app/features/dashboard/history/history.ts +++ b/public/app/features/dashboard/history/history.ts @@ -28,7 +28,7 @@ export class HistoryListCtrl { /** @ngInject */ constructor(private $scope, private $rootScope, - private $route, + private $location, private $window, private $timeout, private $q, @@ -178,7 +178,7 @@ export class HistoryListCtrl { restoreConfirm(version: number) { this.loading = true; return this.historySrv.restoreDashboard(this.dashboard, version).then(response => { - this.$route.reload(); + this.$location.path('dashboard/db/' + response.slug); this.$rootScope.appEvent('alert-success', ['Dashboard restored', 'Restored from version ' + version]); }).catch(() => { this.mode = 'list';