Просмотр исходного кода

fix: restore dashboard history version did not reload route correctly when slug did not change

Torkel Ödegaard 8 лет назад
Родитель
Сommit
7d642546b3
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      public/app/features/dashboard/history/history.ts

+ 2 - 0
public/app/features/dashboard/history/history.ts

@@ -27,6 +27,7 @@ export class HistoryListCtrl {
 
   /** @ngInject */
   constructor(private $scope,
+              private $route,
               private $rootScope,
               private $location,
               private $window,
@@ -179,6 +180,7 @@ export class HistoryListCtrl {
     this.loading = true;
     return this.historySrv.restoreDashboard(this.dashboard, version).then(response => {
       this.$location.path('dashboard/db/' + response.slug);
+      this.$route.reload();
       this.$rootScope.appEvent('alert-success', ['Dashboard restored', 'Restored from version ' + version]);
     }).catch(() => {
       this.mode = 'list';