github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/components/job-page/parts/task-groups.js (about)

     1  import Component from '@ember/component';
     2  import { computed } from '@ember/object';
     3  import { alias } from '@ember/object/computed';
     4  import Sortable from 'nomad-ui/mixins/sortable';
     5  import { classNames } from '@ember-decorators/component';
     6  import classic from 'ember-classic-decorator';
     7  
     8  @classic
     9  @classNames('boxed-section')
    10  export default class TaskGroups extends Component.extend(Sortable) {
    11    job = null;
    12  
    13    // Provide a value that is bound to a query param
    14    sortProperty = null;
    15    sortDescending = null;
    16  
    17    // Provide an action with access to the router
    18    gotoTaskGroup() {}
    19  
    20    @computed('job.taskGroups.[]')
    21    get taskGroups() {
    22      return this.get('job.taskGroups') || [];
    23    }
    24  
    25    @alias('taskGroups') listToSort;
    26    @alias('listSorted') sortedTaskGroups;
    27  }