mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
* add config directory, rename crl and urls models * fix imports * add cluster config fields to edit form * reorder url save * update tests * add to details page * add details test; * fix adapter name * fix cluster adapter test name * combine adapter tests * update imports * fix git diff * move crl and urls adapters to config folder * add config file * woops add config adapter * final renaming!! * fix imports after naming to base * add cluster to beforeModel hook * hide help text * maybe you should write tests that actually pass, claire * seriously claire its embarrassing
34 lines
941 B
JavaScript
34 lines
941 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { inject as service } from '@ember/service';
|
|
import { withConfirmLeave } from 'core/decorators/confirm-leave';
|
|
|
|
@withConfirmLeave('model.config', ['model.urls', 'model.crl'])
|
|
export default class PkiConfigurationEditRoute extends Route {
|
|
@service secretMountPath;
|
|
|
|
model() {
|
|
const { cluster, urls, crl, engine } = this.modelFor('configuration');
|
|
return {
|
|
engineId: engine.id,
|
|
cluster,
|
|
urls,
|
|
crl,
|
|
};
|
|
}
|
|
|
|
setupController(controller, resolvedModel) {
|
|
super.setupController(controller, resolvedModel);
|
|
controller.breadcrumbs = [
|
|
{ label: 'secrets', route: 'secrets', linkExternal: true },
|
|
{ label: this.secretMountPath.currentPath, route: 'overview' },
|
|
{ label: 'configuration', route: 'configuration.index' },
|
|
{ label: 'edit' },
|
|
];
|
|
}
|
|
}
|