mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 23:21:08 +02:00
* remove named path adapter extension, add subdirectory query logic to adapter * add subdirectory route and logic to page::roles component * fix overview page search select * breadcrumbs * update tests and mirage * revert ss changes * oops * cleanup adapter, add _ for private methods * add acceptance test * remove type * add changelog * add ldap breadcrumb test * VAULT-31905 link jira * update breadcrumbs in Edit route * rename type interfaces
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { service } from '@ember/service';
|
|
import { withConfig } from 'core/decorators/fetch-secrets-engine-config';
|
|
|
|
import type Store from '@ember-data/store';
|
|
import type SecretMountPath from 'vault/services/secret-mount-path';
|
|
import type Transition from '@ember/routing/transition';
|
|
import type LdapConfigModel from 'vault/models/ldap/config';
|
|
import type Controller from '@ember/controller';
|
|
import type { Breadcrumb } from 'vault/vault/app-types';
|
|
|
|
interface RouteController extends Controller {
|
|
breadcrumbs: Array<Breadcrumb>;
|
|
}
|
|
|
|
@withConfig('ldap/config')
|
|
export default class LdapConfigureRoute extends Route {
|
|
@service declare readonly store: Store;
|
|
@service declare readonly secretMountPath: SecretMountPath;
|
|
|
|
declare configModel: LdapConfigModel;
|
|
|
|
model() {
|
|
const backend = this.secretMountPath.currentPath;
|
|
return this.configModel || this.store.createRecord('ldap/config', { backend });
|
|
}
|
|
|
|
setupController(controller: RouteController, resolvedModel: LdapConfigModel, transition: Transition) {
|
|
super.setupController(controller, resolvedModel, transition);
|
|
|
|
controller.breadcrumbs = [
|
|
{ label: 'Secrets', route: 'secrets', linkExternal: true },
|
|
{ label: resolvedModel.backend, route: 'overview' },
|
|
{ label: 'Configure' },
|
|
];
|
|
}
|
|
}
|