open-nomad/ui/app/routes/variables/variable.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
658 B
JavaScript
Raw Normal View History

import Route from '@ember/routing/route';
import withForbiddenState from 'nomad-ui/mixins/with-forbidden-state';
import { inject as service } from '@ember/service';
import notifyForbidden from 'nomad-ui/utils/notify-forbidden';
export default class VariablesVariableRoute extends Route.extend(
withForbiddenState
) {
@service store;
model(params) {
return this.store
.findRecord('variable', decodeURIComponent(params.id), {
reload: true,
})
.catch(notifyForbidden(this));
}
setupController(controller) {
super.setupController(controller);
controller.set('params', this.paramsFor('variables.variable'));
}
}