You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/07/28 16:04:27 UTC

[15/50] git commit: updated refs/heads/4.4 to d5220a8

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

(cherry picked from commit 64825549d2eb4e6c55b9cc2730e0ac895473f901)


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

Branch: refs/heads/4.4
Commit: a3e85292ba75d103c1cbe1217446e28cd7c0af58
Parents: dfb4d90
Author: Jessica Wang <je...@apache.org>
Authored: Tue Jun 10 14:26:58 2014 -0700
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Jul 28 16:02:29 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3e85292/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 3823109..6a4aa42 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -2848,8 +2848,10 @@
                                             inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilityvalue'] = 'internal';
                                             serviceCapabilityIndex++;
                                         } 
-                                    } else if (value != '') { // Normal data
-                                        inputData[key] = value;
+                                    } 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;
+                                        }                                        
                                     }
                                 });
 
@@ -2929,10 +2931,7 @@
                                     inputData['serviceProviderList[' + serviceProviderIndex + '].provider'] = value;
                                     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 {
@@ -2947,8 +2946,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;