You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/app/utils/hasStatus.js

16 lines
322 B

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;
}