Updated Branches:
  refs/heads/4.2 0185c2f47 -> 219b3eb0d

CLOUDSTACK-4189: UI > Infrastructure > zone > dedicatedZone object is different 
from zone object. Fix a bug that they were wrongly presumed to be the same 
object and wrongly mixed which caused zone object's properties being wrongly 
overriden.


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

Branch: refs/heads/4.2
Commit: 219b3eb0ddcc4d2f6554144ca174a5f4e0521924
Parents: 0185c2f
Author: Jessica Wang <jessicaw...@apache.org>
Authored: Fri Aug 9 18:45:47 2013 -0700
Committer: Jessica Wang <jessicaw...@apache.org>
Committed: Fri Aug 9 18:49:30 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/219b3eb0/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f4bee5a..3512958 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6256,20 +6256,26 @@
                                                 success: function(json) {
                                                     selectedZoneObj = 
json.listzonesresponse.zone[0];
                                                     $.ajax({
-                                                        url: 
createURL("listDedicatedZones&zoneid=" + args.context.physicalResources[0].id),
-                                                        dataType: "json",
+                                                        url: 
createURL('listDedicatedZones'),
+                                                        data: {
+                                                               zoneid: 
args.context.physicalResources[0].id
+                                                        },
                                                         async: false,
-                                                        success: 
function(json) {
+                                                        success: 
function(json) {                                                       
                                                             if 
(json.listdedicatedzonesresponse.dedicatedzone != undefined) {
-                                                                var zoneItem = 
json.listdedicatedzonesresponse.dedicatedzone[0];
-                                                                if 
(zoneItem.domainid != null) {
-                                                                    
$.extend(selectedZoneObj, zoneItem, {
-                                                                        
isdedicated: 'Yes'
+                                                                var 
dedicatedzoneObj = json.listdedicatedzonesresponse.dedicatedzone[0];
+                                                                if 
(dedicatedzoneObj.domainid != null) {
+                                                                    
$.extend(selectedZoneObj, {
+                                                                        
isdedicated: 'Yes',
+                                                                        
domainid: dedicatedzoneObj.domainid,
+                                                                        
accountid: dedicatedzoneObj.accountid
                                                                     });
                                                                 }
                                                             } else {
                                                                 
$.extend(selectedZoneObj, {
-                                                                    
isdedicated: 'No'
+                                                                    
isdedicated: 'No',
+                                                                    domainid: 
null,
+                                                                    accountid: 
null
                                                                 })
                                                             }
                                                         }

Reply via email to