github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/app/models/evaluation.js (about) 1 import { bool, equal } from '@ember/object/computed'; 2 import Model from 'ember-data/model'; 3 import attr from 'ember-data/attr'; 4 import { belongsTo } from 'ember-data/relationships'; 5 import { fragmentArray } from 'ember-data-model-fragments/attributes'; 6 import shortUUIDProperty from '../utils/properties/short-uuid'; 7 8 export default Model.extend({ 9 shortId: shortUUIDProperty('id'), 10 priority: attr('number'), 11 type: attr('string'), 12 triggeredBy: attr('string'), 13 status: attr('string'), 14 statusDescription: attr('string'), 15 failedTGAllocs: fragmentArray('placement-failure', { defaultValue: () => [] }), 16 17 hasPlacementFailures: bool('failedTGAllocs.length'), 18 isBlocked: equal('status', 'blocked'), 19 20 job: belongsTo('job'), 21 22 modifyIndex: attr('number'), 23 24 waitUntil: attr('date'), 25 });