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: Add version diff comparison to KV v2 #23200

Merged
merged 13 commits into from Sep 21, 2023

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented Sep 20, 2023

While we had plans to remove this view from the UI, we received helpful feedback here that the diff version comparison was useful. This PR returns this view to the UI, which users can access by navigating to the Version history tab and clicking Version diff > in the toolbar:
diff


The diff comparison defaults to comparing the current secret version with the next latest, active (not deleted or destroyed) secret version. If the current version is deleted or destroyed an empty state message appears prompting the user to select a new secret version. Screenshot 2023-09-20 at 12 44 52 PM

@hellobontempo hellobontempo added ui backport/1.15.x Backport changes to `release/1.15.x` labels Sep 20, 2023
@hellobontempo hellobontempo added this to the 1.15.0 milestone Sep 20, 2023
@hellobontempo hellobontempo marked this pull request as ready for review September 20, 2023 19:45
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Sep 20, 2023
@github-actions
Copy link

github-actions bot commented Sep 20, 2023

Build Results:
All builds succeeded! ✅

`{ \"foo\": \"bar\" }`, // eslint-disable-line no-useless-escape
'correctly pull in the data from version 4 and compared to version 1.'
);
assert.dom(PAGE.diff.deleted).hasText(`foo"bar"`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

case in point: I'd expect this to say hello"world" since the newest version is foo: bar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah - I think this makes a lot of sense!

Copy link
Collaborator

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

Overall great work, very clean!

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link
Collaborator

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

:chefskiss:

@hellobontempo hellobontempo enabled auto-merge (squash) September 21, 2023 16:50
@hellobontempo hellobontempo merged commit 8375149 into main Sep 21, 2023
103 checks passed
@hellobontempo hellobontempo deleted the ui/VAULT-20160/return-version-diff-selector branch September 21, 2023 16:50
raymonstah pushed a commit that referenced this pull request Sep 22, 2023
* add diff route

* add version diff toolbar link

* finish functionality of version diff comparison

* add tests

* update empty state message

* update selectors

* wip tests

* finish test

* add empty state test

* switch dropdowns

* add changelog

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.15.x Backport changes to `release/1.15.x` 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.

None yet

2 participants