incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: CS-16599: cloudstack UI - guest network page - fix a bug that networkdomain didn't show in a shared network.
Date Mon, 05 Nov 2012 18:41:42 GMT
Updated Branches:
  refs/heads/master b101dc727 -> 29dda3f41


CS-16599: cloudstack UI - guest network page - fix a bug that networkdomain didn't show in
a 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/29dda3f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/29dda3f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/29dda3f4

Branch: refs/heads/master
Commit: 29dda3f41a2670ddd3de34527aece204c764cf0a
Parents: b101dc7
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Fri Nov 2 14:08:47 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Mon Nov 5 10:39:23 2012 -0800

----------------------------------------------------------------------
 ui/scripts/network.js         |    3 ++-
 ui/scripts/sharedFunctions.js |   23 +++++++++++++++++++++++
 ui/scripts/system.js          |   22 ----------------------
 3 files changed, 25 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/29dda3f4/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index ef6eaa0..a149bfa 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -956,7 +956,8 @@
 										dataType: "json",
 										async: true,
 										success: function(json) {								  
-											var jsonObj = json.listnetworksresponse.network[0];   
+											var jsonObj = json.listnetworksresponse.network[0];  
+                      addExtraPropertiesToGuestNetworkObject(jsonObj);												
 											args.response.success(
 												{
 													actionFilter: cloudStack.actionFilter.guestNetwork,

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/29dda3f4/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 28b3bb9..b6b3ef8 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -454,6 +454,29 @@ function listViewDataProvider(args, data) {
 	});	
 }
 
+//used by infrastruct page and network page	
+var addExtraPropertiesToGuestNetworkObject = function(jsonObj) {  
+	jsonObj.networkdomaintext = jsonObj.networkdomain;
+	jsonObj.networkofferingidText = jsonObj.networkofferingid;
+
+	if(jsonObj.acltype == "Domain") {
+		if(jsonObj.domainid == rootAccountId)
+			jsonObj.scope = "All";
+		else
+			jsonObj.scope = "Domain (" + jsonObj.domain + ")";
+	}
+	else if (jsonObj.acltype == "Account"){
+		if(jsonObj.project != null)
+			jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.project + ")";
+		else
+			jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.account + ")";
+	}
+
+	if(jsonObj.vlan == null && jsonObj.broadcasturi != null) {
+		jsonObj.vlan = jsonObj.broadcasturi.replace("vlan://", "");   	
+	}
+}	
+
 //find service object in network object
 function ipFindNetworkServiceByName(pName, networkObj) {    
     if(networkObj == null)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/29dda3f4/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index d27abcc..7d3f1b9 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10406,28 +10406,6 @@
 		}
   }
 	
-	var addExtraPropertiesToGuestNetworkObject = function(jsonObj) {  
-		jsonObj.networkdomaintext = jsonObj.networkdomain;
-		jsonObj.networkofferingidText = jsonObj.networkofferingid;
-
-		if(jsonObj.acltype == "Domain") {
-			if(jsonObj.domainid == rootAccountId)
-				jsonObj.scope = "All";
-			else
-				jsonObj.scope = "Domain (" + jsonObj.domain + ")";
-		}
-		else if (jsonObj.acltype == "Account"){
-			if(jsonObj.project != null)
-				jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.project + ")";
-			else
-				jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.account + ")";
-		}
-
-		if(jsonObj.vlan == null && jsonObj.broadcasturi != null) {
-			jsonObj.vlan = jsonObj.broadcasturi.replace("vlan://", "");   	
-		}
-  }	
-	
 	var addExtraPropertiesToRouterInstanceObject = function(jsonObj) {  		
 		if(jsonObj.isredundantrouter == true)
 			jsonObj["redundantRouterState"] = jsonObj.redundantstate;


Mime
View raw message