2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-31 14:25:30 +00:00

only show abandon zone button to zone admins (#616)

This commit is contained in:
Britney Wright
2019-05-10 14:49:24 -04:00
committed by GitHub
parent 382b9a54cf
commit 0827a970e6
9 changed files with 212 additions and 95 deletions

View File

@@ -83,6 +83,27 @@ angular.module('controller.manageZones', [])
$scope.currentManageZoneState = $scope.manageZoneState.UPDATE;
};
$scope.confirmDeleteZone = function() {
$("#delete_zone_connection_modal").modal("show");
};
$scope.submitDeleteZone = function() {
zonesService.delZone($scope.zoneInfo.id)
.then(function (response) {
$("#delete_zone_connection_modal").modal("hide");
var msg = response.statusText + " (HTTP "+response.status+"): " + response.data.changeType + " zone '" + response.data.zone.name + "'";
$scope.alerts.push({type: "success", content: msg});
$timeout(function(){
location.href = "/zones";
}, 2000);
})
.catch(function (error) {
$("#delete_zone_connection_modal").modal("hide");
$scope.zoneError = true;
handleError(error, 'zonesService::sendZone-failure');
});
};
/**
* Acl modal control functions
*/