mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
25 lines
628 B
JavaScript
25 lines
628 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
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.id);
|
|
}
|
|
}
|