Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transit Active Tab #25614

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/25614.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fixes issue with no active tab when viewing transit encryption key
```
2 changes: 1 addition & 1 deletion ui/app/components/transit-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default Component.extend(FocusOnInsertMixin, {
'save',
() => {
this.hasDataChanges();
this.transitionToRoute(SHOW_ROUTE, keyId);
this.transitionToRoute(SHOW_ROUTE, keyId, { queryParams: { tab: 'details' } });
},
type === 'create'
);
Expand Down
8 changes: 7 additions & 1 deletion ui/app/templates/components/transit-form-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@
</div>
{{/if}}
<div class="control">
<Hds::Button @text="Cancel" @color="secondary" @route="vault.cluster.secrets.backend.show" @model={{@key.id}} />
<Hds::Button
@text="Cancel"
@color="secondary"
@route="vault.cluster.secrets.backend.show"
@model={{@key.id}}
@query={{hash tab="details"}}
/>
</div>
</div>
{{#if (and @key.canDelete @capabilities.canDelete)}}
Expand Down
6 changes: 5 additions & 1 deletion ui/tests/acceptance/transit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ module('Acceptance | transit (flaky)', function (hooks) {
await click('[data-test-toggle-label="Auto-rotation period"]');
await click(SELECTORS.form('create'));

assert.strictEqual(currentURL(), `/vault/secrets/${this.path}/show/${name}`, 'it navigates to show page');
assert.strictEqual(
currentURL(),
`/vault/secrets/${this.path}/show/${name}?tab=details`,
'it navigates to show page'
);
assert.dom(SELECTORS.infoRow('Auto-rotation period')).hasText('30 days');
assert.dom(SELECTORS.infoRow('Deletion allowed')).hasText('false');
assert.dom(SELECTORS.infoRow('Derived')).hasText('Yes');
Expand Down
Loading