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/4.4-forward to 6482554
Date Tue, 10 Jun 2014 21:28:44 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward ed330d4dc -> 64825549d


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

Branch: refs/heads/4.4-forward
Commit: 64825549d2eb4e6c55b9cc2730e0ac895473f901
Parents: ed330d4
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:28:31 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64825549/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;
 


Mime
View raw message