cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 9334f26
Date Tue, 10 Jun 2014 21:29:33 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master b85dd956f -> 9334f2608


CLOUDSTACK-6889: UI - create network offering - remove non-needed parameters from API call
whose size might exceed limit in some cases.


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

Branch: refs/heads/master
Commit: 9334f26084070dbd36fde97057a372b9d5517a91
Parents: b85dd95
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Jun 10 14:26:58 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Jun 10 14:29:19 2014 -0700

----------------------------------------------------------------------
 ui/scripts/configuration.js | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9334f260/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index e76e8d4..2c5fadf 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -2926,9 +2926,11 @@
                                             inputData['servicecapabilitylist[' + serviceCapabilityIndex
+ '].capabilityvalue'] = 'internal';
                                             serviceCapabilityIndex++;
                                         } 
-                                    } else if (value != '') { // Normal data
+                                    } else if (value != '') { // normal data (serviceData.length
==1), e.g. "name", "displayText", "networkRate", "guestIpType", "lbType" (unwanted), "availability"
(unwated when value is "Optional"), "egresspolicy", "state" (unwanted), "status" (unwanted),
"allocationstate" (unwanted) 
+                                        if (!(key ==  "lbType"  || (key == "availability"
&& value == "Optional") || key == "state" || key == "status" || key == "allocationstate"))
{
                                         inputData[key] = value;
                                     }
+                                    }
                                 });
 
                                 for (var key1 in inputData) {
@@ -3008,9 +3010,6 @@
                                     serviceProviderIndex++;
                                 });
 
-                                if (args.$form.find('.form-item[rel=availability]').css("display")
== "none")
-                                    inputData['availability'] = 'Optional';
-
                                 if (args.$form.find('.form-item[rel=egresspolicy]').is(':visible'))
{
                                     inputData['egressdefaultpolicy'] = formData.egresspolicy
=== 'ALLOW' ? true : false;
                                 } else {
@@ -3025,8 +3024,7 @@
                                 $.ajax({
                                     url: createURL('createNetworkOffering'),
                                     data: inputData,
-                                    dataType: 'json',
-                                    async: true,
+                                    type: "POST", //use POST instead of GET since the API
call might be overlong and exceed size limit
                                     success: function(data) {
                                         var item = data.createnetworkofferingresponse.networkoffering;
 


Mime
View raw message