Repository: ambari
Updated Branches:
  refs/heads/trunk af0debf52 -> 54e22bc94


AMBARI-11091. unable to see complete non-master node name at step 6 (Assign 
Slaves and Clients) if more than 23 characters. (jaimin)


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

Branch: refs/heads/trunk
Commit: 54e22bc941f74d1fac9e07b052079a77c5dd53db
Parents: af0debf
Author: Jaimin Jetly <[email protected]>
Authored: Tue May 12 17:52:03 2015 -0700
Committer: Jaimin Jetly <[email protected]>
Committed: Tue May 12 17:52:09 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/views/wizard/step6_view.js       | 22 +++++++++-----------
 ambari-web/test/views/wizard/step6_view_test.js |  4 ++--
 2 files changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/54e22bc9/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 4efea53..2c590b0 100644
--- a/ambari-web/app/views/wizard/step6_view.js
+++ b/ambari-web/app/views/wizard/step6_view.js
@@ -119,17 +119,15 @@ App.WizardStep6HostView = Em.View.extend({
    */
   didInsertElement: function () {
     var components = 
this.get('controller').getMasterComponentsForHost(this.get('host.hostName'));
-    if (components && components.length > 0) {
-      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: components,
-        placement: 'right',
-        trigger: 'hover'
-      });
-    }
+    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: components,
+      placement: 'right',
+      trigger: 'hover'
+    });
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/54e22bc9/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 81628d8..082d153 100644
--- a/ambari-web/test/views/wizard/step6_view_test.js
+++ b/ambari-web/test/views/wizard/step6_view_test.js
@@ -136,11 +136,11 @@ describe('App.WizardStep6HostView', function() {
       expect(App.popover.calledOnce).to.equal(true);
       view.get('controller').getMasterComponentsForHost.restore();
     });
-    it('shouldn\'t create popover if controller.getMasterComponentsForHost 
returns empty array', function() {
+    it('should create popover even if controller.getMasterComponentsForHost is 
an empty array', function() {
       sinon.stub(view.get('controller'), 'getMasterComponentsForHost', 
function() {return [];});
       view.set('controller.isMasters', true);
       view.didInsertElement();
-      expect(App.popover.called).to.equal(false);
+      expect(App.popover.calledOnce).to.equal(true);
       view.get('controller').getMasterComponentsForHost.restore();
     });
   });

Reply via email to