mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 06:56:07 -06:00
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
This commit is contained in:
parent
3c2bfbfc1c
commit
4ca125da41
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user