vault/ui/lib/kv/addon/routes.js
claire bontempo 42a337410f
UI: add copyable paths for CLI and API commands to kv v2 (#22551)
* add paths route

* WIP copy secret path component

* wip component

* ad v1

* use each-in to iterate over info table row

* update copy

* add commands to kv paths page

* add comments

* WIP tests

* finish tests

* remove version, address comments and use path arg directly remove secret

* update copy

* fix typo for perms

* remove destructuring, that was confusing

* add changelog

* add secure protocal
2023-08-25 09:03:46 -07:00

27 lines
876 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import buildRoutes from 'ember-engines/routes';
export default buildRoutes(function () {
// There are two list routes because Ember won't let a route param (e.g. *path_to_secret) be blank.
// :path_to_secret is used when we're listing a secret directory. Example { path: '/:beep%2Fboop%2F/directory' });
this.route('list');
this.route('list-directory', { path: '/:path_to_secret/directory' });
this.route('create');
this.route('secret', { path: '/:name' }, function () {
this.route('paths');
this.route('details', function () {
this.route('edit'); // route to create new version of a secret
});
this.route('metadata', function () {
this.route('edit');
this.route('versions');
this.route('diff');
});
});
this.route('configuration');
});