github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/controllers/csi/plugins/plugin/index.js (about)

     1  import Controller from '@ember/controller';
     2  import { action, computed } from '@ember/object';
     3  
     4  export default class IndexController extends Controller {
     5    @computed('model.controllers.@each.updateTime')
     6    get sortedControllers() {
     7      return this.model.controllers.sortBy('updateTime').reverse();
     8    }
     9  
    10    @computed('model.nodes.@each.updateTime')
    11    get sortedNodes() {
    12      return this.model.nodes.sortBy('updateTime').reverse();
    13    }
    14  
    15    @action
    16    gotoAllocation(allocation) {
    17      this.transitionToRoute('allocations.allocation', allocation);
    18    }
    19  }