mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-22 11:11:26 +01:00
* title case all Secrets to route secret breadcrumbs * fix kv navigation test * welp missed some kv tests
28 lines
819 B
JavaScript
28 lines
819 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { service } from '@ember/service';
|
|
|
|
export default class TidyAutoIndexRoute extends Route {
|
|
@service secretMountPath;
|
|
@service store;
|
|
|
|
// inherits model from tidy/auto
|
|
|
|
setupController(controller, resolvedModel) {
|
|
// autoTidyConfig id is the backend path
|
|
const { id: backend } = resolvedModel;
|
|
super.setupController(...arguments);
|
|
controller.breadcrumbs = [
|
|
{ label: 'Secrets', route: 'secrets', linkExternal: true },
|
|
{ label: this.secretMountPath.currentPath, route: 'overview', model: backend },
|
|
{ label: 'tidy', route: 'tidy.index', model: backend },
|
|
{ label: 'auto' },
|
|
];
|
|
controller.title = this.secretMountPath.currentPath;
|
|
}
|
|
}
|