Repository: ambari
Updated Branches:
  refs/heads/trunk a7a53896a -> bc3c23a23


AMBARI-19190 Remove UI logic to set or expect hive_server_interactive_host. 
(atkach)


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

Branch: refs/heads/trunk
Commit: c3669229ff0f6da6e8a96e239607a0782a5d2c75
Parents: a7a5389
Author: Andrii Tkach <atk...@apache.org>
Authored: Tue Dec 13 20:20:50 2016 +0200
Committer: Andrii Tkach <atk...@apache.org>
Committed: Wed Dec 14 12:24:46 2016 +0200

----------------------------------------------------------------------
 .../app/controllers/main/service/info/configs.js     | 15 ---------------
 .../wizard/step7/assign_master_controller.js         | 11 -----------
 ambari-web/app/models/configs/theme/config_action.js |  6 +-----
 .../wizard/step7/assign_master_controller_test.js    | 14 +-------------
 4 files changed, 2 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/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 94caf4a..b5538e0 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -607,21 +607,6 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
         
serviceConfig.get('configs').push(App.ServiceConfigProperty.create(hProperty));
       }
     }, this);
-
-    App.ConfigAction.find().forEach(function(item){
-      var hostComponentConfig = item.get('hostComponentConfig');
-      var config = serviceConfig.get('configs').filterProperty('filename', 
hostComponentConfig.fileName).findProperty('name', 
hostComponentConfig.configName);
-      if (config){
-        var componentHostName = 
App.HostComponent.find().findProperty('componentName', 
item.get('componentName')) ;
-        if (componentHostName) {
-          var setConfigValue = !config.get('value');
-          if (setConfigValue) {
-            config.set('value', componentHostName.get('hostName'));
-            config.set('recommendedValue', componentHostName.get('hostName'));
-          }
-        }
-      }
-    }, this);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js 
b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
index 1ee0c45..81c80e1 100644
--- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
+++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
@@ -399,19 +399,8 @@ App.AssignMasterOnStep7Controller = 
Em.Controller.extend(App.BlueprintMixin, App
         self.clearComponentsToBeDeleted(configActionComponent.componentName);
       }
 
-      var hostComponentConfig = 
context.get('config.configAction.hostComponentConfig');
-      var serviceConfigs = 
context.get('controller.stepConfigs').findProperty('serviceName', 
context.get('config.serviceName')).get('configs');
-      var config = serviceConfigs.filterProperty('filename', 
hostComponentConfig.fileName).findProperty('name', 
hostComponentConfig.configName);
-      var oldValue = config.get('value');
-      config.set('value', componentHostName);
-      config.set('recommendedValue', componentHostName);
       configActionComponent.hostName = componentHostName;
       self.get('configWidgetContext.config').set('configActionComponent', 
configActionComponent);
-      context.get('controller').loadConfigRecommendations([{
-        "type": App.config.getConfigTagFromFileName(config.get('filename')),
-        "name": config.get('name'),
-        "old_value": oldValue
-      }])
     });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/app/models/configs/theme/config_action.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/theme/config_action.js 
b/ambari-web/app/models/configs/theme/config_action.js
index 9ac4e7a..905fecb 100644
--- a/ambari-web/app/models/configs/theme/config_action.js
+++ b/ambari-web/app/models/configs/theme/config_action.js
@@ -63,11 +63,7 @@ App.ConfigAction.FIXTURES = [
     file_name: "hive-interactive-env.xml",
     if:'${hive-interactive-env/enable_hive_interactive}',
     then:'add',
-    else: 'delete',
-    host_component_config: {
-      configName: "hive_server_interactive_host",
-      fileName: "hive-interactive-env.xml"
-    }
+    else: 'delete'
   },
   {
     id: 2,

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js 
b/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
index 053b900..7705fb0 100644
--- a/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
+++ b/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
@@ -325,8 +325,7 @@ describe('App.AssignMasterOnStep7Controller', function () {
       mock = {
         saveMasterComponentHosts: Em.K,
         loadMasterComponentHosts: Em.K,
-        setDBProperty: Em.K,
-        loadConfigRecommendations: Em.K
+        setDBProperty: Em.K
       },
       config = Em.Object.create({
         filename: 'file1',
@@ -339,7 +338,6 @@ describe('App.AssignMasterOnStep7Controller', function () {
       sinon.stub(mock, 'saveMasterComponentHosts');
       sinon.stub(mock, 'loadMasterComponentHosts');
       sinon.stub(mock, 'setDBProperty');
-      sinon.stub(mock, 'loadConfigRecommendations');
       view.reopen({
         content: Em.Object.create({
           controllerName: 'ctrl1',
@@ -388,7 +386,6 @@ describe('App.AssignMasterOnStep7Controller', function () {
       mock.saveMasterComponentHosts.restore();
       mock.loadMasterComponentHosts.restore();
       mock.setDBProperty.restore();
-      mock.loadConfigRecommendations.restore();
     });
 
     it("saveMasterComponentHosts should be called", function() {
@@ -405,14 +402,5 @@ describe('App.AssignMasterOnStep7Controller', function () {
         hostName: 'host1'
       });
     });
-
-    it("config should be set", function() {
-      expect(config.get('value')).to.be.equal('host1');
-      expect(config.get('recommendedValue')).to.be.equal('host1');
-    });
-
-    it("config should be set (loadConfigRecommendations is called once)", 
function() {
-      expect(mock.loadConfigRecommendations.calledOnce).to.be.true;
-    });
   });
 });
\ No newline at end of file

Reply via email to