mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
* First pass at global token creation and regional awareness at token fetch time * Reset and refetch token when you switch region but stay in place * Ugly and functional global token save * Tests and log cleanup
29 lines
734 B
JavaScript
29 lines
734 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { inject as service } from '@ember/service';
|
|
import Route from '@ember/routing/route';
|
|
import RSVP from 'rsvp';
|
|
import WithForbiddenState from 'nomad-ui/mixins/with-forbidden-state';
|
|
import notifyForbidden from 'nomad-ui/utils/notify-forbidden';
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
@classic
|
|
export default class ClientsRoute extends Route.extend(WithForbiddenState) {
|
|
@service store;
|
|
@service system;
|
|
|
|
beforeModel() {
|
|
return this.get('system.leader');
|
|
}
|
|
|
|
model() {
|
|
return RSVP.hash({
|
|
nodes: this.store.findAll('node'),
|
|
nodePools: this.store.findAll('node-pool'),
|
|
}).catch(notifyForbidden(this));
|
|
}
|
|
}
|