github.com/manicqin/nomad@v0.9.5/ui/app/controllers/jobs/job/index.js (about)

     1  import { inject as service } from '@ember/service';
     2  import { alias } from '@ember/object/computed';
     3  import Controller from '@ember/controller';
     4  import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
     5  
     6  export default Controller.extend(WithNamespaceResetting, {
     7    system: service(),
     8  
     9    queryParams: {
    10      currentPage: 'page',
    11      sortProperty: 'sort',
    12      sortDescending: 'desc',
    13    },
    14  
    15    currentPage: 1,
    16  
    17    job: alias('model'),
    18  
    19    sortProperty: 'name',
    20    sortDescending: false,
    21  
    22    actions: {
    23      gotoTaskGroup(taskGroup) {
    24        this.transitionToRoute('jobs.job.task-group', taskGroup.get('job'), taskGroup);
    25      },
    26  
    27      gotoJob(job) {
    28        this.transitionToRoute('jobs.job', job, {
    29          queryParams: { jobNamespace: job.get('namespace.name') },
    30        });
    31      },
    32    },
    33  });