mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 15:11:07 +02:00
* title case all Secrets to route secret breadcrumbs * fix kv navigation test * welp missed some kv tests
34 lines
929 B
JavaScript
34 lines
929 B
JavaScript
/**
|
|
* 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 { hash } from 'rsvp';
|
|
|
|
@withConfig('kubernetes/config')
|
|
export default class KubernetesOverviewRoute extends Route {
|
|
@service store;
|
|
@service secretMountPath;
|
|
|
|
async model() {
|
|
const backend = this.secretMountPath.currentPath;
|
|
return hash({
|
|
promptConfig: this.promptConfig,
|
|
backend: this.modelFor('application'),
|
|
roles: this.store.query('kubernetes/role', { backend }).catch(() => []),
|
|
});
|
|
}
|
|
|
|
setupController(controller, resolvedModel) {
|
|
super.setupController(controller, resolvedModel);
|
|
|
|
controller.breadcrumbs = [
|
|
{ label: 'Secrets', route: 'secrets', linkExternal: true },
|
|
{ label: resolvedModel.backend.id },
|
|
];
|
|
}
|
|
}
|