From 11dce4885506eb480c80a36d313f3b6b61983249 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 24 Jul 2013 11:50:35 -0700 Subject: [PATCH] CLOUDSTACK-3789: UI - specify type when making API calls. --- ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js | 1 + ui/scripts/accounts.js | 2 +- ui/scripts/globalSettings.js | 2 +- ui/scripts/network.js | 1 + ui/scripts/system.js | 11 ++++++++++- ui/scripts/zoneWizard.js | 4 +++- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js index 47eb7a100c1..2dea723ae9b 100644 --- a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js +++ b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js @@ -179,6 +179,7 @@ $.ajax({ url: createURL('addCiscoVnmcResource'), + type: "POST", data: data, success: function (json) { var item = json.addCiscoVnmcResource.CiscoVnmcResource; diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index e5faf33268b..bf0eaf4e432 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -1280,7 +1280,7 @@ $.ajax({ url: createURL('updateUser'), data: data, - async: true, + type: "POST", success: function(json) { args.response.success({ data: json.updateuserresponse.user diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js index c23c5f877e0..947a3b27966 100644 --- a/ui/scripts/globalSettings.js +++ b/ui/scripts/globalSettings.js @@ -316,7 +316,7 @@ $.ajax({ url: createURL("ldapConfig" + array.join("")), dataType: "json", - async: true, + type: "POST", success: function(json) { var items = json.ldapconfigresponse.ldapconfig; args.response.success({ diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 15d4b7fa877..d23dc626b1e 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -4088,6 +4088,7 @@ account: args.context.ipAddresses[0].account }), dataType: 'json', + type: "POST", success: function(data) { args.response.success({ _custom: { diff --git a/ui/scripts/system.js b/ui/scripts/system.js index e3392303bd7..108160eee5e 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -6061,6 +6061,7 @@ $.ajax({ url: createURL('addVmwareDc'), data: data, + type: "POST", success: function(json) { //var item = json.addvmwaredcresponse.vmwaredc; args.response.success(); @@ -11199,7 +11200,7 @@ $.ajax({ url: createURL("addCluster" + array1.join("")), dataType: "json", - async: true, + type: "POST", success: function(json) { var item = json.addclusterresponse.cluster[0]; clusterId = json.addclusterresponse.cluster[0].id; @@ -14198,6 +14199,7 @@ $.ajax({ url: createURL('addUcsManager'), data: data, + type: "POST", success: function(json) { //e.g. json == { "addUcsManagerResponse" : { "ucsmanager" : {"id":"11","name":"ucsmanager","url":"10.223.184.2","zoneid":"2"} } } var item = json.addUcsManagerResponse.ucsmanager; args.response.success({ @@ -15479,6 +15481,7 @@ username: args.data.username, password: args.data.password }, + type: "POST", success: function(json) { var jid = json.addexternaldhcpresponse.jobid; args.response.success({ @@ -15514,6 +15517,7 @@ username: args.data.username, password: args.data.password }, + type: "POST", success: function(json) { var jid = json.addexternaldhcpresponse.jobid; args.response.success({ @@ -15561,6 +15565,7 @@ password: args.data.password, tftpdir: args.data.tftpdir }, + type: "POST", success: function(json) { var jid = json.addexternalpxeresponse.jobid; args.response.success({ @@ -15597,6 +15602,7 @@ password: args.data.password, tftpdir: args.data.tftpdir }, + type: "POST", success: function(json) { var jid = json.addexternalpxeresponse.jobid; args.response.success({ @@ -15705,6 +15711,7 @@ $.ajax({ url: createURL(apiCmd + array1.join("")), dataType: "json", + type: "POST", success: function(json) { var jid = json[apiCmdRes].jobid; args.response.success({ @@ -15850,6 +15857,7 @@ $.ajax({ url: createURL(apiCmd + array1.join("")), dataType: "json", + type: "POST", success: function(json) { var jid = json[apiCmdRes].jobid; args.response.success({ @@ -15882,6 +15890,7 @@ $.ajax({ url: createURL(apiCmd + array1.join("")), dataType: "json", + type: "POST", success: function(json) { var jid = json[apiCmdRes].jobid; args.response.success({ diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 0af57a187be..67f67d9f37d 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -3271,6 +3271,7 @@ $.ajax({ url: createURL("addNetscalerLoadBalancer" + array1.join("")), + type: "POST", dataType: "json", success: function(json) { var addNetscalerLoadBalancerIntervalID = setInterval(function() { @@ -3808,6 +3809,7 @@ $.ajax({ url: createURL('addVmwareDc'), data: vmwareData, + type: "POST", success: function(json) { var item = json.addvmwaredcresponse.vmwaredc; if (item.id != null) { @@ -3846,7 +3848,7 @@ $.ajax({ url: createURL("addCluster" + array1.join("")), dataType: "json", - async: true, + type: "POST", success: function(json) { stepFns.addHost({ data: $.extend(args.data, {