github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/models/evaluation.js (about) 1 import Ember from 'ember'; 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 const { computed } = Ember; 9 10 export default Model.extend({ 11 shortId: shortUUIDProperty('id'), 12 priority: attr('number'), 13 type: attr('string'), 14 triggeredBy: attr('string'), 15 status: attr('string'), 16 statusDescription: attr('string'), 17 failedTGAllocs: fragmentArray('placement-failure', { defaultValue: () => [] }), 18 19 hasPlacementFailures: computed.bool('failedTGAllocs.length'), 20 21 // TEMPORARY: https://github.com/emberjs/data/issues/5209 22 originalJobId: attr('string'), 23 24 job: belongsTo('job'), 25 26 modifyIndex: attr('number'), 27 });