You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/11/30 18:36:04 UTC

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

Updated Branches:
  refs/heads/master 4b539ddcb -> 8819ec6ea


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


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/8819ec6e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8819ec6e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8819ec6e

Branch: refs/heads/master
Commit: 8819ec6ea7c7214ceb252db3657cfa288bbafaa8
Parents: 4b539dd
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Nov 30 09:35:38 2012 -0800
Committer: Jessica Wang <je...@citrix.com>
Committed: Fri Nov 30 09:35:38 2012 -0800

----------------------------------------------------------------------
 ui/scripts/network.js         |    5 +++++
 ui/scripts/sharedFunctions.js |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8819ec6e/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index c53150d..7d2345a 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -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;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8819ec6e/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index b6b3ef8..f1b7efa 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -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');
 		}