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