open-nomad/ui/app/models/evaluation.js

29 lines
867 B
JavaScript
Raw Normal View History

import { bool, equal } from '@ember/object/computed';
import Model from '@ember-data/model';
import { attr, belongsTo } from '@ember-data/model';
2017-11-29 01:21:56 +00:00
import { fragmentArray } from 'ember-data-model-fragments/attributes';
import shortUUIDProperty from '../utils/properties/short-uuid';
export default class Evaluation extends Model {
@shortUUIDProperty('id') shortId;
@attr('number') priority;
@attr('string') type;
@attr('string') triggeredBy;
@attr('string') status;
@attr('string') statusDescription;
@fragmentArray('placement-failure', { defaultValue: () => [] }) failedTGAllocs;
2017-11-29 01:21:56 +00:00
@bool('failedTGAllocs.length') hasPlacementFailures;
@equal('status', 'blocked') isBlocked;
2017-11-29 01:21:56 +00:00
@belongsTo('job') job;
2017-11-29 01:21:56 +00:00
@attr('number') modifyIndex;
@attr('date') modifyTime;
@attr('number') createIndex;
@attr('date') createTime;
2018-05-03 19:17:06 +00:00
@attr('date') waitUntil;
}