cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/UI-explicitDedication to a1cd244
Date Fri, 24 May 2013 12:06:46 GMT
Updated Branches:
  refs/heads/UI-explicitDedication 336baebfa -> a1cd244a1


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/a1cd244a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a1cd244a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a1cd244a

Branch: refs/heads/UI-explicitDedication
Commit: a1cd244a12aea264387a268556bfda25f8189ee2
Parents: 336baeb
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Fri May 24 17:35:48 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Fri May 24 17:35:48 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/a1cd244a/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 119e8f6..2f667a2 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8037,12 +8037,14 @@
                 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("")),
                   dataType: "json",
                   success: function(json) {
                     var item = json.createpodresponse.pod;
+                    podId = json.createpodresponse.pod.id;
+
                    /* args.response.success({
 										  data:item
 										});
@@ -8064,8 +8066,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
+                          });
 
                          },
 
@@ -8919,12 +8930,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/a1cd244a/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index f2e1a66..8fbb3ad 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1605,7 +1605,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("")),
@@ -1627,10 +1627,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)});
 
                          },


Mime
View raw message