Jelajahi Sumber

AMBARI-14288 Remove some unused code form UI. (ababiichuk)

aBabiichuk 9 tahun lalu
induk
melakukan
c7c7bcad19

+ 0 - 1
ambari-web/app/assets/test/tests.js

@@ -105,7 +105,6 @@ var files = [
   'test/controllers/login_controller_test',
   'test/controllers/experimental_test',
   'test/controllers/wizard_test',
-  'test/controllers/wizard/slave_component_groups_controller',
   'test/controllers/wizard/step0_test',
   'test/controllers/wizard/step2_test',
   'test/controllers/wizard/step3_test',

+ 0 - 3
ambari-web/app/controllers.js

@@ -61,7 +61,6 @@ require('controllers/main/admin/highAvailability/rangerAdmin/step3_controller');
 require('controllers/main/admin/highAvailability/rangerAdmin/step4_controller');
 require('controllers/main/admin/stack_and_upgrade_controller');
 require('controllers/main/admin/serviceAccounts_controller');
-require('controllers/main/admin/advanced');
 require('utils/polling');
 require('controllers/main/admin/kerberos');
 require('controllers/main/admin/kerberos/wizard_controller');
@@ -75,7 +74,6 @@ require('controllers/main/admin/kerberos/step5_controller');
 require('controllers/main/admin/kerberos/step6_controller');
 require('controllers/main/admin/kerberos/step7_controller');
 require('controllers/main/admin/kerberos/step8_controller');
-require('controllers/main/admin/authentication');
 require('controllers/main/alert_definitions_controller');
 require('controllers/main/alerts/alert_definitions_actions_controller');
 require('controllers/main/alerts/add_alert_definition/add_alert_definition_controller');
@@ -119,7 +117,6 @@ require('controllers/main/charts/heatmap');
 require('controllers/main/service/info/heatmap');
 require('controllers/main/views_controller');
 require('controllers/main/views/details_controller');
-require('controllers/wizard/slave_component_groups_controller');
 require('controllers/wizard/step0_controller');
 require('controllers/wizard/step1_controller');
 require('controllers/wizard/step2_controller');

+ 0 - 54
ambari-web/app/controllers/main/admin/advanced.js

@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminAdvancedController = Em.Controller.extend({
-  name:'mainAdminAdvancedController',
-  uninstall: function(event){
-    var params = event.context;
-    App.ModalPopup.show({
-      uninstallParams: params,
-      header: Em.I18n.t('admin.advanced.popup.header'),
-      bodyClass: App.MainAdminAdvancedPasswordView.reopen({}), // layout: Em.Handlebars.compile()
-      onPrimary: function(){
-        var form = this.getForm();
-        if(form) {
-          if(form.isValid()) {
-
-          }
-        }
-        this.onClose();
-      },
-      onSecondary: function(){
-        this.onClose();
-      },
-
-      getForm: function(){
-        var form = false;
-        $.each(this.get('_childViews'), function(){
-          if(this.get('path') == "bodyClass") {
-            return form = this.get('_childViews')[0];
-          }
-        });
-
-        return form;
-      }
-    })
-  }
-});

+ 0 - 42
ambari-web/app/controllers/main/admin/authentication.js

@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminAuthenticationController = Em.Controller.extend({
-  name:'mainAdminAuthenticationController',
-  /**
-   * save user form after editing
-   * @param event
-   */
-  save:function (event) {
-    var form = event.context;
-    if (form.isValid()) {
-      form.save();
-      App.ModalPopup.show({
-        header:Em.I18n.t('admin.authentication.form.testConfiguration'),
-        body:form.get('resultText'),
-        secondary:false,
-        onPrimary:function () {
-          this.hide();
-        }
-      });
-    }
-  },
-  content:App.Authentication.find(1)
-});

+ 0 - 6
ambari-web/app/controllers/main/service/info/configs.js

@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-require('controllers/wizard/slave_component_groups_controller');
 var batchUtils = require('utils/batch_scheduled_requests');
 var databaseUtils = require('utils/configs/database');
 
@@ -39,8 +38,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
 
   selectedConfigGroup: null,
 
-  selectedServiceNameTrigger: null,
-
   requestsInProgress: [],
 
   groupsStore: App.ServiceConfigGroup.find(),
@@ -494,9 +491,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
     }, this);
 
     var selectedService = this.get('stepConfigs').findProperty('serviceName', this.get('content.serviceName'));
