github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/components/reschedule-event-row.js (about)

     1  import Component from '@ember/component';
     2  import { computed as overridable } from 'ember-overridable-computed';
     3  import { inject as service } from '@ember/service';
     4  import { tagName } from '@ember-decorators/component';
     5  import classic from 'ember-classic-decorator';
     6  
     7  @classic
     8  @tagName('')
     9  export default class RescheduleEventRow extends Component {
    10    @service store;
    11  
    12    // When given a string, the component will fetch the allocation
    13    allocationId = null;
    14  
    15    // An allocation can also be provided directly
    16    @overridable('allocationId', function () {
    17      if (this.allocationId) {
    18        return this.store.findRecord('allocation', this.allocationId);
    19      }
    20  
    21      return null;
    22    })
    23    allocation;
    24  
    25    time = null;
    26    linkToAllocation = true;
    27    label = '';
    28  }