Files
nomad/ui/app/controllers/csi/plugins/plugin/index.js
2023-04-10 15:36:59 +00:00

25 lines
624 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Controller from '@ember/controller';
import { action, computed } from '@ember/object';
export default class IndexController extends Controller {
@computed('model.controllers.@each.updateTime')
get sortedControllers() {
return this.model.controllers.sortBy('updateTime').reverse();
}
@computed('model.nodes.@each.updateTime')
get sortedNodes() {
return this.model.nodes.sortBy('updateTime').reverse();
}
@action
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation);
}
}