You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/02/25 17:17:44 UTC
git commit: AMBARI-4822. "Host Actions" button is disabled on host
detail page when heart beating is lost. (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk a9da44984 -> 845355c5f
AMBARI-4822. "Host Actions" button is disabled on host detail page when heart beating is lost. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/845355c5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/845355c5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/845355c5
Branch: refs/heads/trunk
Commit: 845355c5f16a5dd64387751b46bd2c2436866db4
Parents: a9da449
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Tue Feb 25 18:15:26 2014 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Feb 25 18:17:39 2014 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/main/host/details.js | 6 +++---
ambari-web/app/templates/main/host/details.hbs | 6 +++---
ambari-web/app/views/main/host/details.js | 12 ++++++------
3 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/845355c5/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 4cd2daf..78a91d7 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -961,13 +961,13 @@ App.MainHostDetailsController = Em.Controller.extend({
this.validateAndDeleteHost();
break;
case "startAllComponents":
- this.doStartAllComponents();
+ if (!this.get('content.isNotHeartBeating')) this.doStartAllComponents();
break;
case "stopAllComponents":
- this.doStopAllComponents();
+ if (!this.get('content.isNotHeartBeating')) this.doStopAllComponents();
break;
case "restartAllComponents":
- this.doRestartAllComponents();
+ if (!this.get('content.isNotHeartBeating')) this.doRestartAllComponents();
break;
case "onOffPassiveModeForHost":
this.onOffPassiveModeForHost(option.context);
http://git-wip-us.apache.org/repos/asf/ambari/blob/845355c5/ambari-web/app/templates/main/host/details.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details.hbs b/ambari-web/app/templates/main/host/details.hbs
index c777df2..2e7ad13 100644
--- a/ambari-web/app/templates/main/host/details.hbs
+++ b/ambari-web/app/templates/main/host/details.hbs
@@ -30,15 +30,15 @@
{{#if App.supports.deleteHost}}
<div class="service-button">
<div class="btn-group display-inline-block">
- <a href="javascript:void(null)" {{bindAttr class=":btn :dropdown-toggle controller.content.isNotHeartBeating:disabled"}} data-toggle="dropdown">
+ <a href="javascript:void(null)" {{bindAttr class=":btn :dropdown-toggle"}} data-toggle="dropdown">
{{t hosts.host.details.hostActions}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<!-- dropdown menu links -->
{{#each option in view.maintenance}}
- <li {{bindAttr class="controller.isStopDisabled:disabled"}}>
- <a {{action "doAction" option target="controller" href=true}}><i {{bindAttr class="option.cssClass"}}></i>
+ <li {{bindAttr class="controller.isStopDisabled:disabled option.liClass"}}>
+ <a {{action "doAction" option target="controller" href=true}}><i {{bindAttr class="option.cssClass option.liClass"}}></i>
{{option.label}}</a>
</li>
{{/each}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/845355c5/ambari-web/app/views/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details.js b/ambari-web/app/views/main/host/details.js
index 785a7a1..2ce416f 100644
--- a/ambari-web/app/views/main/host/details.js
+++ b/ambari-web/app/views/main/host/details.js
@@ -33,12 +33,12 @@ App.MainHostDetailsView = Em.View.extend({
maintenance: function(){
var onOff = this.get('isActive') ? "On" : "Off";
return [
- {action: 'startAllComponents', cssClass: 'icon-play enabled', 'label': this.t('hosts.host.details.startAllComponents')},
- {action: 'stopAllComponents', cssClass: 'icon-stop enabled', 'label': this.t('hosts.host.details.stopAllComponents')},
- {action: 'restartAllComponents', cssClass: 'icon-forward enabled', 'label': this.t('hosts.host.details.restartAllComponents')},
- {action: 'deleteHost', cssClass: 'icon-remove enabled', 'label': this.t('hosts.host.details.deleteHost')},
- {action: 'onOffPassiveModeForHost', cssClass: 'icon-medkit enabled', active:this.get('isActive'), 'label': this.t('passiveState.turn' + onOff)}];
- }.property('controller.content','isActive'),
+ {action: 'startAllComponents', liClass: (this.get('controller.content.isNotHeartBeating')?'disabled':'enabled'), cssClass: 'icon-play', 'label': this.t('hosts.host.details.startAllComponents')},
+ {action: 'stopAllComponents', liClass: (this.get('controller.content.isNotHeartBeating')?'disabled':'enabled'), cssClass: 'icon-stop', 'label': this.t('hosts.host.details.stopAllComponents')},
+ {action: 'restartAllComponents', liClass: (this.get('controller.content.isNotHeartBeating')?'disabled':'enabled'), cssClass: 'icon-forward', 'label': this.t('hosts.host.details.restartAllComponents')},
+ {action: 'deleteHost', liClass:'', cssClass: 'icon-remove', 'label': this.t('hosts.host.details.deleteHost')},
+ {action: 'onOffPassiveModeForHost', liClass:'', cssClass: 'icon-medkit', active:this.get('isActive'), 'label': this.t('passiveState.turn' + onOff)}];
+ }.property('controller.content','isActive', 'controller.content.isNotHeartBeating'),
didInsertElement: function() {
App.tooltip($("[rel='HealthTooltip']"));
}