github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/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/model'; 4 import { fragmentOwner } from 'ember-data-model-fragments/attributes'; 5 6 export default class TaskGroupDeploymentSummary extends Fragment { 7 @fragmentOwner() deployment; 8 9 @attr('string') name; 10 11 @attr('boolean') autoRevert; 12 @attr('boolean') promoted; 13 @gt('desiredCanaries', 0) requiresPromotion; 14 15 // The list of canary allocation IDs 16 // hasMany is not supported in fragments 17 @attr({ defaultValue: () => [] }) placedCanaryAllocations; 18 19 @alias('placedCanaryAllocations.length') placedCanaries; 20 @attr('number') desiredCanaries; 21 @attr('number') desiredTotal; 22 @attr('number') placedAllocs; 23 @attr('number') healthyAllocs; 24 @attr('number') unhealthyAllocs; 25 26 @attr('date') requireProgressBy; 27 }