浏览代码

AMBARI-1239. Host health status should show orange when there is at least one slave component on the host with state!=STARTED. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1437206 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 年之前
父节点
当前提交
c65dc87939
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 3 0
      CHANGES.txt
  2. 4 2
      ambari-web/app/models/host.js

+ 3 - 0
CHANGES.txt

@@ -17,6 +17,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1239. Host health status should show orange when there is at least one
+ slave component on the host with state!=STARTED. (yusaku)
+
  AMBARI-1248. Refactoring of update, services and hosts mapper. (yusaku)
 
  AMBARI-1247. Disable links for previous steps in left nav on Summary step.

+ 4 - 2
ambari-web/app/models/host.js

@@ -126,11 +126,13 @@ App.Host = DS.Model.extend({
     if (!this.get('isLoaded') || this.get('isSaving')) {
     } else {
       var status;
-      var masterComponents = this.get('hostComponents').filterProperty('isMaster', true);
+      var masterComponents = this.get('hostComponents').filterProperty('isMaster');
       var masterComponentsRunning = masterComponents.everyProperty('workStatus', App.HostComponentStatus.started);
+      var slaveComponents = this.get('hostComponents').filterProperty('isSlave');
+      var slaveComponentsRunning = slaveComponents.everyProperty('workStatus', App.HostComponentStatus.started);
       if (this.get('isNotHeartBeating')) {
         status = 'DEAD-YELLOW';
-      } else if (masterComponentsRunning) {
+      } else if (masterComponentsRunning && slaveComponentsRunning) {
         status = 'LIVE';
       } else if (masterComponents.length > 0 && !masterComponentsRunning) {
         status = 'DEAD';