github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/models/task-group-summary.js (about)

     1  import Ember from 'ember';
     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  const { computed } = Ember;
     7  
     8  export default Fragment.extend({
     9    job: fragmentOwner(),
    10    name: attr('string'),
    11  
    12    queuedAllocs: attr('number'),
    13    startingAllocs: attr('number'),
    14    runningAllocs: attr('number'),
    15    completeAllocs: attr('number'),
    16    failedAllocs: attr('number'),
    17    lostAllocs: attr('number'),
    18  
    19    allocsList: computed.collect(
    20      'queuedAllocs',
    21      'startingAllocs',
    22      'runningAllocs',
    23      'completeAllocs',
    24      'failedAllocs',
    25      'lostAllocs'
    26    ),
    27  
    28    totalAllocs: computed.sum('allocsList'),
    29  });