mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
29 lines
1 KiB
JavaScript
29 lines
1 KiB
JavaScript
import Route from '@ember/routing/route';
|
|
import { service } from '@ember/service';
|
|
|
|
export default class PkiIssuerSignRoute extends Route {
|
|
@service store;
|
|
@service secretMountPath;
|
|
@service pathHelp;
|
|
|
|
beforeModel() {
|
|
// Must call this promise before the model hook otherwise it doesn't add OpenApi to record.
|
|
return this.pathHelp.getNewModel('pki/sign-intermediate', this.secretMountPath.currentPath);
|
|
}
|
|
|
|
model() {
|
|
const { issuer_ref } = this.paramsFor('issuers/issuer');
|
|
return this.store.createRecord('pki/sign-intermediate', { issuerRef: issuer_ref });
|
|
}
|
|
setupController(controller, resolvedModel) {
|
|
super.setupController(controller, resolvedModel);
|
|
const backend = this.secretMountPath.currentPath || 'pki';
|
|
controller.breadcrumbs = [
|
|
{ label: 'secrets', route: 'secrets', linkExternal: true },
|
|
{ label: backend, route: 'overview' },
|
|
{ label: 'issuers', route: 'issuers.index' },
|
|
{ label: resolvedModel.issuerRef, route: 'issuers.issuer.details' },
|
|
{ label: 'sign intermediate' },
|
|
];
|
|
}
|
|
}
|