Updated Branches: refs/heads/UI-explicitDedication f4d9a8aaf -> 336baebfa
Zone Dedication UI-API Integration Code Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/336baebf Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/336baebf Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/336baebf Branch: refs/heads/UI-explicitDedication Commit: 336baebfa69688d1e2ec6b4f3fc62f03026dd757 Parents: f4d9a8a Author: Pranav Saxena <[email protected]> Authored: Wed May 15 18:19:05 2013 +0530 Committer: Pranav Saxena <[email protected]> Committed: Wed May 15 18:19:05 2013 +0530 ---------------------------------------------------------------------- ui/scripts/zoneWizard.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/336baebf/ui/scripts/zoneWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 9b28c32..f2e1a66 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -571,6 +571,16 @@ }); } }, + + accountId:{ + label:'Account', + isHidden:true, + dependsOn:'ispublic', + //docID:'helpAccountForDedication', + validation:{required:false} + + }, + localstorageenabled: { label: 'label.local.storage.enabled', isBoolean: true, @@ -1594,6 +1604,8 @@ if(args.data.zone.networkdomain != null && args.data.zone.networkdomain.length > 0) array1.push("&domain=" + todb(args.data.zone.networkdomain)); + + var dedicatedZoneid = null; $.ajax({ url: createURL("createZone" + array1.join("")), @@ -1605,6 +1617,33 @@ returnedZone: json.createzoneresponse.zone }) }); + + dedicatedZoneId = json.createzoneresponse.zone.id; + //EXPLICIT ZONE DEDICATION + if(args.data.pluginFrom == null && args.data.zone.ispublic == null){ + var array2 = []; + if(args.data.zone.accountId != "") + array2.push("&accountId=" +todb(args.data.zone.accountId)); + + if(dedicatedZoneId != null){ + $.ajax({ + url:createURL("dedicateZone&ZoneId=" +ZoneId +"&domain=" +args.data.zone.domain + array2.join("")), + dataType:"json", + success:function(json){ + var dedicatedObj = json.dedicatezoneresponse.zone; + //args.response.success({ data: $.extend(item, dedicatedObj)}); + + }, + + error:function(json){ + + args.response.error(parseXMLHttpResponse(XMLHttpResponse)); + } + }); + + } + } + }, error: function(XMLHttpResponse) { var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
