incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [13/22] git commit: CS-16573: cloudstack UI - create volume - encode data passed to API call.
Date Thu, 25 Oct 2012 08:17:54 GMT
CS-16573: cloudstack UI - create volume - encode data passed to API call.


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

Branch: refs/heads/marvin-parallel
Commit: c6a4670ae464941645b31c8f8b1ee52e6e939424
Parents: a25501a
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Mon Oct 22 16:19:48 2012 -0700
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Thu Oct 25 13:47:32 2012 +0530

----------------------------------------------------------------------
 ui/scripts/storage.js |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c6a4670a/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index fc8f528..b224abd 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -141,20 +141,22 @@
               },
 
               action: function(args) {
-                var array1 = [];
-                array1.push("&name=" + args.data.name);
-                array1.push("&zoneId=" + args.data.availabilityZone);
-                array1.push("&diskOfferingId=" + args.data.diskOffering);
-
+							  var data = {
+								  name: args.data.name,
+									zoneId: args.data.availabilityZone,
+									diskOfferingId: args.data.diskOffering
+								};
+							
                 // if(thisDialog.find("#size_container").css("display") != "none") { //wait
for Brian to include $form in args
                 if (selectedDiskOfferingObj.iscustomized == true) {
-                  array1.push("&size=" + args.data.diskSize);
+								  $.extend(data, {
+									  size: args.data.diskSize
+									});
                 }
 
                 $.ajax({
-                  url: createURL("createVolume" + array1.join("")),
-                  dataType: "json",
-                  async: true,
+                  url: createURL('createVolume'),
+                  data: data,                 
                   success: function(json) {
                     var jid = json.createvolumeresponse.jobid;
                     args.response.success(


Mime
View raw message