mirror of https://github.com/status-im/consul.git
16 lines
322 B
JavaScript
16 lines
322 B
JavaScript
|
import { get } from '@ember/object';
|
||
|
export default function(checks, status) {
|
||
|
let num = 0;
|
||
|
switch (status) {
|
||
|
case 'passing':
|
||
|
case 'critical':
|
||
|
case 'warning':
|
||
|
num = get(checks.filterBy('Status', status), 'length');
|
||
|
break;
|
||
|
case '': // all
|
||
|
num = 1;
|
||
|
break;
|
||
|
}
|
||
|
return num > 0;
|
||
|
}
|