1cca7abcab
This is extracted from #8094, where I have run into some snags. Since these ESLint fixes aren’t actually connected to the Ember 3.16 update but involve changes to many files, we might as well address them separately. Where possible I fixed the problems but in cases where a fix seemed too involved, I added per-line or -file exceptions.
29 lines
679 B
JavaScript
29 lines
679 B
JavaScript
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';
|
|
|
|
export default Route.extend(WithForbiddenState, {
|
|
store: service(),
|
|
system: service(),
|
|
|
|
breadcrumbs: Object.freeze([
|
|
{
|
|
label: 'Servers',
|
|
args: ['servers.index'],
|
|
},
|
|
]),
|
|
|
|
beforeModel() {
|
|
return this.get('system.leader');
|
|
},
|
|
|
|
model() {
|
|
return RSVP.hash({
|
|
nodes: this.store.findAll('node'),
|
|
agents: this.store.findAll('agent'),
|
|
}).catch(notifyForbidden(this));
|
|
},
|
|
});
|