2018-05-08 16:39:27 +00:00
|
|
|
import Fragment from 'ember-data-model-fragments/fragment';
|
2018-05-09 01:09:20 +00:00
|
|
|
import { computed } from '@ember/object';
|
2018-05-08 16:39:27 +00:00
|
|
|
import attr from 'ember-data/attr';
|
|
|
|
import { fragmentOwner } from 'ember-data-model-fragments/attributes';
|
|
|
|
import { fragment } from 'ember-data-model-fragments/attributes';
|
|
|
|
|
|
|
|
export default Fragment.extend({
|
|
|
|
node: fragmentOwner(),
|
|
|
|
|
|
|
|
attributes: fragment('node-attributes'),
|
|
|
|
name: attr('string'),
|
|
|
|
detected: attr('boolean', { defaultValue: false }),
|
|
|
|
healthy: attr('boolean', { defaultValue: false }),
|
|
|
|
healthDescription: attr('string'),
|
|
|
|
updateTime: attr('date'),
|
2018-05-09 01:09:20 +00:00
|
|
|
|
|
|
|
healthClass: computed('healthy', function() {
|
|
|
|
return this.get('healthy') ? 'running' : 'failed';
|
|
|
|
}),
|
2018-05-08 16:39:27 +00:00
|
|
|
});
|