You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2014/02/28 01:24:36 UTC
git commit: AMBARI-4854. Hosts page components caret wrong behaviour.
(xiwang via yusaku)
Repository: ambari
Updated Branches:
refs/heads/trunk 895bf7995 -> 156ddc1e1
AMBARI-4854. Hosts page components caret wrong behaviour. (xiwang via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/156ddc1e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/156ddc1e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/156ddc1e
Branch: refs/heads/trunk
Commit: 156ddc1e1163dd4cbb2e0df257f04e3df2933a78
Parents: 895bf79
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Feb 27 16:24:04 2014 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Feb 27 16:24:04 2014 -0800
----------------------------------------------------------------------
ambari-web/app/styles/application.less | 8 ++------
ambari-web/app/templates/main/host.hbs | 3 ++-
ambari-web/app/views/main/host.js | 3 ++-
3 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/156ddc1e/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 837aa6a..87209fe 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -3221,15 +3221,11 @@ table.graphs {
}
}
.host-components-expander {
- .caret {
+ .icon-caret-right, .icon-caret-down {
vertical-align: middle;
margin-right: 5px;
margin-bottom: 2px;
- &.right {
- border-left: 4px solid #000000;
- border-top: 4px solid transparent;
- border-bottom: 4px solid transparent;
- }
+ text-decoration: none;
}
}
.host-components {
http://git-wip-us.apache.org/repos/asf/ambari/blob/156ddc1e/ambari-web/app/templates/main/host.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host.hbs b/ambari-web/app/templates/main/host.hbs
index 5f9544b..d7bcc5d 100644
--- a/ambari-web/app/templates/main/host.hbs
+++ b/ambari-web/app/templates/main/host.hbs
@@ -127,7 +127,8 @@
<td>{{host.loadAvg}}</td>
<td>
- <a href="#" class="host-components-expander" {{action toggleComponents target="view"}}> <span class="caret right"></span>{{view.content.hostComponents.length}} {{pluralize view.content.hostComponents.length singular="t:common.component" plural="t:common.components"}}</a>
+ <a href="#" class="host-components-expander" {{action toggleComponents target="view"}}> <span {{bindAttr class="view.isComponentsCollapsed:icon-caret-right:icon-caret-down"}}></span>
+ {{view.content.hostComponents.length}} {{pluralize view.content.hostComponents.length singular="t:common.component" plural="t:common.components"}}</a>
<div id="host-{{unbound host.hostName}}" class="host-components">
{{{view.labels}}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/156ddc1e/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index 9b530ed..40d49fe 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -206,10 +206,11 @@ App.MainHostView = App.TableView.extend({
tagName: 'tr',
didInsertElement: function(){
App.tooltip(this.$("[rel='HealthTooltip'], [rel='UsageTooltip'], [rel='ComponentsTooltip']"));
+ this.set('isComponentsCollapsed', true);
},
toggleComponents: function(event) {
- this.$(event.target).find('.caret').toggleClass('right');
+ this.set('isComponentsCollapsed', !this.get('isComponentsCollapsed'));
this.$('.host-components').toggle();
},