Merge pull request #2201 from loganhz/drain

Fix node alert issue
This commit is contained in:
Westly Wright 2018-08-31 10:12:23 -07:00 committed by GitHub
commit d2693987b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import C from 'ui/utils/constants';
import Component from '@ember/component';
import { set, get, computed, observer } from '@ember/object';
import { alias } from '@ember/object/computed';
@ -28,7 +29,7 @@ export default Component.extend({
}),
inactiveNodes: computed('nodes.@each.state', function() {
return get(this, 'nodes').filter( (n) => get(n, 'state') !== 'active' && get(n, 'state') !== 'cordoned' );
return get(this, 'nodes').filter( (n) => C.ACTIVEISH_STATES.indexOf(get(n, 'state')) === -1 );
}),
unhealthyComponents: computed('componentStatuses.@each.conditions', function() {

View File

@ -564,6 +564,9 @@ C.ACTIVEISH_STATES = [
'unhealthy',
'upgrading',
'upgraded',
'draining',
'drained',
'cordoned'
];
C.READY_STATES = [