incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-3760. Provide config-group support in add-host wizard (alexantonenko)
Date Sun, 17 Nov 2013 22:28:46 GMT
Updated Branches:
  refs/heads/trunk fcd566217 -> b8f64b4ca


AMBARI-3760. Provide config-group support in add-host wizard (alexantonenko)


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

Branch: refs/heads/trunk
Commit: b8f64b4cadec1216daed6066b605161305dde6c0
Parents: fcd5662
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Sun Nov 17 19:31:36 2013 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Sun Nov 17 19:31:36 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers.js                   |   1 +
 .../main/host/addHost/step4_controller.js       |  65 ++++++++++++
 .../app/controllers/main/host/add_controller.js | 106 ++++++++++++++++++-
 ambari-web/app/messages.js                      |   5 +
 ambari-web/app/routes/add_host_routes.js        |  81 ++++++++++----
 ambari-web/app/templates/main/host/add.hbs      |  11 +-
 .../app/templates/main/host/addHost/step4.hbs   |  51 +++++++++
 ambari-web/app/utils/ajax.js                    |  17 +++
 ambari-web/app/views.js                         |   1 +
 .../app/views/main/host/addHost/step4_view.js   |  31 ++++++
 ambari-web/app/views/main/host/add_view.js      |   4 +
 11 files changed, 343 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 37610be..48196d0 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -77,6 +77,7 @@ require('controllers/main/host');
 require('controllers/main/host/details');
 require('controllers/main/host/configs_service');
 require('controllers/main/host/add_controller');
+require('controllers/main/host/addHost/step4_controller');
 require('controllers/main/charts');
 require('controllers/main/charts/heatmap_metrics/heatmap_metric');
 require('controllers/main/charts/heatmap_metrics/heatmap_metric_processrun');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/controllers/main/host/addHost/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/addHost/step4_controller.js b/ambari-web/app/controllers/main/host/addHost/step4_controller.js
