浏览代码

Dashboard snapshot: cleanup snapshot data after snapshot, #1623

Torkel Ödegaard 10 年之前
父节点
当前提交
98c0209976
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      src/app/features/dashboard/shareSnapshotCtrl.js

+ 7 - 2
src/app/features/dashboard/shareSnapshotCtrl.js

@@ -26,6 +26,12 @@ function (angular) {
           panel.links = [];
           panel.links = [];
         });
         });
 
 
+        // cleanup snapshotData
+        $scope.dashboard.snapshot = false;
+        $scope.dashboard.forEachPanel(function(panel) {
+          delete panel.snapshotData;
+        });
+
         var apiUrl = '/api/snapshots';
         var apiUrl = '/api/snapshots';
 
 
         if (makePublic) {
         if (makePublic) {
@@ -46,8 +52,7 @@ function (angular) {
           $scope.loading = false;
           $scope.loading = false;
         });
         });
 
 
-        $scope.dashboard.snapshot = false;
-        $scope.appEvent('dashboard-snapshot-cleanup');
+
       }, 2000);
       }, 2000);
     };
     };