You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/10/27 12:02:26 UTC

[38/49] git commit: CS-16573: cloudstack UI - create volume - encode data passed to API call.

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

Branch: refs/heads/marvin-parallel
Commit: 9372171af1f1663e9d11f4e28474b327c417b43a
Parents: a96b27b
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Oct 22 16:19:48 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Wed Oct 24 14:50:46 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9372171a/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(