mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-09-05 00:35:29 +00:00
stop duplicate zone creation bug (#307)
This commit is contained in:
@@ -96,15 +96,25 @@ angular.module('controller.zones', [])
|
||||
/* Set total number of zones */
|
||||
|
||||
$scope.addZoneConnection = function () {
|
||||
if ($scope.processing) {
|
||||
$log.log('zoneConnection::processing is true; exiting');
|
||||
return;
|
||||
}
|
||||
|
||||
//flag to prevent multiple clicks until previous promise has resolved.
|
||||
$scope.processing = true;
|
||||
|
||||
zonesService.sendZone($scope.currentZone)
|
||||
.then(function () {
|
||||
$timeout($scope.refreshZones(), 1000);
|
||||
$("#zone_connection_modal").modal("hide");
|
||||
$scope.processing = false;
|
||||
})
|
||||
.catch(function (error){
|
||||
$("#zone_connection_modal").modal("hide");
|
||||
$scope.zoneError = true;
|
||||
handleError(error, 'zonesService::sendZone-failure');
|
||||
$scope.processing = false;
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user