This is an automated email from the ASF dual-hosted git repository. atkach pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new d356ab5 AMBARI-24311 Host and Alerts page style fixes d356ab5 is described below commit d356ab5377a654e0d24d4c95080afd13aa39e542 Author: Andrii Tkach <atk...@apache.org> AuthorDate: Thu Jul 19 16:39:30 2018 +0300 AMBARI-24311 Host and Alerts page style fixes --- ambari-web/app/models/host_component.js | 4 +- ambari-web/app/styles/alerts.less | 6 ++- ambari-web/app/styles/hosts.less | 7 ++++ ambari-web/test/models/host_component_test.js | 59 +-------------------------- 4 files changed, 15 insertions(+), 61 deletions(-) diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js index 9de0301..40db612 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -37,9 +37,9 @@ App.HostComponent = DS.Model.extend({ serviceDisplayName: Em.computed.truncate('service.displayName', 14, 11), - getDisplayName: Em.computed.truncate('displayName', 19, 16), + getDisplayName: Em.computed.truncate('displayName', 30, 25), - getDisplayNameAdvanced:Em.computed.truncate('displayNameAdvanced', 19, 16), + getDisplayNameAdvanced:Em.computed.truncate('displayNameAdvanced', 30, 25), summaryLabelClassName:function(){ return 'label_for_'+this.get('componentName').toLowerCase(); diff --git a/ambari-web/app/styles/alerts.less b/ambari-web/app/styles/alerts.less index 5e60cf6..b092adc 100644 --- a/ambari-web/app/styles/alerts.less +++ b/ambari-web/app/styles/alerts.less @@ -61,7 +61,8 @@ width: 115px; text-align: center; line-height: 20px; - margin-bottom: 4px; + margin-bottom: 2px; + margin-top: 2px; } .groups-filter { @@ -162,7 +163,8 @@ #alert-instances-table { > thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, - > tfoot > tr > th, > tfoot > tr > td { + > tfoot > tr > th, > tfoot > tr > td, + .timeago { vertical-align: middle; } diff --git a/ambari-web/app/styles/hosts.less b/ambari-web/app/styles/hosts.less index b18d91f..69f8c6b 100644 --- a/ambari-web/app/styles/hosts.less +++ b/ambari-web/app/styles/hosts.less @@ -49,6 +49,13 @@ .host-select-all { margin-bottom: -1px ; } + tbody > tr > td { + vertical-align: middle; + } + .alerts-crit-count, + .alerts-warn-count { + margin-top: 2px; + } } .health-status-HEALTHY, diff --git a/ambari-web/test/models/host_component_test.js b/ambari-web/test/models/host_component_test.js index 5f4997d..2dac475 100644 --- a/ambari-web/test/models/host_component_test.js +++ b/ambari-web/test/models/host_component_test.js @@ -276,64 +276,9 @@ describe('App.HostComponent', function() { App.TestAliases.testAsComputedExistsIn(hc, 'isNotInstalled', 'workStatus', ['INIT', 'INSTALL_FAILED']); - describe("#getDisplayName",function(){ - var testCases = [ - { - testName: 'for displayName of length < 19', - displayName: 'abc', - result: 'abc' - }, - { - testName:'for displayName of length = 19', - displayName: '1234567890123456789', - result: '1234567890123456789' - }, - { - testName:'for displayName of length > 19', - displayName: '12345678901234567890', - result: '1234567890123456...' - } - ]; - - testCases.forEach(function(test){ - it(test.testName, function(){ - hc.set('displayName',test.displayName); - expect(hc.get('getDisplayName')).to.equal(test.result); - }); - }); - }); - - describe("#getDisplayNameAdvanced",function(){ - var testCases = [ - { - testName: 'for displayNameAdvanced of length < 19', - displayNameAdvanced: 'abc', - result: 'abc' - }, - { - testName:'for displayNameAdvanced of length = 19', - displayNameAdvanced: '1234567890123456789', - result: '1234567890123456789' - }, - { - testName:'for displayNameAdvanced of length > 19', - displayNameAdvanced: '12345678901234567890', - result: '1234567890123456...' - } - ]; - - testCases.forEach(function(test){ - it(test.testName, function(){ - hc.set('displayNameAdvanced',test.displayNameAdvanced); - expect(hc.get('getDisplayNameAdvanced')).to.equal(test.result); - }); - }); - }); - - App.TestAliases.testAsComputedTruncate(hc, 'serviceDisplayName', 'service.displayName', 14, 11); - App.TestAliases.testAsComputedTruncate(hc, 'getDisplayName', 'displayName', 19, 16); - App.TestAliases.testAsComputedTruncate(hc, 'getDisplayNameAdvanced', 'displayNameAdvanced', 19, 16); + App.TestAliases.testAsComputedTruncate(hc, 'getDisplayName', 'displayName', 30, 25); + App.TestAliases.testAsComputedTruncate(hc, 'getDisplayNameAdvanced', 'displayNameAdvanced', 30, 25); describe("#serviceDisplayName",function(){ var testCases = [