Skip to content

Commit b040bf2

Browse files
author
Jessica Wang
committed
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.
1 parent 71af0db commit b040bf2

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6256,20 +6256,26 @@
62566256
success: function(json) {
62576257
selectedZoneObj = json.listzonesresponse.zone[0];
62586258
$.ajax({
6259-
url: createURL("listDedicatedZones&zoneid=" + args.context.physicalResources[0].id),
6260-
dataType: "json",
6259+
url: createURL('listDedicatedZones'),
6260+
data: {
6261+
zoneid: args.context.physicalResources[0].id
6262+
},
62616263
async: false,
6262-
success: function(json) {
6264+
success: function(json) {
62636265
if (json.listdedicatedzonesresponse.dedicatedzone != undefined) {
6264-
var zoneItem = json.listdedicatedzonesresponse.dedicatedzone[0];
6265-
if (zoneItem.domainid != null) {
6266-
$.extend(selectedZoneObj, zoneItem, {
6267-
isdedicated: 'Yes'
6266+
var dedicatedzoneObj = json.listdedicatedzonesresponse.dedicatedzone[0];
6267+
if (dedicatedzoneObj.domainid != null) {
6268+
$.extend(selectedZoneObj, {
6269+
isdedicated: 'Yes',
6270+
domainid: dedicatedzoneObj.domainid,
6271+
accountid: dedicatedzoneObj.accountid
62686272
});
62696273
}
62706274
} else {
62716275
$.extend(selectedZoneObj, {
6272-
isdedicated: 'No'
6276+
isdedicated: 'No',
6277+
domainid: null,
6278+
accountid: null
62736279
})
62746280
}
62756281
}

0 commit comments

Comments
 (0)