c86183154b
The bug is fixed in 2.18, so this can be written in the normal less surprising way.
26 lines
799 B
JavaScript
26 lines
799 B
JavaScript
import { bool, equal } from '@ember/object/computed';
|
|
import Model from 'ember-data/model';
|
|
import attr from 'ember-data/attr';
|
|
import { belongsTo } from 'ember-data/relationships';
|
|
import { fragmentArray } from 'ember-data-model-fragments/attributes';
|
|
import shortUUIDProperty from '../utils/properties/short-uuid';
|
|
|
|
export default Model.extend({
|
|
shortId: shortUUIDProperty('id'),
|
|
priority: attr('number'),
|
|
type: attr('string'),
|
|
triggeredBy: attr('string'),
|
|
status: attr('string'),
|
|
statusDescription: attr('string'),
|
|
failedTGAllocs: fragmentArray('placement-failure', { defaultValue: () => [] }),
|
|
|
|
hasPlacementFailures: bool('failedTGAllocs.length'),
|
|
isBlocked: equal('status', 'blocked'),
|
|
|
|
job: belongsTo('job'),
|
|
|
|
modifyIndex: attr('number'),
|
|
|
|
waitUntil: attr('date'),
|
|
});
|