mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
* add redirect for legacy secrets path * adding changelog Co-authored-by: Dan Rivera <dan.rivera@hashicorp.com>
This commit is contained in:
parent
3457992a63
commit
da1203b3b2
5 changed files with 31 additions and 2 deletions
3
changelog/_10227.txt
Normal file
3
changelog/_10227.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:change
|
||||
ui/secrets: Secrets engines url paths renamed from '/secrets' to '/secrets-engines'
|
||||
```
|
||||
|
|
@ -62,7 +62,7 @@ export default class SecretEngineList extends Component<Args> {
|
|||
{
|
||||
key: 'accessor',
|
||||
label: 'Accessor',
|
||||
width: '150px',
|
||||
width: '175px',
|
||||
},
|
||||
{
|
||||
key: 'description',
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ Router.map(function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
this.route('secrets-redirect', { path: '/secrets' }); // legacy redirect
|
||||
this.route('secrets', { path: '/secrets-engines' }, function () {
|
||||
this.route('enable', function () {
|
||||
// TODO: Revisit path on create once components are separated - should we specify selected type or just keep it generic as /create?
|
||||
|
|
|
|||
16
ui/app/routes/vault/cluster/secrets-redirect.js
Normal file
16
ui/app/routes/vault/cluster/secrets-redirect.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
import Route from '@ember/routing/route';
|
||||
import { service } from '@ember/service';
|
||||
|
||||
export default class SecretsRedirectRoute extends Route {
|
||||
@service router;
|
||||
|
||||
beforeModel() {
|
||||
// Redirect to secrets page under /secrets-engines
|
||||
// if the user navigates to the legacy path /secrets
|
||||
this.router.replaceWith('vault.cluster.secrets');
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
import { settled, click, visit } from '@ember/test-helpers';
|
||||
import { settled, click, visit, currentURL } from '@ember/test-helpers';
|
||||
import { module, test } from 'qunit';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
|
@ -107,4 +107,13 @@ module('Acceptance | cluster', function (hooks) {
|
|||
.dom('[data-test-resultant-acl-banner]')
|
||||
.includesText(expectedText, 'Resultant ACL banner shows appropriate message for OSS/Enterprise');
|
||||
});
|
||||
|
||||
test('redirects to secret-engines from legacy /secrets path', async function (assert) {
|
||||
await visit('/vault/secrets');
|
||||
assert.strictEqual(
|
||||
currentURL(),
|
||||
'/vault/secrets-engines',
|
||||
'Navigating to /secrets redirects to /secrets-engines'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue