소스 검색

(snapshot) restrict saving original url for local snapshot

Mitsuhiro Tanda 9 년 전
부모
커밋
cc519adcfc
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      public/app/features/dashboard/shareSnapshotCtrl.js

+ 5 - 2
public/app/features/dashboard/shareSnapshotCtrl.js

@@ -41,10 +41,13 @@ function (angular, _) {
 
     $scope.createSnapshot = function(external) {
       $scope.dashboard.snapshot = {
-        timestamp: new Date(),
-        originalUrl: $location.absUrl()
+        timestamp: new Date()
       };
 
+      if (!external) {
+        $scope.dashboard.snapshot.originalUrl = $location.absUrl();
+      }
+
       $scope.loading = true;
       $scope.snapshot.external = external;