From 7aaa15ad95e99553a7d856e7815e8bdde61d9151 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Mon, 27 Jun 2016 20:14:09 +0900 Subject: [PATCH 1/3] (snapshot) save original url --- public/app/features/dashboard/dashnav/dashnav.html | 6 ++++++ public/app/features/dashboard/shareSnapshotCtrl.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html index cc8878163af..90312773949 100644 --- a/public/app/features/dashboard/dashnav/dashnav.html +++ b/public/app/features/dashboard/dashnav/dashnav.html @@ -41,6 +41,12 @@ +
  • + + Original Dashboard + + +
  • diff --git a/public/app/features/dashboard/shareSnapshotCtrl.js b/public/app/features/dashboard/shareSnapshotCtrl.js index 853e3db3b9c..7bd35e98d1d 100644 --- a/public/app/features/dashboard/shareSnapshotCtrl.js +++ b/public/app/features/dashboard/shareSnapshotCtrl.js @@ -41,7 +41,8 @@ function (angular, _) { $scope.createSnapshot = function(external) { $scope.dashboard.snapshot = { - timestamp: new Date() + timestamp: new Date(), + originalUrl: $location.absUrl() }; $scope.loading = true; From cc519adcfca5cdf447e482aec705b81694d62bdd Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 28 Jun 2016 08:36:04 +0900 Subject: [PATCH 2/3] (snapshot) restrict saving original url for local snapshot --- public/app/features/dashboard/shareSnapshotCtrl.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/shareSnapshotCtrl.js b/public/app/features/dashboard/shareSnapshotCtrl.js index 7bd35e98d1d..f9dd78dba43 100644 --- a/public/app/features/dashboard/shareSnapshotCtrl.js +++ b/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; From 630d0d0793898ad35abe080aaa2f3dddd6192c18 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Sat, 2 Jul 2016 02:16:12 +0900 Subject: [PATCH 3/3] (snapshot) add open original dashboard button --- public/app/features/dashboard/dashnav/dashnav.html | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html index 90312773949..a9145973cc2 100644 --- a/public/app/features/dashboard/dashnav/dashnav.html +++ b/public/app/features/dashboard/dashnav/dashnav.html @@ -41,17 +41,14 @@
  • -
  • - - Original Dashboard - - -
  • +
  • + +