Conversation
|
Build Results: |
|
CI Results: |
There was a problem hiding this comment.
Great work! Excellent PR description, thanks for including screenshots. 📸
I think this is nearly there! There is a bug when there's a linting error and the user toggles to the key/value view. The wrap data button is disabled and the linting errors get a little wonky. We also want to be consistent with the type for this.wrapData. I offered a couple suggestions of either initializing it as null or an {}. Let me know if you want to discuss more at all or have any questions 😄
hellobontempo
left a comment
There was a problem hiding this comment.
Excellent work! 👏 Just a small ember syntax fix and a couple test changes.
| that contains | ||
| some seriously important config`; | ||
| const flashSpy = sinon.spy(this.owner.lookup('service:flash-messages'), 'success'); | ||
| const updatedWrapData = JSON.stringify({ |
There was a problem hiding this comment.
Is there a reason to stringify? We can just compare the two objects below, right? (Instead of need to call JSON.parse() on 145)
|
🤩 thank you!! |
* add kv view for wrap tool * add changelog entry * update toggle and tests * update changelog, style updates, fix linting error bug * update tests * update test to include multiline input * clean up * test improvements and clean up * shift away from disabling button on error * update test for json lint warning * add check after back * move assertions to a better test for them
* add kv view for wrap tool * add changelog entry * update toggle and tests * update changelog, style updates, fix linting error bug * update tests * update test to include multiline input * clean up * test improvements and clean up * shift away from disabling button on error * update test for json lint warning * add check after back * move assertions to a better test for them
Description
This PR adds a KV view to the wrap tool based off the existing pattern when creating KV secrets. This resolves #28579. The default view is the still the JSON editor, but can be toggled between the two views while retaining input.
This also shifts from disabling the wrap button when there are errors to displaying a warning message while leaving the button enabled.
Previous:

Current:



Current with Warning:
TODO only if you're a HashiCorp employee
backport/label that matches the desired release branch. Note that in the CE repo, the latest release branch will look likebackport/x.x.x, but older release branches will bebackport/ent/x.x.x+ent.of a public function, even if that change is in a CE file, double check that
applying the patch for this PR to the ENT repo and running tests doesn't
break any tests. Sometimes ENT only tests rely on public functions in CE
files.
in the PR description, commit message, or branch name.
description. Also, make sure the changelog is in this PR, not in your ENT PR.