You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/02/12 12:57:45 UTC

git commit: AMBARI-4625 Host Details > Components: action button label should show actual status when component is in Out-of-Service Mode. (ababiichuk)

Updated Branches:
  refs/heads/trunk fbbf77762 -> 16fe1f21d


AMBARI-4625 Host Details > Components: action button label should show actual status when component is in Out-of-Service Mode. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 16fe1f21dfbf0a53535679dcbe411dfcfce11a33
Parents: fbbf777
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed Feb 12 13:53:33 2014 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Feb 12 13:53:33 2014 +0200

----------------------------------------------------------------------
 .../templates/main/host/details/host_component.hbs |  2 +-
 .../views/main/host/details/host_component_view.js | 17 ++++++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/16fe1f21/ambari-web/app/templates/main/host/details/host_component.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/host_component.hbs b/ambari-web/app/templates/main/host/details/host_component.hbs
index a4973c9..ee29b88 100644
--- a/ambari-web/app/templates/main/host/details/host_component.hbs
+++ b/ambari-web/app/templates/main/host/details/host_component.hbs
@@ -24,7 +24,7 @@
       </a>
     {{/if}}
   {{else}}
-    <span rel='componentHealthTooltip' {{bindAttr class="view.statusClass :components-health" data-original-title="view.componentTextStatus"}}></span>&nbsp;
+    <span rel='componentHealthTooltip' {{bindAttr class="view.statusClass :components-health" data-original-title="view.componentStatusTooltip"}}></span>&nbsp;
   {{/if}}
   {{#if component.displayNameAdvanced}}
     {{component.displayNameAdvanced}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/16fe1f21/ambari-web/app/views/main/host/details/host_component_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js
index 20ae8de..50e4002 100644
--- a/ambari-web/app/views/main/host/details/host_component_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_view.js
@@ -57,9 +57,6 @@ App.HostComponentView = Em.View.extend({
    * @type {String}
    */
   componentTextStatus: function () {
-    if (this.get('content.passiveState') != 'ACTIVE') {
-      return Em.I18n.t('hosts.component.passive.short.mode');
-    }
     var workStatus = this.get("workStatus");
     var componentTextStatus = this.get('content.componentTextStatus');
     var hostComponent = this.get('hostComponent');
@@ -98,6 +95,20 @@ App.HostComponentView = Em.View.extend({
   }.property('content.passiveState','workStatus','isDataNodeRecommissionAvailable', 'isDataNodeDecommissioning', 'isNodeManagerRecommissionAvailable', 'isNodeManagerDecommissioning',
       'isTaskTrackerRecommissionAvailable', 'isTaskTrackerDecommissioning', 'isRegionServerRecommissionAvailable', 'isRegionServerDecommissioning'),
 
+
+  /**
+   * Returns message for health tooltip
+   * in addition to workStatus it also displays passive state of component
+   * @type {String}
+   */
+  componentStatusTooltip: function() {
+    if (this.get('content.passiveState') != 'ACTIVE') {
+      return Em.I18n.t('hosts.component.passive.short.mode');
+    } else {
+      return this.get('componentTextStatus');
+    }
+  }.property('componentTextStatus','content.passiveState'),
+
   /**
    * @type {String}
    */