-    if (this.get('selectedService.serviceName') != selectedService.get('serviceName')) {
-      this.propertyDidChange('selectedServiceNameTrigger');
-    }
     this.set('selectedService', selectedService);
     this.checkOverrideProperty(selectedService);
     if (!App.Service.find().someProperty('serviceName', 'RANGER')) {

+ 0 - 351
ambari-web/app/controllers/wizard/slave_component_groups_controller.js

@@ -1,351 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-var App = require('app');
-/**
- * Used to manage slave component config. User could create different settings for separate group
- * @type {*}
- */
-App.SlaveComponentGroupsController = Em.ArrayController.extend({
-
-  name: 'slaveComponentGroupsController',
-
-  contentBinding: 'App.router.wizardStep7Controller.slaveComponentHosts',
-
-  stepConfigsBinding: 'App.router.wizardStep7Controller.stepConfigs',
-
-  serviceBinding: 'App.router.wizardStep7Controller.selectedService',
-
-  servicesBinding: 'App.router.wizardStep7Controller.content.services',
-
-  clearStep: function () {
-
-  },
-
-  loadStep: function () {
-    this.clearStep();
-    this.loadGroups();
-  },
-
-  loadGroups: function () {
-
-    this.get('stepConfigs').forEach(function (_serviceConfig) {
-      var categoryConfig = _serviceConfig.get('configCategories');
-      if (categoryConfig.someProperty('isForSlaveComponent', true)) {
-        var slaveCategory = categoryConfig.findProperty('isForSlaveComponent', true);
-        // this.get('content') -> Output of Step 6: Mapping of each slave component and set of hosts it runs on
-        if (this.get('content')) {
-          if (this.get('content').someProperty('componentName', slaveCategory.get('primaryName'))) {
-            // component --> each column in Step 6 is a component ( slave component )
-            var component = this.get('content').findProperty('componentName', slaveCategory.get('primaryName'));
-            // slaveConfigs --> originally set as null in the class App.SlaveCategory in model/service_config.js
-            var slaveConfigs = slaveCategory.get('slaveConfigs');
-            
-            slaveCategory.set('slaveConfigs', App.SlaveConfigs.create(component));
-            var slaveGroups = [];
-            if (component.groups) {
-              component.groups.forEach(function (_group) {
-                slaveGroups.pushObject(_group);
-              }, this);
-              slaveCategory.set('slaveConfigs.groups', slaveGroups);
-            }
-            slaveCategory.set('slaveConfigs.componentName', component.componentName);
-            slaveCategory.set('slaveConfigs.displayName', component.displayName);
-            /*slaveCategory.set('slaveConfigs.groups.name', component.get('name'));
-             slaveCategory.set('slaveConfigs.groups.index', component.get('index'));
-             slaveCategory.set('slaveConfigs.groups.type', component.get('type'));
-             slaveCategory.set('slaveConfigs.groups.active', component.get('active'));*/
-            if (!slaveCategory.get('slaveConfigs.groups')) {
-              slaveCategory.set('slaveConfigs.groups', []);
-              var componentProperties = this.componentProperties(_serviceConfig.serviceName);
-              var defaultGroup = {name: 'Default', index: 'default', type: 'default', active: true, properties: componentProperties};
-              slaveCategory.get('slaveConfigs.groups').pushObject(App.Group.create(defaultGroup));
-            }
-          }
-        }
-      }
-    }, this);
-  },
-
-  // returns key-value pairs i.e. all fields for slave component for this specific service.
-  componentProperties: function (serviceName) {
-
-    var serviceConfigs = App.config.get('preDefinedServiceConfigs').findProperty('serviceName', serviceName);
-
-    var configs = [];
-    var componentName = null;
-    switch (serviceName) {
-      case 'HDFS':
-        componentName = 'DataNode';
-        break;
-      case 'HBASE':
-        componentName = 'RegionServer';
-    }
-    var slaveConfigs = serviceConfigs.configs.filterProperty('category', componentName);
-    slaveConfigs.forEach(function (_serviceConfigProperty) {
-      var serviceConfigProperty = App.ServiceConfigProperty.create(_serviceConfigProperty);
-
-      switch(serviceConfigProperty.name){
-        case 'dfs_data_dir' :
-          App.ConfigInitializer.initialValue(serviceConfigProperty);
-          break;
-        case 'mapred_local_dir' :
-          App.ConfigInitializer.initialValue(serviceConfigProperty);
-          break;
-      }
-      configs.pushObject(serviceConfigProperty);
-      serviceConfigProperty.validate();
-    }, this);
-    return configs;
-  },
-
-  selectedComponentName: function () {
-    switch (App.router.get('wizardStep7Controller.selectedService.serviceName')) {
-      case 'HDFS':
-        return { name: 'DATANODE',
-          displayName: 'DataNode'};
-      case 'HBASE':
-        return { name: 'HBASE_REGIONSERVER',
-          displayName: 'RegionServer'};
-      default:
-        return null;
-    }
-
-  }.property('service'),
-
-  selectedComponentDisplayName: Em.computed.formatRole('selectedComponentName'),
-
-  selectedSlaveComponent: function () {
-    var selectedComponentName = this.get('selectedComponentName') ? this.get('selectedComponentName').displayName : null;
-    var configs = null;
-    if (selectedComponentName) {
-      App.router.get('wizardStep7Controller.stepConfigs').forEach(function (_serviceConfig) {
-        var categoryConfig = _serviceConfig.get('configCategories');
-        if (categoryConfig.someProperty('name', selectedComponentName)) {
-          configs = categoryConfig.findProperty('name', selectedComponentName).get('slaveConfigs');
-        }
-      }, this);
-    }
-    return configs;
-  }.property('selectedComponentName', 'stepConfigs.@each.configCategories', 'stepConfigs.@each.configCategories.@each.slaveConfigs'),
-
-  hosts: Em.computed.alias('selectedSlaveComponent.hosts'),
-
-  groups: function () {
-    var hosts = this.get('hosts');
-    if(hosts){
-      return hosts.mapProperty('group').uniq();
-    }
-    return [];
-  }.property('hosts'),
-
-  componentGroups: function () {
-    var component = this.get('selectedSlaveComponent');
-    if (component && component.get('groups')) {
-      return component.get('groups');
-    }
-    return [];
-  }.property('selectedSlaveComponent', 'selectedSlaveComponent.groups', 'stepConfigs.@each.configCategories.@each.slaveConfigs.groups.@each.properties.@each.value'),
-
-
-  getGroupsForDropDown: Em.computed.mapBy('componentGroups', 'name'),
-
-  activeGroup: function () {
-    var componentGroups = this.get('componentGroups');
-    if (componentGroups) {
-      var active = componentGroups.findProperty('active', true);
-      if (active){
-        return active;
-      }
-    }
-    return null;
-  }.property('componentGroups.@each.active', 'componentGroups.@each.name', 'componentGroups.@each.properties.@each.value'),
-
-
-  /**
-   * Show slave hosts to groups popup
-   * @param event
-   */
-  showAddSlaveComponentGroup: function (event) {
-    var componentName = event.context;
-    var component = this.get('selectedSlaveComponent');
-    App.ModalPopup.show({
-      header: componentName + Em.I18n.t('installer.controls.slaveComponentGroups'),
-      bodyClass: Ember.View.extend({
-        controllerBinding: 'App.router.slaveComponentGroupsController',
-        header: Em.I18n.t('installer.slaveComponentHostsPopup.header').format(this.get('selectedComponentDisplayName')),
-        templateName: require('templates/wizard/slave_component_hosts_popup')
-      }),
-      onPrimary: function (event) {
-        if (component.tempSelectedGroups && component.tempSelectedGroups.length) {
-          component.tempSelectedGroups.forEach(function (item) {
-            var changed = component.get('hosts').filterProperty('hostName', item.hostName);
-            changed.setEach('group', item.groupName);
-          })
-        }
-        delete component.tempSelectedGroups;
-        this.hide();
-      },
-      onSecondary: function (event) {
-        delete component.tempSelectedGroups;
-        this.hide();
-      },
-      onClose: function (event) {
-        delete component.tempSelectedGroups;
-        this.hide();
-      }
-    });
-  },
-
-  /**
-   * Utility method. Save temporary info about changes in <code>slave hosts to groups</code> popup
-   * @param host
-   * @param groupName
-   */
-  changeHostGroup: function (host, groupName) {
-    var component = this.get('selectedSlaveComponent');
-    if (component.tempSelectedGroups === undefined) {
-      component.tempSelectedGroups = [];
-    }
-    var values = component.tempSelectedGroups.filterProperty('hostName', host.hostName);
-    if (values.length === 0)
-      component.tempSelectedGroups.pushObject({hostName: host.hostName, groupName: groupName});
-    else
-      values.setEach('groupName', groupName);
-
-  },
-
-  /**
-   * add new group to component(click on button)
-   */
-  addSlaveComponentGroup: function () {
-    var component = this.get('selectedSlaveComponent');
-    var newGroupName = 'New Group';
-    component.get('groups').setEach('active', false);
-    var newGroups = component.get('groups').filterProperty('name', newGroupName);
-    if (newGroups.length === 0){
-      component.newGroupIndex = 0;
-    }
-    else {
-      component.newGroupIndex = component.newGroupIndex || 0;
-      this.checkGroupName();
-      newGroupName = 'New Group ' + component.newGroupIndex;
-    }
-    var newGroup = {name: newGroupName, index: component.newGroupIndex, type: 'new', active: true, properties: this.componentProperties(App.router.get('wizardStep7Controller.selectedService.serviceName'))};
-    component.groups.pushObject(App.Group.create(newGroup));
-    $('.remove-group-error').hide();
-  },
-
-  checkGroupName: function () {
-    var component = this.get('selectedSlaveComponent');
-    component.newGroupIndex++;
-    var newGroupName = 'New Group ' + component.newGroupIndex;
-    var groups = component.get('groups').filterProperty('name', newGroupName);
-    if (groups.length !== 0) {
-      this.checkGroupName();
-    }
-  },
-
-  /**
-   * Onclick handler for <code>choose hosts for slave group</code> link
-   * @param event
-   */
-  showEditSlaveComponentGroups: function (event) {
-    this.showAddSlaveComponentGroup(event);
-  },
-
-  getHostsByGroup: function (group) {
-    var hosts = this.get('hosts');
-    if(hosts){
-      return hosts.filterProperty('group', group.name);
-    }
-    return [];
-  },
-
-  /**
-   * Change tab
-   * @param event
-   */
-  showSlaveComponentGroup: function (event) {
-    var component = this.get('selectedSlaveComponent');
-    if(!component.groups){
-
-    }
-    component.get('groups').setEach('active', false);
-    var group = component.get('groups').filterProperty('name', event.context.name);
-    group.setEach('active', true);
-    var assignedHosts = component.get('hosts').filterProperty('group', event.context.name);
-    if (assignedHosts.length === 0) {
-      $('.remove-group-error').hide();
-    }
-  },
-
-  /**
-   * Remove tab
-   * @param event
-   */
-  removeSlaveComponentGroup: function (event) {
-    var group = event.context;
-    var component = this.get('selectedSlaveComponent');
-    var assignedHosts = component.get('hosts').filterProperty('group', group.name);
-    if (assignedHosts.length !== 0) {
-      $('.remove-group-error').show();
-    } else {
-      $('.remove-group-error').hide();
-      var key = component.groups.indexOf(group);
-      component.groups.removeObject(component.groups[key]);
-
-      var newGroups = component.groups.filterProperty('type', 'new');
-      if (newGroups.length == 0)
-        component.newGroupIndex = 0;
-      else {
-        var lastNewGroup = newGroups[newGroups.length - 1];
-        component.newGroupIndex = lastNewGroup.index;
-      }
-      if (group.active) {
-        var lastGroup;
-        if (key === component.groups.length)
-          lastGroup = component.groups.slice(key - 1, key);
-        else lastGroup = component.groups.slice(key, key + 1);
-        lastGroup.setEach('active', true);
-      }
-    }
-  },
-
-  /**
-   * change group name of slave component
-   * @param group
-   * @param newGroupName
-   * @return {Boolean}
-   */
-  changeSlaveGroupName: function (group, newGroupName) {
-    var component = this.get('selectedSlaveComponent');
-    var isExist = component.get('groups').filterProperty('name', newGroupName);
-    if (isExist.length !== 0)
-      return true;
-    else {
-      var assignedHosts = component.get('hosts').filterProperty('group', group.name);
-      if (assignedHosts.length !== 0){
-        assignedHosts.setEach('group', newGroupName);
-      }
-      var groupFilter = component.get('groups').filterProperty('name', group.name);
-      groupFilter.setEach('name', newGroupName);
-    }
-    return false;
-  }
-
-});

+ 0 - 3
ambari-web/app/controllers/wizard/step7_controller.js

@@ -60,8 +60,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
 
   addMiscTabToPage: true,
 
-  selectedServiceNameTrigger: null,
-
   /**
    * Is Submit-click processing now
    * @type {bool}
@@ -1545,7 +1543,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
       {
         var service = errorServices[0];
         this.set('selectedService', service);
-        this.propertyDidChange('selectedServiceNameTrigger');
         $('a[href="#' + service.serviceName + '"]').tab('show');
       }
     }

+ 0 - 27
ambari-web/app/templates/main/admin/advanced.hbs

@@ -1,27 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<h5>{{t common.advanced}}<i class="icon-question-sign"></i></h5>
-<div class="row">
-  {{t admin.advanced.caution}}
-</div>
-<div class="row">
-  <button {{action uninstall target="App.router.mainAdminAdvancedController"}} class="btn"><i class="icon-trash"></i>&nbsp;{{t admin.advanced.button.uninstallIncludingData}}</button>
-  <br/>
-  <button {{action uninstall view.params target="App.router.mainAdminAdvancedController"}} class="btn"><i class="icon-trash"></i>&nbsp;{{t admin.advanced.button.uninstallKeepData}}</button>
-</div>

+ 0 - 19
ambari-web/app/templates/main/admin/advanced/uninstall.hbs

@@ -1,19 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-{{t admin.confirmUninstall}}

+ 0 - 35
ambari-web/app/templates/main/admin/audit.hbs

@@ -1,35 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<table class="table table-striped">
-  <thead>
-  <tr>
-    {{#each column in view.columns}}
-    {{view column}}
-    {{/each}}
-  </tr>
-  </thead>
-  <tbody>
-  {{#each row in view.rows}}
-  {{view row}}
-  {{/each}}
-  </tbody>
-</table>
-{{#if view.pager}}
-  {{view view.pager}}
-{{/if}}

+ 0 - 48
ambari-web/app/templates/main/admin/authentication.hbs

@@ -1,48 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-{{view App.FormFieldTemplate fieldBinding="view.form.field.method" id="user-auth-method"}}
-
-{{#if view.ldapChecked}}
-  {{view App.FormFieldTemplate fieldBinding="view.form.field.primaryServer"}}
-  {{view App.FormFieldTemplate fieldBinding="view.form.field.secondaryServer"}}
-  {{view App.FormFieldTemplate fieldBinding="view.form.field.useSsl"}}
-  {{view App.FormFieldTemplate fieldBinding="view.form.field.bindMethod"}}
-  {{#if view.useCredentials}}
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.bindUser"}}
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.password"}}
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.passwordRetype"}}
-  {{/if}}
-
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.searchBaseDn"}}
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.usernameAttribute"}}
-
-    <h5>{{t admin.authentication.form.configurationTest}}</h5>
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.userDN"}}
-    {{view App.FormFieldTemplate fieldBinding="view.form.field.userPassword"}}
-
-    <button {{action testConfiguration on="click" target="view.form" }} class="btn">{{t admin.authentication.form.testConfiguration}}</button>
-
-    {{#if view.form.testConfigurationMessage}}
-      <p {{bindAttr class="view.form.testConfigurationClass"}}>{{view.form.testConfigurationMessage}}</p>
-    {{/if}}
-{{/if}}
-<div style="margin:40px 0">
-  <button {{action updateValues target="view.form"}} class="btn">{{t form.cancel}}</button>
-  <button {{action save view.form target="App.router.mainAdminAuthenticationController"}} class="btn btn-primary">{{t form.save}}</button>
-</div>

+ 0 - 32
ambari-web/app/templates/wizard/slave_component_hosts.hbs

@@ -1,32 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-{{#if view.hasNoHosts}}
-{{t none}} -
-<a href="#" {{action showEditSlaveComponentGroups view.serviceConfig.category target="controller"}}>
-  {{t installer.slaveComponentHosts.selectHosts}}
-</a>
-{{else}}
-<a href="#" {{action showEditSlaveComponentGroups view.serviceConfig.category target="controller"}}>
-  {{#if view.hasMultipleHosts}}
-  {{view.hosts.firstObject.hostName}} {{t and}} {{view.otherLength}}
-  {{else}}
-  {{view.hosts.firstObject.hostName}}
-  {{/if}}
-</a>
-  {{/if}}

+ 0 - 49
ambari-web/app/templates/wizard/slave_component_hosts_popup.hbs

@@ -1,49 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<div id="slave-hosts-popup" class="alert alert-info">{{header}}</div>
-<table class="table table-striped">
-  <thead>
-    <tr>
-      <th>{{t common.host}}</th>
-      <th>{{t common.group}}</th>
-    </tr>
-  </thead>
-  <tbody>
-  {{#each host in hosts}}
-    <tr>
-      <td>
-        <label>{{host.hostName}}</label>
-      </td>
-      <td>
-        {{#view App.SlaveComponentDropDownGroupView contentBinding="host"}}
-        <select {{action changeGroup target="view" on="change"}}>
-          {{#each groupName in controller.getGroupsForDropDown}}
-            {{#view view.optionTag contentBinding="groupName"}}
-              <option value="{{unbound groupName}}" {{bindAttr selected="view.selected"}}>
-                {{groupName}}
-              </option>
-            {{/view}}
-          {{/each}}
-        </select>
-        {{/view}}
-      </td>
-    </tr>
-  {{/each}}
-  </tbody>
-</table>

+ 0 - 4
ambari-web/app/views.js

@@ -167,10 +167,6 @@ require('views/main/admin/stack_upgrade/versions_view');
 require('views/main/admin/stack_upgrade/menu_view');
 require('views/main/admin/stack_upgrade/failed_hosts_modal_view');
 require('views/main/admin/stack_and_upgrade_view');
-require('views/main/admin/advanced');
-require('views/main/admin/advanced/password');
-require('views/main/admin/audit');
-require('views/main/admin/authentication');
 
 require('views/main/admin/kerberos');
 require('views/main/admin/kerberos/disable_view');

+ 0 - 1
ambari-web/app/views/common/configs/service_config_tab_view.js

@@ -24,7 +24,6 @@ App.ServiceConfigTab = Em.View.extend({
 
   selectService: function (event) {
     this.set('controller.selectedService', event.context);
-    this.get('controller').propertyDidChange('selectedServiceNameTrigger');
   },
 
   didInsertElement: function () {

+ 1 - 1
ambari-web/app/views/common/configs/service_config_view.js

@@ -182,7 +182,7 @@ App.ServiceConfigView = Em.View.extend({
     }
     this.processTabs(tabs);
     return tabs;
-  }.property('controller.selectedServiceNameTrigger'),
+  }.property('controller.selectedService.serviceName', 'App.isClusterSupportsEnhancedConfigs'),
 
   /**
    * Set active tab when view attached and configs are linked to tabs.

+ 0 - 24
ambari-web/app/views/main/admin/advanced.js

@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminAdvancedView = Em.View.extend({
-  templateName: require('templates/main/admin/advanced'),
-  params: {keepData: 1}
-});

+ 0 - 27
ambari-web/app/views/main/admin/advanced/password.js

@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminAdvancedPasswordView = App.Form.extend({
-  fieldsOptions:[
-    { name:"password", displayName:Em.I18n.t('common.password'), displayType:"password", disableRequiredOnExistent:true },
-    { name:"passwordRetype", displayName:Em.I18n.t('form.passwordRetype'), displayType:"passwordRetype", disableRequiredOnExistent:true }
-  ],
-  fields: []
-});

+ 0 - 45
ambari-web/app/views/main/admin/audit.js

@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-require('views/common/grid');
-
-App.MainAdminAuditView = App.Grid.extend({
-  _collection: {className: App.ServiceAudit},
-  prepareColumns:function () {
-    this._super();
-
-    this.addColumn({
-      name:"date",
-      label:Em.I18n.t("admin.audit.grid.date")
-    });
-    this.addColumn({
-      name:"service.label",
-      label:Em.I18n.t("admin.audit.grid.service")
-    });
-    this.addColumn({
-      name:"operationName",
-      label:Em.I18n.t("admin.audit.grid.operationName")
-    });
-    this.addColumn({
-      name:"user.userName",
-      label:Em.I18n.t("admin.audit.grid.performedBy")
-    });
-  }
-});

+ 0 - 38
ambari-web/app/views/main/admin/authentication.js

@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminAuthenticationView = Em.View.extend({
-  templateName:require('templates/main/admin/authentication'),
-  form:App.AuthenticationForm.create({}),
-  pushAuthenticationToForm:function () {
-    var auth = App.Authentication.find(1);
-    App.router.set('mainAdminAuthenticationController.content', auth);
-    this.form.set('object', auth);
-  },
-  didInsertElement: function (){
-    this._super();
-    this.pushAuthenticationToForm();
-  },
-
-  ldapChecked: Em.computed.alias('form.field.method.value'),
-
-  useCredentials: Em.computed.alias('form.field.bindMethod.value')
-
-});

+ 0 - 667
ambari-web/test/controllers/wizard/slave_component_groups_controller.js

@@ -1,667 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var Ember = require('ember');
-var App = require('app');
-require('utils/helper');
-require('controllers/wizard/slave_component_groups_controller');
-
-var controller;
-describe('App.SlaveComponentGroupsController', function () {
-
-  beforeEach(function () {
-    controller = App.SlaveComponentGroupsController.create({
-      content: {},
-      selectedSlaveComponent: null
-    });
-  });
-
-  describe('#getHostsByGroup', function () {
-    it('should return empty array', function () {
-      controller.set('hosts', undefined);
-      expect(controller.getHostsByGroup()).to.eql([]);
-    });
-    it('should return g1 hosts', function () {
-      var hosts = Em.A([
-        Em.Object.create({
-          group: 'g1',
-          name: 'h1'
-        }),
-        Em.Object.create({
-          group: 'g2',
-          name: 'h2'
-        }),
-        Em.Object.create({
-          group: 'g1',
-          name: 'h3'
-        })
-      ]);
-      var group = {
-        name: 'g1'
-      };
-      var selectedSlaveComponent = Em.Object.create({
-        hosts: hosts
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      var expected = [
-        {
-          "group": "g1",
-          "name": "h1"
-        },
-        {
-          "group": "g1",
-          "name": "h3"
-        }
-      ];
- 
-      expect(JSON.parse(JSON.stringify(controller.getHostsByGroup(group)))).to.eql(expected);
-    });
-  });
-
-  describe('#changeSlaveGroupName', function () {
-    it('should return true if group is exist', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        groups: Em.A([
-          Em.Object.create({
-            name: 'g1'
-          })
-        ])
-      });
-      var group = {};
-      controller.set('selectedSlaveComponent',selectedSlaveComponent);
-      expect(controller.changeSlaveGroupName(group, 'g1')).to.be.true;
-    });
-    it('should return false if group is not exist', function () {
-      var hosts = Em.A([
-        Em.Object.create({
-          group: 'g1',
-          name: 'h1'
-        }),
-        Em.Object.create({
-          group: 'g2',
-          name: 'h2'
-        }),
-        Em.Object.create({
-          group: 'g1',
-          name: 'h3'
-        })
-      ]);
-      var selectedSlaveComponent = Em.Object.create({
-        hosts: hosts,
-        groups: Em.A([
-          Em.Object.create({
-            name: 'g1'
-          })
-        ])
-      });
-      var group = {
-        name: 'g2'
-      };
-      controller.set('selectedSlaveComponent',selectedSlaveComponent);
-      expect(controller.changeSlaveGroupName(group, 'g2')).to.be.false;
-    });
-  });
-
-  describe('#loadStep', function () {
-    beforeEach(function () {
-      sinon.stub(App.SlaveConfigs, 'create').returns(Em.Object.create({
-        groups: false,
-        componentName: '',
-        displayName: ''
-      }));
-      sinon.stub(App.config, 'get').returns(Em.A([
-        Em.Object.create({
-          category: 'HBASE',
-          serviceName: 'HBASE',
-          configs: Em.A([Em.Object.create({})])
-        })
-      ]));
-      sinon.stub(App.ServiceConfigProperty, 'create').returns(Em.Object.create({
-          name: 'dfs_data_dir',
-          initialValue: Em.K
-        })
-      );
-    });
-    afterEach(function () {
-      App.SlaveConfigs.create.restore();
-      App.ServiceConfigProperty.create.restore();
-      App.config.get.restore();
-    });
-    it('should add groups to stepConfgig', function () {
-      var stepConfigs = Em.A([
-        Em.Object.create({
-          serviceName: 'HBASE',
-          configCategories: Em.A([
-            Em.Object.create({
-              isForSlaveComponent: true,
-              primaryName: 'sl1',
-              slaveConfigs: Em.A([])
-            })
-          ])
-        })
-      ]);
-      var content = Em.A([
-        Em.Object.create({
-          componentName: 'sl1',
-          displayName: 'd1'
-        })
-      ]);
-      controller.set('content',content);
-      controller.set('stepConfigs',stepConfigs);
-      controller.loadStep();
-      var expected = [
-        {
-          "serviceName": "HBASE",
-          "configCategories": [
-            {
-              "isForSlaveComponent": true,
-              "primaryName": "sl1",
-              "slaveConfigs": {
-                "groups": [
-                  {
-                   "name": "Default",
-                   "index":
-                   "default",
-                   "type": "default",
-                   "active": true,
-                   "properties": []
-                  }
-                ],
-
-                "componentName": "sl1",
-                "displayName": "d1"
-              }
-            }
-          ]
-        }
-      ];
-      var result = JSON.parse(JSON.stringify(controller.get('stepConfigs')));
-      expect(result).to.be.eql(expected);
-    });
-  });
-
-  describe('#componentProperties', function () {
-    beforeEach(function () {
-      sinon.stub(App.config, 'get').returns(Em.A([
-        Em.Object.create({
-          category: 'RegionServer',
-          serviceName: 'HBASE',
-          configs: Em.A([
-            Em.Object.create({
-              category: 'RegionServer'
-            }),
-            Em.Object.create({
-              next: true,
-              category: 'RegionServer'
-            })
-          ])
-        })
-      ]));
-      sinon.stub(App.ServiceConfigProperty, 'create', function(value) {
-        if (value && value.next) {
-          return Em.Object.create({
-            name: 'dfs_data_dir',
-            initialValue: Em.K,
-            validate: Em.K
-          });
-        } else {
-          return Em.Object.create({
-            name: 'mapred_local_dir',
-            initialValue: Em.K,
-            validate: Em.K
-          });
-        }
-      });
-      sinon.stub(App.ConfigInitializer, 'initialValue', Em.K);
-    });
-    afterEach(function () {
-      App.ServiceConfigProperty.create.restore();
-      App.config.get.restore();
-      App.ConfigInitializer.initialValue.restore();
-    });
-    it('should return created config', function () {
-      var res = JSON.parse(JSON.stringify(controller.componentProperties('HBASE')));
-      var expected = [
-        {
-          "name": "mapred_local_dir"
-        },
-        {
-          "name": "dfs_data_dir"
-        }
-      ];
-      expect(res).to.be.eql(expected);
-    });
-  });
-
-  describe('#selectedComponentName', function () {
-    afterEach(function () {
-      App.router.get.restore();
-    });
-    it('should return selected component name HDFS', function () {
-      sinon.stub(App.router, 'get').returns('HDFS');
-      expect(controller.get('selectedComponentName')).to.be.eql({
-        name: 'DATANODE',
-        displayName: 'DataNode'
-      });
-    });
-    it('should return selected component name HBASE', function () {
-      sinon.stub(App.router, 'get').returns('HBASE');
-      expect(controller.get('selectedComponentName')).to.be.eql({
-        name: 'HBASE_REGIONSERVER',
-        displayName: 'RegionServer'
-      });
-    });
-    it('should return null', function () {
-      sinon.stub(App.router, 'get').returns('undefined');
-      expect(controller.get('selectedComponentName')).to.be.null;
-    });
-  });
-
-  describe('#removeSlaveComponentGroup', function () {
-    beforeEach(function() {
-      sinon.stub(controller, 'componentProperties').returns(Em.A([]));
-    });
-    afterEach(function() {
-      controller.componentProperties.restore();
-    });
-    it('should return empty selected component', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        hosts: Em.A([]),
-        groups: Em.A([
-          Em.Object.create({
-            active: true,
-            name: 'New Group',
-            type: 'new'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      var ev = Em.Object.create({
-        context: selectedSlaveComponent.groups[0]
-      });
-      controller.removeSlaveComponentGroup(ev);
-      var expected = {
-        "newGroupIndex": 0,
-        "hosts": [],
-        "groups": []
-      };
-
-      var res = JSON.parse(JSON.stringify(controller.get('selectedSlaveComponent')));
-      expect(res).to.be.eql(expected);
-    });
-  });
-
-  describe('#showSlaveComponentGroup', function () {
-    it('should make all groups active', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        hosts: Em.A([]),
-        groups: Em.A([
-          Em.Object.create({
-            active: false,
-            name: 'New Group',
-            type: 'new'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      var ev = Em.Object.create({
-        context: selectedSlaveComponent.groups[0]
-      });
-      controller.showSlaveComponentGroup(ev);
-      var expected = {
-        "newGroupIndex": 0,
-        "hosts": [],
-        "groups": [
-          {
-            "active": true,
-            "name": "New Group",
-            "type": "new"
-          }
-        ]
-      };
-
-      var res = JSON.parse(JSON.stringify(controller.get('selectedSlaveComponent')));
-      expect(res).to.be.eql(expected);
-    });
-  });
-
-  describe('#selectedComponentDisplayName', function () {
-    beforeEach(function () {
-      sinon.stub(App.format, 'role').returns('name')
-    });
-    afterEach(function () {
-      App.format.role.restore();
-    });
-    it('should return selected component name', function () {
-      expect(controller.get('selectedComponentDisplayName')).to.be.equal('name');
-    });
-  });
-
-  describe('#hosts', function () {
-    it('should return hosts', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        hosts: Em.A([{name: 'h1'}]),
-        groups: Em.A([
-          Em.Object.create({
-            active: false,
-            name: 'New Group',
-            type: 'new'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      expect(controller.get('hosts')).to.be.eql(Em.A([{name: 'h1'}]));
-    });
-  });
-
-  describe('#componentGroups', function () {
-    it('should return groups', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        hosts: Em.A([{name: 'h1', group: 'one'}, {name: 'h2', group: 'one'}]),
-        groups: Em.A([
-          Em.Object.create({
-            active: false,
-            name: 'New Group',
-            type: 'new'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      expect(controller.get('componentGroups')).to.be.eql(Em.A([
-        Em.Object.create({
-          active: false,
-          name: 'New Group',
-          type: 'new'
-        })
-      ]));
-    });
-  });
-
-  describe('#activeGroup', function () {
-    it('should return active group', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        hosts: Em.A([{name: 'h1', group: 'one'}, {name: 'h2', group: 'one'}]),
-        groups: Em.A([
-          Em.Object.create({
-            active: false,
-            name: 'New Group',
-            type: 'new'
-          }),
-          Em.Object.create({
-            active: true,
-            name: 'New Group',
-            type: 'new'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      expect(controller.get('activeGroup')).to.be.eql(Em.Object.create({
-        active: true,
-        name: 'New Group',
-        type: 'new'
-      }));
-    });
-  });
-
-  describe('#groups', function () {
-    it('should return uniq groups names', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        hosts: Em.A([{name: 'h1', group: 'one'}, {name: 'h2', group: 'one'}]),
-        groups: Em.A([
-          Em.Object.create({
-            active: false,
-            name: 'New Group',
-            type: 'new'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      expect(controller.get('groups')).to.be.eql(['one']);
-    });
-  });
-
-  describe('#addSlaveComponentGroup', function () {
-    beforeEach(function() {
-      sinon.stub(controller, 'componentProperties').returns(Em.A([]));
-    });
-    afterEach(function() {
-      controller.componentProperties.restore();
-    });
-    it('should return selected component name', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        newGroupIndex: 0,
-        groups: Em.A([
-          Em.Object.create({
-            active: true,
-            name: 'New Group'
-          })
-        ])
-      });
-      controller.set('selectedSlaveComponent', selectedSlaveComponent);
-      controller.addSlaveComponentGroup();
-      var expected = {
-        "newGroupIndex": 1,
-        "groups": [
-          {
-            "active": false,
-            "name": "New Group"
-          },
-          {
-            "name": "New Group 1",
-            "index": 1,
-            "type": "new",
-            "active": true,
-            "properties": []
-          }
-        ]
-      };
-
-      var res = JSON.parse(JSON.stringify(controller.get('selectedSlaveComponent')));
-      expect(res).to.be.eql(expected);
-    });
-  });
-
-  describe('#checkGroupName', function () {
-    it('should make equal to 2', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        groups: Em.A([
-          Em.Object.create({
-            name: 'New Group 1'
-          })
-        ]),
-        newGroupIndex: 0
-      });
-      var group = {};
-      controller.set('selectedSlaveComponent',selectedSlaveComponent);
-      controller.checkGroupName();
-      expect(controller.get('selectedSlaveComponent').newGroupIndex).to.be.equal(2);
-    });
-  });
-
-  describe('#changeHostGroup', function () {
-    it('should push 1 host group', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        tempSelectedGroups: undefined
-      });
-      var host = Em.Object.create({
-        hostName: 'h1'
-      });
-      controller.set('selectedSlaveComponent',selectedSlaveComponent);
-      controller.changeHostGroup(host, 'g1');
-      var expected = [
-        {
-          "hostName": "h1",
-          "groupName": "g1"
-        }
-      ];
-      var result = JSON.parse(JSON.stringify(controller.get('selectedSlaveComponent').tempSelectedGroups));
-      expect(result).to.be.eql(expected);
-    });
-    it('should push change host group name', function () {
-      var selectedSlaveComponent = Em.Object.create({
-        tempSelectedGroups: [
-          Em.Object.create({
-            hostName: 'h1',
-            groupName: ''
-          })
-        ]
-      });
-      var host = Em.Object.create({
-        hostName: 'h1'
-      });
-      controller.set('selectedSlaveComponent',selectedSlaveComponent);
-      controller.changeHostGroup(host, 'g1');
-      var expected = [
-        Em.Object.create({
-          "hostName": "h1",
-          "groupName": "g1"
-        })
-      ]
-      expect(controller.get('selectedSlaveComponent').tempSelectedGroups).to.be.eql(expected);
-    });
-  });
-
-  describe('#loadGroups', function () {
-    beforeEach(function () {
-      sinon.stub(App.SlaveConfigs, 'create').returns(Em.Object.create({
-        groups: false,
-        componentName: '',
-        displayName: ''
-      }));
-      sinon.stub(App.config, 'get').returns(Em.A([
-        Em.Object.create({
-          category: 'HDFS',
-          serviceName: 'HDFS',
-          configs: Em.A([])
-        })
-      ]));
-    });
-    afterEach(function () {
-      App.SlaveConfigs.create.restore();
-      App.config.get.restore();
-    });
-    it('should modefie step confgigs', function () {
-      var stepConfigs = Em.A([
-        Em.Object.create({
-          serviceName: 'HDFS',
-          configCategories: Em.A([
-            Em.Object.create({
-              isForSlaveComponent: true,
-              primaryName: 'sl1',
-              slaveConfigs: Em.A([])
-            })
-          ])
-        })
-      ]);
-      var content = Em.A([
-        Em.Object.create({
-          componentName: 'sl1',
-          displayName: 'd1',
-          groups: Em.A([
-            Em.Object.create({
-              name: 'g1'
-            })
-          ])
-        })
-      ]);
-      controller.set('content',content);
-      controller.set('stepConfigs',stepConfigs);
-      controller.loadGroups();
-      var expected = [
-        {
-          "serviceName": "HDFS",
-          "configCategories": [
-            {
-              "isForSlaveComponent": true,
-              "primaryName": "sl1",
-              "slaveConfigs": {
-                "groups": [
-                  {
-                    "name": "g1"
-                  }
-                ],
-                "componentName": "sl1",
-                "displayName": "d1"
-              }
-            }
-          ]
-        }
-      ];
-      var result = JSON.parse(JSON.stringify(controller.get('stepConfigs')));
-      expect(result).to.be.eql(expected);
-    });
-    it('should add groups to stepConfgig', function () {
-      var stepConfigs = Em.A([
-        Em.Object.create({
-          serviceName: 'HDFS',
-          configCategories: Em.A([
-            Em.Object.create({
-              isForSlaveComponent: true,
-              primaryName: 'sl1',
-              slaveConfigs: Em.A([])
-            })
-          ])
-        })
-      ]);
-      var content = Em.A([
-        Em.Object.create({
-          componentName: 'sl1',
-          displayName: 'd1'
-        })
-      ]);
-      controller.set('content',content);
-      controller.set('stepConfigs',stepConfigs);
-      controller.loadGroups();
-      var expected = [
-        {
-          "serviceName": "HDFS",
-          "configCategories": [
-            {
-              "isForSlaveComponent": true,
-              "primaryName": "sl1",
-              "slaveConfigs": {
-                "groups": [
-                  {
-                   "name": "Default",
-                   "index":
-                   "default",
-                   "type": "default",
-                   "active": true,
-                   "properties": []
-                  }
-                ],
-
-                "componentName": "sl1",
-                "displayName": "d1"
-              }
-            }
-          ]
-        }
-      ];
-      var result = JSON.parse(JSON.stringify(controller.get('stepConfigs')))
-      expect(result).to.be.eql(expected);
-    });
-  });
-
-});

+ 0 - 8
ambari-web/test/controllers/wizard/step7_test.js

@@ -1483,12 +1483,6 @@ describe('App.InstallerStep7Controller', function () {
   });
 
   describe('#toggleIssuesFilter', function () {
-    beforeEach(function () {
-      sinon.stub(installerStep7Controller, 'propertyDidChange', Em.K);
-    });
-    afterEach(function () {
-      installerStep7Controller.propertyDidChange.restore();
-    });
     it('should toggle issues filter', function () {
       var issuesFilter = installerStep7Controller.get('filterColumns').findProperty('attributeName', 'hasIssues');
       issuesFilter.set('selected', false);
@@ -1519,8 +1513,6 @@ describe('App.InstallerStep7Controller', function () {
         errorCount: 1,
         configGroups: []
       });
-      expect(installerStep7Controller.propertyDidChange.calledOnce).to.be.true;
-      expect(installerStep7Controller.propertyDidChange.calledWith('selectedServiceNameTrigger')).to.be.true;
     });
   });