Forráskód Böngészése

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

Torkel Ödegaard 8 éve
szülő
commit
7d642546b3
1 módosított fájl, 2 hozzáadás és 0 törlés
  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 */
   /** @ngInject */
   constructor(private $scope,
   constructor(private $scope,
+              private $route,
               private $rootScope,
               private $rootScope,
               private $location,
               private $location,
               private $window,
               private $window,
@@ -179,6 +180,7 @@ export class HistoryListCtrl {
     this.loading = true;
     this.loading = true;
     return this.historySrv.restoreDashboard(this.dashboard, version).then(response => {
     return this.historySrv.restoreDashboard(this.dashboard, version).then(response => {
       this.$location.path('dashboard/db/' + response.slug);
       this.$location.path('dashboard/db/' + response.slug);
+      this.$route.reload();
       this.$rootScope.appEvent('alert-success', ['Dashboard restored', 'Restored from version ' + version]);
       this.$rootScope.appEvent('alert-success', ['Dashboard restored', 'Restored from version ' + version]);
     }).catch(() => {
     }).catch(() => {
       this.mode = 'list';
       this.mode = 'list';