CLOUDSTACK-571: cloudstack UI - network menu - guest network section - network detailView - edit action - network offering upgrade is not allowed in Shared network.

This commit is contained in:
Jessica Wang 2012-11-30 09:35:38 -08:00
parent 4b539ddcb3
commit 8819ec6ea7
2 changed files with 6 additions and 1 deletions

View File

@ -933,6 +933,11 @@
label: 'label.network.offering',
isEditable: true,
select: function(args){
if (args.context.networks[0].type == 'Shared') { //Shared network is not allowed to upgrade to a different network offering
args.response.success({ data: [] });
return;
}
if (args.context.networks[0].state == 'Destroyed') {
args.response.success({ data: [] });
return;

View File

@ -266,7 +266,7 @@ cloudStack.actionFilter = {
var allowedActions = [];
if(jsonObj.type == 'Isolated') {
allowedActions.push('edit'); //only Isolated network can be upgraded
allowedActions.push('edit'); //only Isolated network is allowed to upgrade to a different network offering (Shared network is not allowed to)
allowedActions.push('restart');
allowedActions.push('remove');
}