ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject git commit: AMBARI-8086. UI adds multiple m to params *heapsize, *permsize, etc. (xiwang)
Date Sat, 01 Nov 2014 00:33:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 974ade37e -> f3fe2eb21


AMBARI-8086. UI adds multiple m to params *heapsize, *permsize, etc. (xiwang)


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

Branch: refs/heads/trunk
Commit: f3fe2eb2168378a555d441e7b248adfba621fd8f
Parents: 974ade3
Author: Xi Wang <xiwang@apache.org>
Authored: Fri Oct 31 15:07:05 2014 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Fri Oct 31 17:32:25 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/info/configs.js |  3 ++-
 ambari-web/app/controllers/wizard/step8_controller.js   |  2 +-
 .../test/controllers/main/service/info/config_test.js   | 12 +++++++++++-
 3 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f3fe2eb2/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index fa823fd..ec1c086 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -2113,7 +2113,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     siteObj.forEach(function (_siteObj) {
       var value = _siteObj.value;
       if (_siteObj.isRequiredByAgent == false) return;
-      if (heapsizeRegExp.test(_siteObj.name) && !heapsizeException.contains(_siteObj.name))
{
+      // site object name follow the format *permsize/*heapsize and the value NOT ends with
"m"
+      if (heapsizeRegExp.test(_siteObj.name) && !heapsizeException.contains(_siteObj.name)
&& !(_siteObj.value).endsWith("m")) {
         value += "m";
       }
       siteProperties[_siteObj.name] = value;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3fe2eb2/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 7cfaf8f..4f37625 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1668,7 +1668,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
{
         // do not pass any globals whose name ends with _host or _hosts
         if (_configProperty.isRequiredByAgent !== false) {
           // append "m" to JVM memory options except for heapsizeExtensions
-          if (/_heapsize|_newsize|_maxnewsize|_permsize|_maxpermsize$/.test(_configProperty.name)
&& !heapsizeExceptions.contains(_configProperty.name)) {
+          if (/_heapsize|_newsize|_maxnewsize|_permsize|_maxpermsize$/.test(_configProperty.name)
&& !heapsizeExceptions.contains(_configProperty.name) && !(_configProperty.value).endsWith("m"))
{
             properties[_configProperty.name] = _configProperty.value + "m";
           } else {
             properties[_configProperty.name] = _configProperty.value;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3fe2eb2/ambari-web/test/controllers/main/service/info/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/info/config_test.js b/ambari-web/test/controllers/main/service/info/config_test.js
index d2aee1a..1d7ceed 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ b/ambari-web/test/controllers/main/service/info/config_test.js
@@ -442,6 +442,14 @@ describe("App.MainServiceInfoConfigsController", function () {
           {
             name: "property2",
             value: "value2&lt;"
+          },
+          {
+            name: "property_heapsize",
+            value: "value3"
+          },
+          {
+            name: "property_permsize",
+            value: "value4m"
           }
         ]),
         result: {
@@ -449,7 +457,9 @@ describe("App.MainServiceInfoConfigsController", function () {
           "tag": "version1",
           "properties": {
             "property1": "value1",
-            "property2": "value2&lt;"
+            "property2": "value2&lt;",
+            "property_heapsize": "value3m",
+            "property_permsize": "value4m"
           }
         },
         m: "default"


Mime
View raw message