diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index 78d05c84126..16f86646abf 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -436,7 +436,7 @@ } }, - destroy: { + remove: { label: 'label.action.delete.account', messages: { confirm: function(args) { @@ -1006,7 +1006,7 @@ else if(jsonObj.state == "disabled" || jsonObj.state == "locked") { allowedActions.push("enable"); } - allowedActions.push("destroy"); + allowedActions.push("remove"); } } allowedActions.push("updateResourceCount"); diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 3f595fc9518..5a9f467d49a 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1489,7 +1489,7 @@ } }, - destroy: { + remove: { label: 'Remove network offering', action: function(args) { $.ajax({ @@ -1662,7 +1662,7 @@ allowedActions.push("enable"); if(jsonObj.isdefault == false) - allowedActions.push("destroy"); + allowedActions.push("remove"); return allowedActions; }; diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 8589f4c989f..d72f007be2d 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -495,7 +495,7 @@ } }, - destroy: { + remove: { label: 'label.action.delete.network', messages: { confirm: function(args) { @@ -514,10 +514,7 @@ var jid = json.deletenetworkresponse.jobid; args.response.success( {_custom: - {jobId: jid, - getUpdatedItem: function(json) { - return { state: 'Destroyed' }; //nothing in this network needs to be updated, in fact, this whole template has being deleted - } + {jobId: jid } } ); @@ -2912,9 +2909,8 @@ var jsonObj = args.context.item; var allowedActions = []; - if (jsonObj.state == 'Destroyed') - return []; - + allowedActions.push('remove'); + if (jsonObj.type == 'Shared' || !$.grep(jsonObj.service, function(service) { return service.name == 'SourceNat';