Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Secret Change Review w/ JsonDiffPatch #52

Closed
tallpauley opened this issue Feb 14, 2017 · 3 comments
Closed

Secret Change Review w/ JsonDiffPatch #52

tallpauley opened this issue Feb 14, 2017 · 3 comments
Assignees

Comments

@tallpauley
Copy link
Collaborator

tallpauley commented Feb 14, 2017

I think it'd be great to have an option for an additional modal after editing a secret or policy (or any JSON for that matter) that shows a diff of the changes w/ jsondiffpatch.

The option would also change the edit modal's "SUBMIT" text to "REVIEW", and then the following modal with the diff would have "CANCEL" and "SUBMIT".

I think this would be a nice option to limit potential dangerous mistakes. I might have some time to work on this one soon, it's a building block for my use case of vault as a decent UI password manager.

@msessa
Copy link
Collaborator

msessa commented Feb 15, 2017

interesting idea. would like to see it implemented

@Lucretius
Copy link
Collaborator

Lucretius commented Mar 31, 2017

Found this gathering dust at the bottom of the issue bin and decided to have a go at it.

I've created a branch with the following:

screen shot 2017-03-31 at 1 18 20 am

If no difference is found you just get

screen shot 2017-03-31 at 1 21 40 am

Someone was kind enough to port the jsondiffpatch into React with some annotated JSON viewer. I've included a toggle so you can show and hide as desired. I've opted to place the differ within the JsonEditor component itself, as the diffing mechanism is tied directly to the editor.

I will have a PR up soon.

@Lucretius Lucretius self-assigned this Mar 31, 2017
@tallpauley
Copy link
Collaborator Author

lgtm, lets close this since the PR was already merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants