You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/08/12 13:21:05 UTC

[5/5] ambari git commit: Revert "AMBARI-12721. Assign Slaves and Clients. Table timings issue (onechiporenko)"

Revert "AMBARI-12721. Assign Slaves and Clients. Table timings issue (onechiporenko)"

This reverts commit 382294fca86facbf561362a410fc01c0b6c966b6.


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

Branch: refs/heads/branch-2.1.1
Commit: 1a7a02c4ae39c2a2ded55653352e7d39c5340f5c
Parents: bf809c1
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Aug 12 14:20:20 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Aug 12 14:20:20 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step6_controller.js  |  21 +-
 ambari-web/app/mixins/common/blueprint.js       |  10 +-
 ambari-web/app/templates/wizard/step6.hbs       |  36 +--
 ambari-web/app/utils/blueprint.js               | 219 +++++--------------
 ambari-web/app/views/wizard/step6_view.js       |  34 +--
 ambari-web/test/utils/blueprint_test.js         |  37 ++++
 ambari-web/test/views/wizard/step6_view_test.js |   9 +-
 7 files changed, 149 insertions(+), 217 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/app/controllers/wizard/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js
index 893ec24..6d77f89 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -519,6 +519,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
   callServerSideValidation: function (successCallback) {
     var self = this;
 
+    // We do not want to disable Next due to server validation issues - hence commented out line below
+    // self.set('submitDisabled', true);
+
     var selectedServices = App.StackService.find().filterProperty('isSelected').mapProperty('serviceName');
     var installedServices = App.StackService.find().filterProperty('isInstalled').mapProperty('serviceName');
     var services = installedServices.concat(selectedServices).uniq();
@@ -537,11 +540,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
       var invisibleMasters = [];
       if (this.get('isInstallerWizard')) {
         invisibleMasters = App.StackServiceComponent.find().filterProperty("isMaster").filterProperty("isShownOnInstallerAssignMasterPage", false).mapProperty("componentName");
+      } else if (this.get('isAddServiceWizard')) {
+        invisibleMasters = App.StackServiceComponent.find().filterProperty("isMaster").filterProperty("isShownOnAddServiceAssignMasterPage", false).mapProperty("componentName");
       }
-      else
-        if (this.get('isAddServiceWizard')) {
-          invisibleMasters = App.StackServiceComponent.find().filterProperty("isMaster").filterProperty("isShownOnAddServiceAssignMasterPage", false).mapProperty("componentName");
-        }
 
       var selectedClientComponents = self.get('content.clients').mapProperty('component_name');
       var alreadyInstalledClients = App.get('components.clients').reject(function (c) {
@@ -552,18 +553,16 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
 
       var invisibleBlueprint = blueprintUtils.filterByComponents(this.get('content.recommendations'), invisibleComponents);
       masterBlueprint = blueprintUtils.mergeBlueprints(masterBlueprint, invisibleBlueprint);
+    } else if (this.get('isAddHostWizard')) {
+      masterBlueprint = self.getCurrentMasterSlaveBlueprint();
+      hostNames = hostNames.concat(App.Host.find().mapProperty("hostName")).uniq();
+      slaveBlueprint = blueprintUtils.addComponentsToBlueprint(slaveBlueprint, invisibleSlavesAndClients);
     }
-    else
-      if (this.get('isAddHostWizard')) {
-        masterBlueprint = self.getCurrentMasterSlaveBlueprint();
-        hostNames = hostNames.concat(App.Host.find().mapProperty("hostName")).uniq();
-        slaveBlueprint = blueprintUtils.addComponentsToBlueprint(slaveBlueprint, invisibleSlavesAndClients);
-      }
 
     var bluePrintsForValidation = blueprintUtils.mergeBlueprints(masterBlueprint, slaveBlueprint);
     this.set('content.recommendationsHostGroups', bluePrintsForValidation);
 
-    return App.ajax.send({
+    App.ajax.send({
       name: 'config.validations',
       sender: self,
       data: {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/app/mixins/common/blueprint.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/blueprint.js b/ambari-web/app/mixins/common/blueprint.js
index 4889b3d..938fca9 100644
--- a/ambari-web/app/mixins/common/blueprint.js
+++ b/ambari-web/app/mixins/common/blueprint.js
@@ -53,16 +53,16 @@ App.BlueprintMixin = Em.Mixin.create({
   },
 
   /**
-   * Returns blueprint for all currently installed slave and client components
+   * returns blueprint for all currenlty installed slave and client components
    */
   getCurrentSlaveBlueprint: function () {
     var self = this;
     var fullBlueprint = self.getCurrentMasterSlaveBlueprint();
 
-    var components = App.StackServiceComponent.find().filter(function (c) {
-      return c.get('isSlave') || c.get('isClient');
-    }).mapProperty("componentName");
+    var slaveComponents = App.StackServiceComponent.find().filterProperty("isSlave").mapProperty("componentName");
+    var clientComponents = App.StackServiceComponent.find().filterProperty("isClient").mapProperty("componentName");
+    var slaveAndClientComponents = slaveComponents.concat(clientComponents);
 
-    return blueprintUtils.filterByComponents(fullBlueprint, components);
+    return blueprintUtils.filterByComponents(fullBlueprint, slaveAndClientComponents);
   }
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/app/templates/wizard/step6.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step6.hbs b/ambari-web/app/templates/wizard/step6.hbs
index 29ed76c..215dc2b 100644
--- a/ambari-web/app/templates/wizard/step6.hbs
+++ b/ambari-web/app/templates/wizard/step6.hbs
@@ -17,15 +17,15 @@
 }}
 
 <div id="step6">
-  <h2>{{t installer.step6.header}}</h2>
+  <h2>{{view.title}}</h2>
 
   <div class="alert alert-info">{{{view.label}}}</div>
   {{#if anyGeneralIssues}}
-    <div class="alert alert-error">
-      {{t installer.step6.validationSlavesAndClients.hasIssues}}
-      <a href="javascript:void(null);" {{action openSlavesAndClientsIssues target="controller"}}>{{t installer.step6.validationSlavesAndClients.click}}</a>
-      {{t installer.step6.validationSlavesAndClients.forDetails}}
-    </div>
+  <div class="alert alert-error">
+    {{t installer.step6.validationSlavesAndClients.hasIssues}}
+    <a href="javascript:void(null);" {{action openSlavesAndClientsIssues target="controller"}}>{{t installer.step6.validationSlavesAndClients.click}}</a>
+    {{t installer.step6.validationSlavesAndClients.forDetails}}
+  </div>
   {{/if}}
 
   <div class="pre-scrollable">
@@ -46,6 +46,7 @@
       </tr>
       </thead>
       <tbody>
+      {{#if view.pageContent}}
         {{#each host in view.pageContent}}
           <tr>
             {{#view App.WizardStep6HostView hostBinding="host" }}
@@ -63,19 +64,18 @@
               </td>
             {{/each}}
           </tr>
-          {{#if host.anyMessage}}
-            <tr>
-              <td {{bindAttr colspan="view.columnCount"}} class="no-borders">
-                {{#each errorMsg in host.errorMessages}}
-                    <div class="alert alert-error">{{errorMsg}}</div>
-                {{/each}}
-                {{#each warnMsg in host.warnMessages}}
-                  <div class="alert alert-warning">{{warnMsg}}</div>
-                {{/each}}
-              </td>
-            </tr>
-          {{/if}}
+          <tr {{bindAttr class="host.anyMessage::hidden"}}>
+            <td {{bindAttr colspan="view.columnCount"}} class="no-borders">
+              {{#each errorMsg in host.errorMessages}}
+                  <div class="alert alert-error">{{errorMsg}}</div>
+              {{/each}}
+              {{#each warnMsg in host.warnMessages}}
+                <div class="alert alert-warning">{{warnMsg}}</div>
+              {{/each}}
+            </td>
+          </tr>
         {{/each}}
+      {{/if}}
       </tbody>
     </table>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/app/utils/blueprint.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/blueprint.js b/ambari-web/app/utils/blueprint.js
index 687c7fd..6ccd86c 100644
--- a/ambari-web/app/utils/blueprint.js
+++ b/ambari-web/app/utils/blueprint.js
@@ -17,23 +17,17 @@
  */
 
 module.exports = {
-
   mergeBlueprints: function(masterBlueprint, slaveBlueprint) {
-    console.time('mergeBlueprints');
     var self = this;
 
     // Check edge cases
     if (!slaveBlueprint && !masterBlueprint) {
       throw 'slaveBlueprint or masterBlueprint should not be empty';
+    } else if (slaveBlueprint && !masterBlueprint) {
+      return slaveBlueprint;
+    } else if (!slaveBlueprint && masterBlueprint) {
+      return masterBlueprint;
     }
-    else
-      if (slaveBlueprint && !masterBlueprint) {
-        return slaveBlueprint;
-      }
-      else
-        if (!slaveBlueprint && masterBlueprint) {
-          return masterBlueprint;
-        }
 
     // Work with main case (both blueprint are presented)
     var matches = self.matchGroups(masterBlueprint, slaveBlueprint);
@@ -43,109 +37,53 @@ module.exports = {
       blueprint_cluster_binding: { host_groups: [] }
     };
 
-    var tmpObj = {hosts: [], components: []};
-    var masterBluePrintHostGroupsCluster = this.blueprintToObject(masterBlueprint, 'blueprint_cluster_binding.host_groups');
-    var slaveBluePrintHostGroupsCluster = this.blueprintToObject(slaveBlueprint, 'blueprint_cluster_binding.host_groups');
-    var masterBluePrintHostGroupsBlueprint = this.blueprintToObject(masterBlueprint, 'blueprint.host_groups');
-    var slaveBluePrintHostGroupsBlueprint = this.blueprintToObject(slaveBlueprint, 'blueprint.host_groups');
+    matches.forEach(function(match, i){
+      var group_name = 'host-group-' + (i+1);
 
-    matches.forEach(function (match, i) {
-      var group_name = 'host-group-' + (i + 1);
-
-      var masterComponents = match.g1 ? Em.getWithDefault(masterBluePrintHostGroupsBlueprint, match.g1, tmpObj).components : [];
-      var slaveComponents = match.g2 ? Em.getWithDefault(slaveBluePrintHostGroupsBlueprint, match.g2, tmpObj).components : [];
+      var masterComponents = self.getComponentsFromBlueprintByGroupName(masterBlueprint, match.g1);
+      var slaveComponents = self.getComponentsFromBlueprintByGroupName(slaveBlueprint, match.g2);
 
       res.blueprint.host_groups.push({
         name: group_name,
         components: masterComponents.concat(slaveComponents)
       });
 
-      var hosts = match.g1 ? Em.getWithDefault(masterBluePrintHostGroupsCluster, match.g1, tmpObj).hosts :
-        Em.getWithDefault(slaveBluePrintHostGroupsCluster, match.g2, tmpObj).hosts;
-
       res.blueprint_cluster_binding.host_groups.push({
         name: group_name,
-        hosts: hosts
+        hosts: self.getHostsFromBlueprintByGroupName(match.g1 ? masterBlueprint : slaveBlueprint, match.g1 ? match.g1 : match.g2)
       });
     });
-    console.timeEnd('mergeBlueprints');
     return res;
   },
 
-  /**
-   * Convert <code>blueprint</code>-object to the array with keys equal to the host-groups names
-   * Used to improve performance when user try to search value in the blueprint using host-group name as search-field
-   * Example:
-   *  Before:
-   *  <pre>
-   *    // blueprint
-   *    {
-   *      blueprint: {
-   *        host_groups: [
-   *          {
-   *            components: [{}, {}, ...],
-   *            name: 'n1'
-   *          },
-   *          {
-   *            components: [{}, {}, ...],
-   *            name: 'n2'
-   *          }
-   *        ]
-   *      },
-   *      blueprint_cluster_binding: {
-   *        host_groups: [
-   *          {
-   *            hosts: [{}, {}, ...],
-   *            name: 'n1'
-   *          },
-   *          {
-   *            hosts: [{}, {}, ...],
-   *            name: 'n2'
-   *          }
-   *        ]
-   *      }
-   *    }
-   *  </pre>
-   *  Return:
-   *  <pre>
-   *    // field = 'blueprint_cluster_binding.host_groups'
-   *    {
-   *      n1: {
-   *        hosts: [{}, {}, ...],
-   *        name: 'n1'
-   *      },
-   *      n2: {
-   *        hosts: [{}, {}, ...],
-   *        name: 'n2'
-   *      }
-   *    }
-   *
-   *    // field = 'blueprint.host_groups'
-   *    {
-   *      n1: {
-   *        components: [{}, {}, ...],
-   *        name: 'n1'
-   *      },
-   *      n2: {
-   *        components: [{}, {}, ...],
-   *        name: 'n2'
-   *      }
-   *    }
-   *  </pre>
-   * @param {object} blueprint
-   * @param {string} field
-   * @returns {object}
-   */
-  blueprintToObject: function(blueprint, field) {
-    var ret = {};
-    var valueToMap = Em.get(blueprint, field);
-    if (!Array.isArray(valueToMap)) {
-      return ret;
+  getHostsFromBlueprint: function(blueprint) {
+    return blueprint.blueprint_cluster_binding.host_groups.mapProperty("hosts").reduce(function(prev, curr){ return prev.concat(curr); }, []).mapProperty("fqdn");
+  },
+
+  getHostsFromBlueprintByGroupName: function(blueprint, groupName) {
+    if (groupName) {
+      var group = blueprint.blueprint_cluster_binding.host_groups.find(function(g) {
+        return g.name === groupName;
+      });
+
+      if (group) {
+        return group.hosts;
+      }
     }
-    valueToMap.forEach(function(n) {
-      ret[Em.get(n, 'name')] = n;
-    });
-    return ret;
+    return [];
+  },
+
+  getComponentsFromBlueprintByGroupName: function(blueprint, groupName) {
+    if (groupName) {
+      var group = blueprint.blueprint.host_groups.find(function(g) {
+        return g.name === groupName;
+      });
+
+      if (group) {
+        return group.components;
+      }
+    }
+    return [];
   },
 
   matchGroups: function(masterBlueprint, slaveBlueprint) {
@@ -165,7 +103,6 @@ module.exports = {
   },
 
   matchGroupsWithLeft: function(groups1, groups2, groups1_used, groups2_used, res, inverse) {
-    var gs2 = this.groupsToObject(groups2);
     for (var i = 0; i < groups1.length; i++) {
       if (groups1_used[i]) {
         continue;
@@ -174,10 +111,20 @@ module.exports = {
       var group1 = groups1[i];
       groups1_used[i] = true;
 
-      var group2 = gs2[group1.hosts.mapProperty('fqdn').join(',')];
-      if (group2) {
-        groups2_used[group2.index] = true;
-      }
+      var group2 = groups2.find(function(g2, index) {
+        if (group1.hosts.length != g2.hosts.length) {
+          return false;
+        }
+
+        for (var gi = 0; gi < group1.hosts.length; gi++) {
+          if (group1.hosts[gi].fqdn != g2.hosts[gi].fqdn) {
+            return false;
+          }
+        }
+
+        groups2_used[index] = true;
+        return true;
+      });
 
       var item = {};
 
@@ -186,8 +133,7 @@ module.exports = {
         if (group2) {
           item.g1 = group2.name;
         }
-      }
-      else {
+      } else {
         item.g1 = group1.name;
         if (group2) {
           item.g2 = group2.name;
@@ -195,69 +141,12 @@ module.exports = {
       }
       res.push(item);
     }
-
-    // remove unneeded property
-    groups2.forEach(function(group) {
-      delete group.index;
-    });
-  },
-
-  /**
-   * Convert array of objects to the one object to improve performance with searching objects in the provided array
-   * Example:
-   *  Before:
-   *  <pre>
-   *    // groups
-   *    [
-   *      {
-   *        hosts: [
-   *          {fqdn: 'h1'}, {fqdn: 'h2'}
-   *        ],
-   *        name: 'n1'
-   *      },
-   *      {
-   *        hosts: [
-   *          {fqdn: 'h3'}, {fqdn: 'h4'}
-   *        ]
-   *      }
-   *    ]
-   *  </pre>
-   *  Return:
-   *  <pre>
-   *    {
-   *      'h1,h2': {
-   *        hosts: [
-   *          {fqdn: 'h1'}, {fqdn: 'h2'}
-   *        ],
-   *        name: 'n1',
-   *        index: 0
-   *      },
-   *      'h3,h4': {
-   *        hosts: [
-   *          {fqdn: 'h3'}, {fqdn: 'h4'}
-   *        ],
-   *        name: 'n2',
-   *        index: 1
-   *      }
-   *    }
-   *  </pre>
-   * @param {{hosts: object[], name: string}[]} groups
-   * @returns {object}
-   */
-  groupsToObject: function (groups) {
-    var ret = {};
-    groups.forEach(function (group, index) {
-      var key = group.hosts.mapProperty('fqdn').join(',');
-      ret[key] = group;
-      ret[key].index = index;
-    });
-    return ret;
   },
 
   /**
    * Remove from blueprint all components expect given components
-   * @param {object} blueprint
-   * @param {string[]} components
+   * @param blueprint
+   * @param [string] components
    */
   filterByComponents: function(blueprint, components) {
     if (!blueprint) {
@@ -289,7 +178,7 @@ module.exports = {
   },
 
   addComponentsToBlueprint: function(blueprint, components) {
-    var res = JSON.parse(JSON.stringify(blueprint));
+    var res = JSON.parse(JSON.stringify(blueprint))
 
     res.blueprint.host_groups.forEach(function(group) {
       components.forEach(function(component) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/app/views/wizard/step6_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step6_view.js b/ambari-web/app/views/wizard/step6_view.js
index 379912e..2c590b0 100644
--- a/ambari-web/app/views/wizard/step6_view.js
+++ b/ambari-web/app/views/wizard/step6_view.js
@@ -23,8 +23,10 @@ App.WizardStep6View = App.TableView.extend({
 
   templateName: require('templates/wizard/step6'),
 
+  title: '',
+
   /**
-   * Number of visible rows
+   * Numbe rof visible rows
    * @type {string}
    */
   displayLength: "25",
@@ -46,12 +48,16 @@ App.WizardStep6View = App.TableView.extend({
   }.property('content'),
 
   /**
-   * Set <code>label</code> and do <code>loadStep</code>
+   * Set <code>label</code>, <code>title</code> and do <code>loadStep</code>
    * @method didInsertElement
    */
   didInsertElement: function () {
+    var controller = this.get('controller');
+    this.set('title', Em.I18n.t('installer.step6.header'));
     this.setLabel();
-    this.get('controller').loadStep();
+
+    App.tooltip($('body'), {selector: '[rel=tooltip]'});
+    controller.loadStep();
   },
 
   /**
@@ -89,14 +95,18 @@ App.WizardStep6View = App.TableView.extend({
 
   columnCount: function() {
     var hosts = this.get('controller.hosts');
-    return (hosts && hosts.length > 0) ? hosts[0].get('checkboxes').length + 1 : 1;
+    if  (hosts && hosts.length > 0) {
+      var checkboxes = hosts[0].get('checkboxes');
+      return checkboxes.length + 1;
+    }
+    return 1;
   }.property('controller.hosts.@each.checkboxes')
 });
 
 App.WizardStep6HostView = Em.View.extend({
 
   /**
-   * Bound <code>host</code> object
+   * Binded <code>host</code> object
    * @type {object}
    */
   host: null,
@@ -108,18 +118,16 @@ App.WizardStep6HostView = Em.View.extend({
    * @method didInsertElement
    */
   didInsertElement: function () {
+    var components = this.get('controller').getMasterComponentsForHost(this.get('host.hostName'));
+    components = components.map(function (_component) {
+      return App.format.role(_component);
+    });
+    components = components.join(" /\n");
     App.popover(this.$(), {
       title: Em.I18n.t('installer.step6.wizardStep6Host.title').format(this.get('host.hostName')),
-      content: this.get('controller').getMasterComponentsForHost(this.get('host.hostName')).map(function (_component) {
-        return App.format.role(_component);
-      }).join("<br />"),
+      content: components,
       placement: 'right',
       trigger: 'hover'
     });
-  },
-
-  willDestroyElement: function() {
-    this.$().popover('destroy');
   }
-
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/test/utils/blueprint_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/blueprint_test.js b/ambari-web/test/utils/blueprint_test.js
index 29072a3..cc6b932 100644
--- a/ambari-web/test/utils/blueprint_test.js
+++ b/ambari-web/test/utils/blueprint_test.js
@@ -95,6 +95,43 @@ describe('utils/blueprint', function() {
     }
   };
 
+  describe('#getHostsFromBlueprint', function() {
+    it('should extract all hosts from blueprint', function() {
+      expect(blueprintUtils.getHostsFromBlueprint(masterBlueprint)).to.deep.equal(["host1", "host2", "host3"]);
+    });
+  });
+
+  describe('#getHostsFromBlueprintByGroupName', function() {
+    it('should extract hosts from blueprint by given group name', function() {
+      expect(blueprintUtils.getHostsFromBlueprintByGroupName(masterBlueprint, "host-group-1")).to.deep.equal([
+        { fqdn: "host1" },
+        { fqdn: "host2" }
+      ]);
+    });
+
+    it('should return empty array if group with given name doesn\'t exist', function() {
+      expect(blueprintUtils.getHostsFromBlueprintByGroupName(masterBlueprint, "not an existing group")).to.deep.equal([]);
+    });
+  });
+
+  describe('#getComponentsFromBlueprintByGroupName', function() {
+    it('should extract all components from blueprint for given host', function() {
+      expect(blueprintUtils.getComponentsFromBlueprintByGroupName(masterBlueprint, "host-group-1")).to.deep.equal([
+        { name: "ZOOKEEPER_SERVER" },
+        { name: "NAMENODE" },
+        { name: "HBASE_MASTER" }
+      ]);
+    });
+
+    it('should return empty array if group doesn\'t exists', function() {
+      expect(blueprintUtils.getComponentsFromBlueprintByGroupName(masterBlueprint, "not an existing group")).to.deep.equal([]);
+    });
+
+    it('should return empty array if group name isn\'t valid', function() {
+      expect(blueprintUtils.getComponentsFromBlueprintByGroupName(masterBlueprint, undefined)).to.deep.equal([]);
+    });
+  });
+
   describe('#matchGroups', function() {
     it('should compose same host group into pairs', function() {
       expect(blueprintUtils.matchGroups(masterBlueprint, slaveBlueprint)).to.deep.equal([

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a7a02c4/ambari-web/test/views/wizard/step6_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/step6_view_test.js b/ambari-web/test/views/wizard/step6_view_test.js
index b905a2d..082d153 100644
--- a/ambari-web/test/views/wizard/step6_view_test.js
+++ b/ambari-web/test/views/wizard/step6_view_test.js
@@ -50,30 +50,29 @@ describe('App.WizardStep6View', function() {
   });
 
   describe('#didInsertElement', function() {
-
     beforeEach(function() {
       sinon.stub(view.get('controller'), 'loadStep', Em.K);
       sinon.stub(App, 'tooltip', Em.K);
       sinon.stub(view, 'setLabel', Em.K);
     });
-
     afterEach(function() {
       view.get('controller').loadStep.restore();
       App.tooltip.restore();
       view.setLabel.restore();
     });
-
     it('should call loadStep', function() {
       view.didInsertElement();
       expect(view.get('controller').loadStep.calledOnce).to.equal(true);
     });
-
+    it('should create tooltip', function() {
+      view.didInsertElement();
+      expect(App.tooltip.calledOnce).to.equal(true);
+    });
     it('should call setLabel if not controller.isMasters', function() {
       view.set('controller.isMasters', false);
       view.didInsertElement();
       expect(view.setLabel.calledOnce).to.equal(true);
     });
-
   });
 
   describe('#setLabel', function() {