github.com/hernad/nomad@v1.6.112/ui/app/controllers/csi/plugins/plugin/index.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import Controller from '@ember/controller'; 7 import { action, computed } from '@ember/object'; 8 9 export default class IndexController extends Controller { 10 @computed('model.controllers.@each.updateTime') 11 get sortedControllers() { 12 return this.model.controllers.sortBy('updateTime').reverse(); 13 } 14 15 @computed('model.nodes.@each.updateTime') 16 get sortedNodes() { 17 return this.model.nodes.sortBy('updateTime').reverse(); 18 } 19 20 @action 21 gotoAllocation(allocation) { 22 this.transitionToRoute('allocations.allocation', allocation.id); 23 } 24 }