new file mode 100644
index 0000000..90efb12
--- /dev/null
+++ b/ambari-web/app/controllers/main/host/addHost/step4_controller.js
@@ -0,0 +1,65 @@
+/**
+ * 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.AddHostStep4Controller= Em.Controller.extend({
+
+  name:"addHostStep4Controller",
+
+  serviceConfigGroups: null,
+  isConfigGroupLoaded: false,
+
+  loadConfigGroups: function () {
+    App.ajax.send({
+      name: 'config_groups.all_fields',
+      sender: this,
+      success: 'successLoadingConfigGroup'
+    });
+  },
+
+  successLoadingConfigGroup: function (data) {
+    App.router.get('addHostController.content').set('configGroups',data.items);
+    this.set('isConfigGroupLoaded', true);
+  },
+
+  configGroupsLoading: function () {
+    var df = $.Deferred();
+    if (this.get('isConfigGroupLoaded')) {
+      df.resolve();
+    } else {
+      this.interval = setInterval(function () {
+        if (this.get('isConfigGroupLoaded')) {
+          df.resolve();
+          clearInterval(this.interval);
+        }
+      }.bind(this), 55);
+    }
+    return df.promise();
+  }
+
+
+
+
+
+
+
+
+
+})
+

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/controllers/main/host/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/add_controller.js b/ambari-web/app/controllers/main/host/add_controller.js
index 58a453e..8251781 100644
--- a/ambari-web/app/controllers/main/host/add_controller.js
+++ b/ambari-web/app/controllers/main/host/add_controller.js
@@ -23,7 +23,7 @@ App.AddHostController = App.WizardController.extend({
 
   name: 'addHostController',
 
-  totalSteps: 6,
+  totalSteps: 7,
 
   /**
    * Used for hiding back button in wizard
@@ -39,6 +39,8 @@ App.AddHostController = App.WizardController.extend({
    * hostsInfo - list of selected hosts
    * slaveComponentHosts, hostSlaveComponents - info about slave hosts
    * masterComponentHosts - info about master hosts
+   * serviceConfigGroups - info about selected config group for service
+   * configGroups - all config groups
    * config??? - to be described later
    */
   content: Em.Object.create({
@@ -50,7 +52,9 @@ App.AddHostController = App.WizardController.extend({
     masterComponentHosts: null,
     serviceConfigProperties: null,
     advancedServiceConfig: null,
-    controllerName: 'addHostController'
+    controllerName: 'addHostController',
+    serviceConfigGroups: null,
+    configGroups: null
   }),
 
   components:require('data/service_components'),
@@ -294,15 +298,111 @@ App.AddHostController = App.WizardController.extend({
   },
 
   /**
+   *  Apply config groups from step4 Configurations
+   */
+  applyConfigGroup: function () {
+    var serviceConfigGroups = this.get('content.serviceConfigGroups');
+    serviceConfigGroups.forEach(function (group){
+      if(group.selectedConfigGroup != "Default") {
+        var configGroup = group.configGroups.findProperty('ConfigGroup.group_name', group.selectedConfigGroup);
+        group.hosts.forEach(function(host){
+          configGroup.ConfigGroup.hosts.push({
+            host_name: host
+          });
+        },this);
+        delete configGroup.href;
+        App.ajax.send({
+          name: 'config_groups.update_config_group',
+          sender: this,
+          data: {
+            id: configGroup.ConfigGroup.id,
+            configGroup: configGroup
+          }
+        });
+      }
+    },this);
+  },
+
+  /**
+   * Load information about selected config groups
+   */
+  getServiceConfigGroups: function () {
+    var serviceConfigGroups = this.getDBProperty('serviceConfigGroups');
+    this.set('content.serviceConfigGroups', serviceConfigGroups);
+  },
+
+  /**
+   * Save information about selected config groups
+   */
+  saveServiceConfigGroups: function () {
+    this.setDBProperty('serviceConfigGroups', this.get('content.serviceConfigGroups'));
+    this.set('content.serviceConfigGroups', this.get('content.serviceConfigGroups'));
+  },
+
+  /**
+   * Set content.serviceConfigGroups for step4
+   */
+  loadServiceConfigGroups: function () {
+    var slaveComponentHosts = this.get('content.slaveComponentHosts');
+    var selectedServices = [];
+    var selectedClientHosts = slaveComponentHosts.findProperty('componentName','CLIENT').hosts.mapProperty('hostName');
+
+    slaveComponentHosts.forEach(function (slave){
+      if(slave.hosts.length > 0){
+        if(slave.componentName != "CLIENT"){
+          var service = App.HostComponent.find().findProperty('componentName', slave.componentName).get('service');
+          var configGroups = this.get('content.configGroups').filterProperty('ConfigGroup.tag',
service.get('id'));
+          var configGroupsNames = configGroups.mapProperty('ConfigGroup.group_name')
+          configGroupsNames.push('Default');
+          selectedServices.push({
+            serviceId : service.get('id'),
+            displayName : service.get('displayName'),
+            hosts : slave.hosts.mapProperty('hostName'),
+            configGroupsNames : configGroupsNames,
+            configGroups : configGroups,
+            selectedConfigGroup: "Default"
+          });
+        }
+      }
+    },this);
+    if(selectedClientHosts.length > 0){
+      this.loadClients();
+      var clients = this.get('content.clients');
+      clients.forEach(function (client) {
+        var service = App.HostComponent.find().findProperty('componentName', client.component_name).get('service');
+        var serviceMatch = selectedServices.findProperty('serviceId',service.get('id'));
+        if(serviceMatch){
+          serviceMatch.hosts = serviceMatch.hosts.concat(selectedClientHosts).uniq();
+        }else{
+          var configGroups = this.get('content.configGroups').filterProperty('ConfigGroup.tag',
service.get('id'));
+          var configGroupsNames = configGroups.mapProperty('ConfigGroup.group_name')
+          configGroupsNames.push('Default');
+          selectedServices.push({
+            serviceId : service.get('id'),
+            displayName : service.get('displayName'),
+            hosts : selectedClientHosts,
+            configGroupsNames : configGroupsNames,
+            configGroups : configGroups,
+            selectedConfigGroup: "Default"
+          });
+        }
+      },this);
+    }
+    this.set('content.serviceConfigGroups', selectedServices);
+  },
+
+  /**
    * Load data for all steps until <code>current step</code>
    */
   loadAllPriorSteps: function () {
     var step = this.get('currentStep');
     switch (step) {
+      case '7':
       case '6':
       case '5':
-      case '4':
         this.loadServiceConfigProperties();
+        this.getServiceConfigGroups();
+      case '4':
       case '3':
         this.loadClients();
         this.loadServices();

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index eb7da3d..21457df 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -158,6 +158,7 @@ Em.I18n.translations = {
   'common.change': 'Change',
   'common.overrides': 'Overrides',
   'common.properties': 'properties',
+  'common.conf.group': 'Configuration Group',
 
   'requestInfo.installComponents':'Install Components',
   'requestInfo.installServices':'Install Services',
@@ -575,6 +576,10 @@ Em.I18n.translations = {
   'installer.step10.startStatus.started':'All services started',
   'installer.step10.installTime.seconds':'Install and start completed in {0} seconds',
   'installer.step10.installTime.minutes':'Install and start completed in {0} minutes and
{1} seconds',
+
+  'addHost.step4.header':'Configurations',
+  'addHost.step4.title':'Select the configuration groups to which the added hosts will belong
to.',
+
   
   'installer.stackUpgrade.header':'Stack Upgrade Wizard',
   'installer.stackUpgrade.step1.newVersion':'New Version',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/routes/add_host_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_host_routes.js b/ambari-web/app/routes/add_host_routes.js
index 026882a..4505624 100644
--- a/ambari-web/app/routes/add_host_routes.js
+++ b/ambari-web/app/routes/add_host_routes.js
@@ -72,11 +72,6 @@ module.exports = Em.Route.extend({
 
   },
 
-  /*connectOutlets: function (router, context) {
-    console.log('in /hosts/add:connectOutlets');
-    router.get('mainController').connectOutlet('addHost');
-  },*/
-
   step1: Em.Route.extend({
     route: '/step1',
     connectOutlets: function (router) {
@@ -184,7 +179,11 @@ module.exports = Em.Route.extend({
         wizardStep7Controller.set('content', addHostController.get('content'));
         wizardStep7Controller.loadStep();
         addHostController.saveServiceConfigProperties(wizardStep7Controller);
-        router.transitionTo('step4');
+        if(App.supports.hostOverrides){
+          router.transitionTo('step4');
+        }else{
+          router.transitionTo('step5');
+        }
       }
     }
   }),
@@ -194,9 +193,37 @@ module.exports = Em.Route.extend({
     connectOutlets: function (router, context) {
       console.log('in addHost.step4:connectOutlets');
       var controller = router.get('addHostController');
+      var addHostStep4Controller = router.get('addHostStep4Controller');
       controller.setCurrentStep('4');
+      addHostStep4Controller.loadConfigGroups();
+      addHostStep4Controller.configGroupsLoading().done(function () {
+        controller.dataLoading().done(function () {
+          controller.loadAllPriorSteps();
+          controller.loadServiceConfigGroups();
+          addHostStep4Controller.set('wizardController', controller);
+          controller.connectOutlet('addHostStep4', controller.get('content'));
+        })
+      })
+    },
+    back: function(router){
+        router.transitionTo('step3');
+    },
+    next: function (router) {
+      var addHostController = router.get('addHostController');
+      addHostController.saveServiceConfigGroups();
+      router.transitionTo('step5');
+    }
+  }),
+
+  step5: Em.Route.extend({
+    route: '/step5',
+    connectOutlets: function (router, context) {
+      console.log('in addHost.step5:connectOutlets');
+      var controller = router.get('addHostController');
+      controller.setCurrentStep('5');
       controller.dataLoading().done(function () {
         controller.loadAllPriorSteps();
+        controller.getServiceConfigGroups();
         var wizardStep8Controller = router.get('wizardStep8Controller');
         wizardStep8Controller.set('wizardController', controller);
         controller.connectOutlet('wizardStep8', controller.get('content'));
@@ -204,7 +231,11 @@ module.exports = Em.Route.extend({
     },
     back: function(router){
       if(!router.get('wizardStep8Controller.isBackBtnDisabled')) {
-        router.transitionTo('step3');
+        if(App.supports.hostOverrides){
+          router.transitionTo('step4');
+        }else{
+          router.transitionTo('step3');
+        }
       }
     },
     next: function (router) {
@@ -212,31 +243,33 @@ module.exports = Em.Route.extend({
       var wizardStep8Controller = router.get('wizardStep8Controller');
       addHostController.installServices();
       addHostController.setInfoForStep9();
-
       // We need to do recovery based on whether we are in Add Host or Installer wizard
       addHostController.saveClusterState('ADD_HOSTS_INSTALLING_3');
       wizardStep8Controller.set('servicesInstalled', true);
-      router.transitionTo('step5');
+      if(App.supports.hostOverrides){
+        addHostController.applyConfigGroup();
+      }
+      router.transitionTo('step6');
     }
   }),
 
-  step5: Em.Route.extend({
-    route: '/step5',
+  step6: Em.Route.extend({
+    route: '/step6',
     connectOutlets: function (router, context) {
-      console.log('in addHost.step5:connectOutlets');
+      console.log('in addHost.step6:connectOutlets');
       var controller = router.get('addHostController');
-      controller.setCurrentStep('5');
+      controller.setCurrentStep('6');
       controller.dataLoading().done(function () {
         var wizardStep9Controller = router.get('wizardStep9Controller');
         wizardStep9Controller.set('wizardController', controller);
         controller.loadAllPriorSteps();
         if (!App.testMode) {              //if test mode is ON don't disable prior steps
link.
-          controller.setLowerStepsDisable(5);
+          controller.setLowerStepsDisable(6);
         }
         controller.connectOutlet('wizardStep9', controller.get('content'));
       })
     },
-    back: Em.Router.transitionTo('step4'),
+    back: Em.Router.transitionTo('step5'),
     retry: function(router,context) {
       var addHostController = router.get('addHostController');
       var wizardStep9Controller = router.get('wizardStep9Controller');
@@ -264,28 +297,28 @@ module.exports = Em.Route.extend({
       // We need to do recovery based on whether we are in Add Host or Installer wizard
       addHostController.saveClusterState('ADD_HOSTS_INSTALLED_4');
 
-      router.transitionTo('step6');
+      router.transitionTo('step7');
     }
   }),
 
-  step6: Em.Route.extend({
-    route: '/step6',
+  step7: Em.Route.extend({
+    route: '/step7',
     connectOutlets: function (router, context) {
-      console.log('in addHost.step6:connectOutlets');
+      console.log('in addHost.step7:connectOutlets');
       var controller = router.get('addHostController');
-      controller.setCurrentStep('6');
+      controller.setCurrentStep('7');
       controller.dataLoading().done(function () {
         controller.loadAllPriorSteps();
         var wizardStep10Controller = router.get('wizardStep10Controller');
         wizardStep10Controller.set('wizardController', controller);
         if (!App.testMode) {              //if test mode is ON don't disable prior steps
link.
-          controller.setLowerStepsDisable(6);
+          controller.setLowerStepsDisable(7);
         }
         controller.connectOutlet('wizardStep10', controller.get('content'));
         router.get('updateController').set('isWorking', true);
       })
     },
-    back: Em.Router.transitionTo('step5'),
+    back: Em.Router.transitionTo('step6'),
     complete: function (router, context) {
       var addHostController = router.get('addHostController');
       var hostsUrl = '/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/cpu_count,Hosts/total_mem,'
+
@@ -320,7 +353,9 @@ module.exports = Em.Route.extend({
 
   gotoStep5: Em.Router.transitionTo('step5'),
 
-  gotoStep6: Em.Router.transitionTo('step6')
+  gotoStep6: Em.Router.transitionTo('step6'),
+
+  gotoStep7: Em.Router.transitionTo('step7')
 
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/templates/main/host/add.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/add.hbs b/ambari-web/app/templates/main/host/add.hbs
index becbd19..b0930f4 100644
--- a/ambari-web/app/templates/main/host/add.hbs
+++ b/ambari-web/app/templates/main/host/add.hbs
@@ -20,7 +20,7 @@
   <div class="container">
     <div class="container-fluid">
 
-      <!--<a class="btn back" {{action backToHostsList}}>← Back to Hosts</a>-->
+      <!--<a class="btn back" {{action backToHostsList}}>\u2190 Back to Hosts</a>-->
 
       <div class="row-fluid">
         <div class="span3">
@@ -31,9 +31,12 @@
               <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep1 target="controller"}}>{{t installer.step2.header}}</a></li>
               <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep2 target="controller"}}>{{t installer.step3.header}}</a></li>
               <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep3 target="controller"}}>{{t installer.step6.header}}</a></li>
-              <li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep4 target="controller"}}>{{t installer.step8.header}}</a></li>
-              <li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep5 target="controller"}}>{{t installer.step9.header}}</a></li>
-              <li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep6 target="controller"}}>{{t installer.step10.header}}</a></li>
+              {{#if App.supports.hostOverrides}}
+                <li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep4 target="controller"}}>{{t addHost.step4.header}}</a></li>
+              {{/if}}
+              <li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep5 target="controller"}}>{{t installer.step8.header}}</a></li>
+              <li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep6 target="controller"}}>{{t installer.step9.header}}</a></li>
+              <li {{bindAttr class="isStep7:active view.isStep7Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep7 target="controller"}}>{{t installer.step10.header}}</a></li>
             </ul>
           </div>
         </div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/templates/main/host/addHost/step4.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/addHost/step4.hbs b/ambari-web/app/templates/main/host/addHost/step4.hbs
new file mode 100644
index 0000000..c87549dc
--- /dev/null
+++ b/ambari-web/app/templates/main/host/addHost/step4.hbs
@@ -0,0 +1,51 @@
+{{!
+* 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>
+  <h2>{{t addHost.step4.header}}</h2>
+  <div class="alert alert-info">
+    {{t addHost.step4.title}}
+  </div>
+  <div class="pre-scrollable">
+      <table class="table">
+        <thead>
+          <tr>
+            <th>{{t common.service}}</th>
+            <th>{{t common.conf.group}}</th>
+          </tr>
+        </thead>
+        <tbody>
+          {{#each service in controller.content.serviceConfigGroups}}
+            <tr>
+              <td>{{service.displayName}}</td>
+              <td>
+                {{
+                  view Ember.Select
+                  contentBinding="service.configGroupsNames"
+                  selectionBinding="service.selectedConfigGroup"
+                }}
+              </td>
+            </tr>
+          {{/each}}
+        </tbody>
+      </table>
+  </div>
+   <div class="btn-area">
+      <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
+      <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+    </div>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 992b25c..5896888 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -213,6 +213,23 @@ var urls = {
       };
     }
   },
+  'config_groups.all_fields': {
+    'real': '/clusters/{clusterName}/config_groups?fields=*'
+  },
+  'config_groups.update_config_group': {
+    'real': '/clusters/{clusterName}/config_groups/{id}',
+    'mock': '',
+    'type': 'PUT',
+    'format': function (data) {
+      return {
+        data: JSON.stringify(
+          [
+            data.configGroup
+          ]
+        )
+      }
+    }
+  },
   'config.on_site': {
     'real': '/clusters/{clusterName}/configurations?{params}',
     'mock': '/data/configurations/cluster_level_configs.json?{params}',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 2e53b86..550fcfe 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -52,6 +52,7 @@ require('views/main/host/metrics/load');
 require('views/main/host/metrics/memory');
 require('views/main/host/metrics/network');
 require('views/main/host/metrics/processes');
+require('views/main/host/addHost/step4_view');
 require('views/main/admin');
 require('views/main/admin/highAvailability_view');
 require('views/main/admin/highAvailability/wizard_view');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/views/main/host/addHost/step4_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/addHost/step4_view.js b/ambari-web/app/views/main/host/addHost/step4_view.js
new file mode 100644
index 0000000..68bce18
--- /dev/null
+++ b/ambari-web/app/views/main/host/addHost/step4_view.js
@@ -0,0 +1,31 @@
+/**
+ * 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.AddHostStep4View = Em.View.extend({
+
+  templateName: require('templates/main/host/addHost/step4'),
+
+
+  didInsertElement: function() {
+
+  }
+
+});

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b8f64b4c/ambari-web/app/views/main/host/add_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/add_view.js b/ambari-web/app/views/main/host/add_view.js
index 8464f61..d8c532d 100644
--- a/ambari-web/app/views/main/host/add_view.js
+++ b/ambari-web/app/views/main/host/add_view.js
@@ -47,6 +47,10 @@ App.AddHostView = Em.View.extend({
     return this.isStepDisabled(6);
   }.property('controller.isStepDisabled.@each.value').cacheable(),
 
+  isStep7Disabled: function () {
+    return this.isStepDisabled(7);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
  isStepDisabled: function (index) {
     return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
   }


Mime
View raw message