github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/app/models/task-group-summary.js (about)

     1  import { collect, sum } from '@ember/object/computed';
     2  import Fragment from 'ember-data-model-fragments/fragment';
     3  import attr from 'ember-data/attr';
     4  import { fragmentOwner } from 'ember-data-model-fragments/attributes';
     5  
     6  export default Fragment.extend({
     7    job: fragmentOwner(),
     8    name: attr('string'),
     9  
    10    queuedAllocs: attr('number'),
    11    startingAllocs: attr('number'),
    12    runningAllocs: attr('number'),
    13    completeAllocs: attr('number'),
    14    failedAllocs: attr('number'),
    15    lostAllocs: attr('number'),
    16  
    17    allocsList: collect(
    18      'queuedAllocs',
    19      'startingAllocs',
    20      'runningAllocs',
    21      'completeAllocs',
    22      'failedAllocs',
    23      'lostAllocs'
    24    ),
    25  
    26    totalAllocs: sum('allocsList'),
    27  });