github.com/thomasobenaus/nomad@v0.11.1/ui/app/models/task-group-deployment-summary.js (about)

     1  import { gt, alias } 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    deployment: fragmentOwner(),
     8  
     9    name: attr('string'),
    10  
    11    autoRevert: attr('boolean'),
    12    promoted: attr('boolean'),
    13    requiresPromotion: gt('desiredCanaries', 0),
    14  
    15    // The list of canary allocation IDs
    16    // hasMany is not supported in fragments
    17    placedCanaryAllocations: attr({ defaultValue: () => [] }),
    18  
    19    placedCanaries: alias('placedCanaryAllocations.length'),
    20    desiredCanaries: attr('number'),
    21    desiredTotal: attr('number'),
    22    placedAllocs: attr('number'),
    23    healthyAllocs: attr('number'),
    24    unhealthyAllocs: attr('number'),
    25  
    26    requireProgressBy: attr('date'),
    27  });