vault/ui/lib/kmip/addon/routes/role.js
Angel Garbarino a257cbab11
UI/vault 7613/flaky test glimmerize confirm action (#16684)
* wip

* fix missing doc and therefor goose chase for what buttonClasses was

* glimmerize kmip role route which is the location of where the flaky test (some) are failing

* blah to un updated docs. Add a param, add to docs

* glimmerize header credential

* pr review changes

* fix super
2022-08-15 10:06:30 -06:00

27 lines
710 B
JavaScript

import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class KmipRoleRoute extends Route {
@service store;
@service secretMountPath;
@service pathHelp;
beforeModel() {
return this.pathHelp.getNewModel('kmip/role', this.secretMountPath.currentPath);
}
model(params) {
return this.store.queryRecord('kmip/role', {
backend: this.secretMountPath.currentPath,
scope: params.scope_name,
id: params.role_name,
});
}
setupController(controller) {
super.setupController(...arguments);
let { scope_name: scope, role_name: role } = this.paramsFor('role');
controller.setProperties({ role, scope });
}
}