github.com/hernad/nomad@v1.6.112/ui/app/models/task-group-deployment-summary.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { gt, alias } from '@ember/object/computed'; 7 import Fragment from 'ember-data-model-fragments/fragment'; 8 import { attr } from '@ember-data/model'; 9 import { fragmentOwner } from 'ember-data-model-fragments/attributes'; 10 11 export default class TaskGroupDeploymentSummary extends Fragment { 12 @fragmentOwner() deployment; 13 14 @attr('string') name; 15 16 @attr('boolean') autoRevert; 17 @attr('boolean') autoPromote; 18 @attr('boolean') promoted; 19 @gt('desiredCanaries', 0) requiresPromotion; 20 21 // The list of canary allocation IDs 22 // hasMany is not supported in fragments 23 @attr({ defaultValue: () => [] }) placedCanaryAllocations; 24 25 @alias('placedCanaryAllocations.length') placedCanaries; 26 @attr('number') desiredCanaries; 27 @attr('number') desiredTotal; 28 @attr('number') placedAllocs; 29 @attr('number') healthyAllocs; 30 @attr('number') unhealthyAllocs; 31 32 @attr('date') requireProgressBy; 33 }