github.com/thomasobenaus/nomad@v0.11.1/ui/app/controllers/csi/volumes/volume.js (about)

     1  import Controller from '@ember/controller';
     2  import { inject as service } from '@ember/service';
     3  import { computed } from '@ember/object';
     4  
     5  export default Controller.extend({
     6    system: service(),
     7  
     8    sortedReadAllocations: computed('model.readAllocations.@each.modifyIndex', function() {
     9      return this.model.readAllocations.sortBy('modifyIndex').reverse();
    10    }),
    11  
    12    sortedWriteAllocations: computed('model.writeAllocations.@each.modifyIndex', function() {
    13      return this.model.writeAllocations.sortBy('modifyIndex').reverse();
    14    }),
    15  
    16    actions: {
    17      gotoAllocation(allocation) {
    18        this.transitionToRoute('allocations.allocation', allocation);
    19      },
    20    },
    21  });