AMBARI-2776. When a master component is in maintenance mode, the service health icon always shows a red blinking dot. (yusaku)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/7c8e240e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/7c8e240e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/7c8e240e Branch: refs/heads/trunk Commit: 7c8e240e6a2fb857bf2c9f3e12aba01a0eb8e4b3 Parents: 37eb382 Author: Yusaku Sako <[email protected]> Authored: Tue Jul 30 18:53:04 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Wed Jul 31 11:22:53 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/models/host_component.js | 3 +++ ambari-web/app/models/service.js | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7c8e240e/ambari-web/app/models/host_component.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js index 279d5e1..22406db 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -128,6 +128,7 @@ App.HostComponentStatus = { install_failed: "INSTALL_FAILED", installing: "INSTALLING", upgrade_failed: "UPGRADE_FAILED", + maintenance: "MAINTENANCE", unknown: "UNKNOWN", getKeyName:function(value){ @@ -146,6 +147,8 @@ App.HostComponentStatus = { return 'installing'; case this.upgrade_failed: return 'upgrade_failed'; + case this.maintenance: + return 'maintenance'; case this.unknown: return 'unknown'; } http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7c8e240e/ambari-web/app/models/service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js index 1de0e5a..6651117 100644 --- a/ambari-web/app/models/service.js +++ b/ambari-web/app/models/service.js @@ -43,9 +43,11 @@ App.Service = DS.Model.extend({ updateHealthStatus: function () { // console.log('model:service.healthStatus ' + this.get('serviceName')); var components = this.get('hostComponents').filterProperty('isMaster', true); - var isGreen = (this.get('serviceName') === 'HBASE' && App.supports.multipleHBaseMasters ? + var isGreen = this.get('serviceName') === 'HBASE' && App.supports.multipleHBaseMasters ? components.someProperty('workStatus', App.HostComponentStatus.started) : - components.everyProperty('workStatus', App.HostComponentStatus.started)); + components.every(function (_component) { + return ([App.HostComponentStatus.started, App.HostComponentStatus.maintenance].contains(_component.get('workStatus'))); + }, this); if (isGreen) { this.set('healthStatus', 'green');
