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

UI: Allow navigate to list from View Secret card #22502

Merged
merged 10 commits into from
Aug 23, 2023

Conversation

hashishaw
Copy link
Contributor

Before this fix, the View Secret card that shows when no LIST permissions on a KV engine would only navigate to the show secret page.
View secret card on KV list view

With this update, if the input ends in a slash the button will update to say "View list" and it will take you to the correct subdirectory in KV:
Button text updates when input ends with /
From the linked list page, it prefills the textbox and the user can type in the rest of the path

I also changed the way the form is triggered, so that it will trigger both on button click and "Enter" key (like a normal form)

Fixes #20563

@hashishaw hashishaw added this to the 1.12.10 milestone Aug 22, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 22, 2023

get buttonText() {
if (this.args.type === 'secret') {
if (this.secret.endsWith('/')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know endsWith() was a thing!! So cool 🤩

@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 Thanks for tackling!

@hashishaw
Copy link
Contributor Author

Can only backport as far as 1.13 because the base changes in GetCredentialsCard are not present in 1.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kv2 inconsistent path segment list/show
2 participants