ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject [1/2] ambari git commit: AMBARI-11374. After Adding A New Service dfs.namenode.checkpoint.dir Is Removed (alexantonenko)
Date Mon, 25 May 2015 19:01:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 043357d8d -> 46b159a2d


AMBARI-11374. After Adding A New Service dfs.namenode.checkpoint.dir Is Removed (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 46b159a2d81973d12363943f518ba74b66ebc529
Parents: c035bda
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Mon May 25 21:32:58 2015 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Mon May 25 21:50:02 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/info/configs.js |  4 +---
 ambari-web/app/controllers/wizard/step7_controller.js   |  4 +---
 ambari-web/test/controllers/wizard/step7_test.js        | 12 ++++++------
 3 files changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/46b159a2/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 7207e1c..5e49ae8 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -830,9 +830,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         if (App.get('isHaEnabled')) {
           var c = serviceConfig.configs,
             removedConfigs = c.filterProperty('category', 'SECONDARY_NAMENODE');
-          removedConfigs.map(function (config) {
-            c = c.without(config);
-          });
+          removedConfigs.setEach('isVisible', false);
           serviceConfig.configs = c;
         }
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/46b159a2/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 59bcc63..b8771e5 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -754,9 +754,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
App.E
         var c = serviceConfigs.findProperty('serviceName', 'HDFS').configs,
           nameServiceId = c.findProperty('name', 'dfs.nameservices'),
           removedConfigs = c.filterProperty('category', 'SECONDARY_NAMENODE');
-        removedConfigs.map(function (config) {
-          c = c.without(config);
-        });
+        removedConfigs.setEach('isVisible', false);
         serviceConfigs.findProperty('serviceName', 'HDFS').configs = c;
 
         if(this.get('selectedServiceNames').contains('HBASE') && nameServiceId){

http://git-wip-us.apache.org/repos/asf/ambari/blob/46b159a2/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index 7eeaa82..acd3fbf 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -1254,11 +1254,11 @@ describe('App.InstallerStep7Controller', function () {
         Em.Object.create({
           serviceName: 'HDFS',
           configs: [
-            {category: 'SECONDARY_NAMENODE'},
-            {category: 'SECONDARY_NAMENODE'},
-            {category: 'NameNode'},
-            {category: 'NameNode'},
-            {category: 'SECONDARY_NAMENODE'}
+            Em.Object.create({category: 'SECONDARY_NAMENODE'}),
+            Em.Object.create({category: 'SECONDARY_NAMENODE'}),
+            Em.Object.create({category: 'NameNode'}),
+            Em.Object.create({category: 'NameNode'}),
+            Em.Object.create({category: 'SECONDARY_NAMENODE'})
           ]
         }),
         Em.Object.create({serviceName: 's2'})]
@@ -1271,7 +1271,7 @@ describe('App.InstallerStep7Controller', function () {
       installerStep7Controller.setStepConfigs([], []);
       expect(installerStep7Controller.get('stepConfigs').everyProperty('showConfig', true)).to.equal(true);
       expect(installerStep7Controller.get('stepConfigs').findProperty('serviceName', 'HDFS').get('selected')).to.equal(true);
-      expect(installerStep7Controller.get('stepConfigs').findProperty('serviceName', 'HDFS').get('configs').length).to.equal(2);
+      expect(installerStep7Controller.get('stepConfigs').findProperty('serviceName', 'HDFS').get('configs').length).to.equal(5);
       App.get.restore();
     });
 


Mime
View raw message