Commit 4ca125da by Torkel Ödegaard

Delete snapshot fix: the action is now shows confirmation directly in the modal…

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
parent 3c2bfbfc
......@@ -84,6 +84,13 @@
</p>
</div>
<div class="share-snapshot-header" ng-if="step === 3">
<p class="share-snapshot-info-text">
The snapshot has now been deleted. If it you have already accessed it once, It might take up to an hour before it is removed from
browser caches or CDN caches.
</p>
</div>
<div class="editor-row" style="margin: 11px 20px 33px 20px">
<div class="section" ng-if="step === 1">
<div class="tight-form">
......@@ -135,7 +142,8 @@
</div>
<div class="pull-right" ng-if="step === 2" style="padding: 5px">
Did you make a mistake? <a href="{{deleteUrl}}" target="_blank">delete snapshot.</a>
Did you make a mistake? <a class="pointer" ng-click="deleteSnapshot()" target="_blank">delete snapshot.</a>
</div>
</div>
</script>
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment