-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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/kv codemirror diff #13000
UI/kv codemirror diff #13000
Conversation
…d to return the version data.
@@ -1,4 +1,21 @@ | |||
import Component from '@ember/component'; |
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.
only change is glimmerized this component. I was originally here thinking I'd modify this component. In the end I didn't use this component, but played boy scout and "left it better than I found it."
color: $ui-gray-010; | ||
} | ||
} | ||
|
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.
over-riding the jsondiffpatch colors. We wanted a specific red and green to match the reds and greens we use in the app. confirmed colors with design.
@@ -1,32 +1,34 @@ | |||
{{#if showToolbar }} |
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.
this diff looks strange, but I think when this was last worked on the developer had their tab settings at 4. I changed the file tab settings to 2 to match the code base and this was the resulting diff. If you're nervous checkout the file in the branch and double check.
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.
I appreciate all of your notes! 😍
@@ -1,7 +1,7 @@ | |||
import { isPresent, fillable, clickable } from 'ember-cli-page-object'; | |||
|
|||
export default { | |||
showsJsonViewer: isPresent('[data-test-json-viewer]'), | |||
showsJsonViewer: isPresent('[data-test-component="json-editor"]'), |
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.
because of changing the component to glimmer, this was wrapped around the component, but now that it's glimmer that doesn't work.
@@ -11,7 +11,6 @@ | |||
<div class="control-group-success {{if unwrapData 'is-editor'}}"> | |||
<div class="has-copy-button"> | |||
<JsonEditor | |||
data-test-json-viewer |
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.
removing because this component has been changed to glimmer.
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.
Well done! This is awesome :)
Adding a Diff view for the KV2 secrets engine.
See video for the diff view. It only shows if you have read access and more than 1 version of a secret. If you have deleted or destroyed a secret it will show null on page load and then not let you select that secret version. The icons in the version dropdown help you understand the secret's status.
To add this feature I added a new route and new component. I had played with extending the json-editor component that we currently use with codemirror, but that proved too messy. Additional we use a different library (jsonDiffPatch, used by another Hashicorp product) instead of codemirror because of dependency loading issues.
Screen.Recording.2021-11-29.at.03.12.39.PM.mp4