From 4ca125da412b824d348fb02fb3a86d11cea15141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 1 Apr 2015 08:24:03 +0200 Subject: [PATCH] Delete snapshot fix: the action is now shows confirmation directly in the modal (not opening a new tab with api call as in beta1), Fixes #1682 --- public/app/features/dashboard/partials/shareModal.html | 10 +++++++++- public/app/features/dashboard/shareSnapshotCtrl.js | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/partials/shareModal.html b/public/app/features/dashboard/partials/shareModal.html index 881d30ada97..6b9ff8aef16 100644 --- a/public/app/features/dashboard/partials/shareModal.html +++ b/public/app/features/dashboard/partials/shareModal.html @@ -84,6 +84,13 @@

+
+ +
+
@@ -135,7 +142,8 @@
- Did you make a mistake? delete snapshot. + Did you make a mistake? delete snapshot.
+
diff --git a/public/app/features/dashboard/shareSnapshotCtrl.js b/public/app/features/dashboard/shareSnapshotCtrl.js index 010f074957b..bcdbee57d18 100644 --- a/public/app/features/dashboard/shareSnapshotCtrl.js +++ b/public/app/features/dashboard/shareSnapshotCtrl.js @@ -117,6 +117,12 @@ function (angular, _) { }); }; + $scope.deleteSnapshot = function() { + backendSrv.get($scope.deleteUrl).then(function() { + $scope.step = 3; + }); + }; + $scope.saveExternalSnapshotRef = function(cmdData, results) { // save external in local instance as well cmdData.external = true;