github.com/manicqin/nomad@v0.9.5/ui/app/components/job-page/parts/children.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  
     6  export default Component.extend(Sortable, {
     7    job: null,
     8  
     9    classNames: ['boxed-section'],
    10  
    11    // Provide a value that is bound to a query param
    12    sortProperty: null,
    13    sortDescending: null,
    14    currentPage: null,
    15  
    16    // Provide an action with access to the router
    17    gotoJob() {},
    18  
    19    pageSize: 10,
    20  
    21    taskGroups: computed('job.taskGroups.[]', function() {
    22      return this.get('job.taskGroups') || [];
    23    }),
    24  
    25    children: computed('job.children.[]', function() {
    26      return this.get('job.children') || [];
    27    }),
    28  
    29    listToSort: alias('children'),
    30    sortedChildren: alias('listSorted'),
    31  });