github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/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    modifyTime: attr('date'),
    24  
    25    createIndex: attr('number'),
    26    createTime: attr('date'),
    27  
    28    waitUntil: attr('date'),
    29  });