open-consul/ui-v2/app/helpers/service/health-checks.js
Kenia d0c4312923 ui: Redesign Service List page (#7605)
* Create GridCollection for nodes page with styling

* Update ListCollection styling

* Update TagList styling

* Create CompositeRow styling component

* Update ConsulServiceList component with styling

* Create service health-checks helper

* Add InstanceCount to the service model

* Add tag-svg to codebase

* Create and update tests for service-list page

* Upgrade @hashicorp/consul-api-double to 2.14.0
2020-05-12 17:14:25 +00:00

17 lines
372 B
JavaScript

import { helper } from '@ember/component/helper';
export function healthChecks([item], hash) {
switch (true) {
case item.ChecksCritical !== 0:
return 'critical';
case item.ChecksWarning !== 0:
return 'warning';
case item.ChecksPassing !== 0:
return 'passing';
default:
return 'empty';
}
}
export default helper(healthChecks);