github.com/hernad/nomad@v1.6.112/ui/app/components/reschedule-event-row.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import Component from '@ember/component'; 7 import { computed as overridable } from 'ember-overridable-computed'; 8 import { inject as service } from '@ember/service'; 9 import { tagName } from '@ember-decorators/component'; 10 import classic from 'ember-classic-decorator'; 11 12 @classic 13 @tagName('') 14 export default class RescheduleEventRow extends Component { 15 @service store; 16 17 // When given a string, the component will fetch the allocation 18 allocationId = null; 19 20 // An allocation can also be provided directly 21 @overridable('allocationId', function () { 22 if (this.allocationId) { 23 return this.store.findRecord('allocation', this.allocationId); 24 } 25 26 return null; 27 }) 28 allocation; 29 30 time = null; 31 linkToAllocation = true; 32 label = ''; 33 }