2e2e942f3f
1. In the Services > Services detail page for both healthy and unhealthy nodes, also add searching by Service.ID here 2. In the Nodes > Node detail > [Services] tab only if its different from the Service name, add searching by Service.ID here
29 lines
887 B
JavaScript
29 lines
887 B
JavaScript
import Component from '@ember/component';
|
|
import { computed, get } from '@ember/object';
|
|
import style from 'ember-computed-style';
|
|
export default Component.extend({
|
|
classNames: ['healthchecked-resource'],
|
|
attributeBindings: ['style'],
|
|
style: style('gridRowEnd'),
|
|
unhealthy: computed.filter(`checks.@each.Status`, function(item) {
|
|
const status = get(item, 'Status');
|
|
return status === 'critical' || status === 'warning';
|
|
}),
|
|
healthy: computed.filter(`checks.@each.Status`, function(item) {
|
|
const status = get(item, 'Status');
|
|
return status === 'passing';
|
|
}),
|
|
gridRowEnd: computed('UnhealthyChecks', function() {
|
|
let spans = 3;
|
|
if (get(this, 'service')) {
|
|
spans++;
|
|
}
|
|
if (get(this, 'healthy.length') > 0) {
|
|
spans++;
|
|
}
|
|
return {
|
|
gridRow: `auto / span ${spans + (get(this, 'unhealthy.length') || 0)}`,
|
|
};
|
|
}),
|
|
});
|