open-nomad/ui/app/controllers/csi/plugins/plugin/index.js
2020-05-18 22:48:23 -07:00

19 lines
542 B
JavaScript

import Controller from '@ember/controller';
import { computed } from '@ember/object';
export default Controller.extend({
sortedControllers: computed('model.controllers.@each.updateTime', function() {
return this.model.controllers.sortBy('updateTime').reverse();
}),
sortedNodes: computed('model.nodes.@each.updateTime', function() {
return this.model.nodes.sortBy('updateTime').reverse();
}),
actions: {
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation);
},
},
});