-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Fix KV v2 json editor #24224
UI: Fix KV v2 json editor #24224
Conversation
Build Results: |
|
||
constructor() { | ||
super(...arguments); | ||
this.originalSecret = JSON.stringify(this.args.secret.secretData || {}); | ||
if (this.originalSecret.lastIndexOf('{') > 0) { | ||
// Dumb way to check if there's a nested object in the secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work fixing this! 👏
) * Fix JSON editor in KVv2 unable to paste. Fixes hashicorp#23940 * Default to JSON view on edit with secret is complex * Add changelog
After the KV V2 refactor, there was strange behavior when attempting to paste into the JSON editor as described in #23940. This PR fixes that issue, and restores previous behavior where the edit mode defaulted to JSON when the KV secret is "complex" (has nested objects within it).