You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/05/31 06:35:58 UTC
[08/25] git commit: updated refs/heads/master to 2f29185
explicit dedication API-UI integration
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1553ec65
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1553ec65
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1553ec65
Branch: refs/heads/master
Commit: 1553ec65808656e261df1bfc382f52cf09c7a7b4
Parents: 5c18ba6
Author: Pranav Saxena <pr...@citrix.com>
Authored: Fri May 24 17:35:48 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Thu May 30 21:57:11 2013 +0530
----------------------------------------------------------------------
ui/scripts/system.js | 21 ++++++++++++++++-----
ui/scripts/zoneWizard.js | 6 +++---
2 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1553ec65/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f76b534..f85e20f 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8571,13 +8571,15 @@
var endip = args.data.reservedSystemEndIp; //optional
if (endip != null && endip.length > 0)
array1.push("&endIp=" + todb(endip));
-
+ var podId = null;
$.ajax({
url: createURL("createPod" + array1.join("")),
data: appendData,
dataType: "json",
success: function(json) {
var item = json.createpodresponse.pod;
+ podId = json.createpodresponse.pod.id;
+
/* args.response.success({
data:item
});
@@ -8599,8 +8601,17 @@
url:createURL("dedicatePod&podId=" +podId +"&domainId=" +args.data.domainId + array2.join("")),
dataType:"json",
success:function(json){
- var dedicatedObj = json.dedicatepodresponse.pod;
- args.response.success({ data: $.extend(item, dedicatedObj)});
+ var jid = json.dedicatepodresponse.jobid;
+ args.response.success({
+ _custom:
+ { jobId: jid
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ },
+
+ data:item
+ });
},
@@ -9454,12 +9465,12 @@
array2.push("&accountId=" +todb(args.data.accountId));
}
- if(hostId != null){
+ if(clusterId != null){
$.ajax({
url:createURL("dedicateCluster&clusterId=" +clusterId +"&domainId=" +args.data.domainId + array2.join("")),
dataType:"json",
success:function(json){
- var dedicatedObj = json.dedicateclusterresponse.cluster;
+ var jid = json.dedicateclusterresponse.jobid;
args.response.success({ data: $.extend(item, dedicatedObj , {state:'Enabled'}) });
},
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1553ec65/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 917f9ca..5a8bcfd 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1604,7 +1604,7 @@
if(args.data.zone.networkdomain != null && args.data.zone.networkdomain.length > 0)
array1.push("&domain=" + todb(args.data.zone.networkdomain));
- var dedicatedZoneid = null;
+ var dedicatedZoneId = null;
$.ajax({
url: createURL("createZone" + array1.join("")),
@@ -1626,10 +1626,10 @@
if(dedicatedZoneId != null){
$.ajax({
- url:createURL("dedicateZone&ZoneId=" +ZoneId +"&domain=" +args.data.zone.domain + array2.join("")),
+ url:createURL("dedicateZone&ZoneId=" +dedicatedZoneId +"&domain=" +args.data.zone.domain + array2.join("")),
dataType:"json",
success:function(json){
- var dedicatedObj = json.dedicatezoneresponse.zone;
+ var dedicatedObj = json.dedicatezoneresponse.jobid;
//args.response.success({ data: $.extend(item, dedicatedObj)});
},