-
Notifications
You must be signed in to change notification settings - Fork 916
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
Feature: Dev Tools Query Export/Import #3810
Feature: Dev Tools Query Export/Import #3810
Conversation
@kishor82 Thanks! I see this involves some new UI changes. To help our UX designers review those flows, can you please add some screenshots or screencasts that demo the new feature? |
Codecov Report
@@ Coverage Diff @@
## main #3810 +/- ##
==========================================
+ Coverage 66.45% 66.49% +0.04%
==========================================
Files 3399 3402 +3
Lines 64915 65011 +96
Branches 10387 10401 +14
==========================================
+ Hits 43141 43232 +91
- Misses 19210 19211 +1
- Partials 2564 2568 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@joshuarrrr Please let me know if you have any further feedback or suggestions. Thank you for taking the time to review my work. dev-tool.mp4 |
460c061
to
5f90ef5
Compare
@KrooshalUX or @kgcreative can you review the new UI in the screencast above? |
5f90ef5
to
f132c60
Compare
f132c60
to
8e08282
Compare
e4a357f
to
1a6b993
Compare
LGTM - @KrooshalUX -- any recommendations or concerns? |
938c365
to
89aa76a
Compare
@ashwin-pc, the link checker step is failing for my PR, and I'm not sure what's causing it to fail. Can you help me troubleshoot this issue? |
Ohh, I think it's failing because https://www.circl.lu/doc/misp/ is not reachable right now. |
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.
Really nice job with the PR. The changes look good to me and nice coverage with tests. The only real concern i had is with the name of the export but that can be addressed in a followup PR too.
Note: I'd suggest adding a screen recording or screenshots in future PR's to speed up the review proces since without them I ususally have to pull down the change and validate the change myself. Tagging @kgcreative to take a look at the UX changes from this PR, just to make sure there arent any issues with the new UX.
const results = await objectStorageClient.text.findAll(); | ||
const senseData = results.sort((a, b) => a.createdAt - b.createdAt)[0]; | ||
const blob = new Blob([JSON.stringify(senseData || {})], { type: 'application/json' }); | ||
saveAs(blob, 'sense.json'); |
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.
Why is this named sense.json
?
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.
At the time, no other name really came to mind, and I had a good experience with the 'Sense' Chrome extension for Elasticsearch queries, so I went with 'sense.json'! 😄
|
||
it('should call onConfirm when clicking the "Overwrite" button', () => { | ||
act(() => { | ||
// @ts-ignore |
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.
nit: Why the ts-ignore?
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 saw a similar test in an existing plugin that used @ts-ignore. I tried various approaches but couldn't get it to work, so I added @ts-ignore. I'll keep trying to fix it.
LGTM! I would eventually love to be able to save this as a local view, or as a saved object (similar to a discover saved search) -- but I think for now this works! |
@kishor82 I wouldn't worry about the link checker since it's unrelated to your change and is something thats probably already fixed in main by now. |
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
…zyme test suites. Signed-off-by: kishor82 <[email protected]>
Signed-off-by: kishor82 <[email protected]>
…ations Signed-off-by: kishor82 <[email protected]>
00698cc
to
680fca8
Compare
* feat: Add export functionality for dev tool queries Signed-off-by: kishor82 <[email protected]> * feat: Add import functionality for dev tool queries Signed-off-by: kishor82 <[email protected]> * update: changelog. Signed-off-by: kishor82 <[email protected]> * feat: updated license headers for new file. Signed-off-by: kishor82 <[email protected]> * fix: typo:ImportFlyout and removed ImportModeControl prop (isLegacyFile) Signed-off-by: kishor82 <[email protected]> * fix: default query export Signed-off-by: kishor82 <[email protected]> * fix: added basic text validation for imported file. Signed-off-by: kishor82 <[email protected]> * update: removed legacy variable export. Signed-off-by: kishor82 <[email protected]> * test: Add unit tests for OverwriteModal component Signed-off-by: kishor82 <[email protected]> * test: Add unit tests for ImportModeControl component Signed-off-by: kishor82 <[email protected]> * test: Add unit tests for ImportFlyout component Signed-off-by: kishor82 <[email protected]> * test: updated unit tests for ImportFlyout component Signed-off-by: kishor82 <[email protected]> * test: Enhance async operation handling and complete async cycle in Enzyme test suites. Signed-off-by: kishor82 <[email protected]> * test: Enhanced test coverage for ImportFlyout component unit tests Signed-off-by: kishor82 <[email protected]> * fix: Add 'http' property to serviceContextMock and update test expectations Signed-off-by: kishor82 <[email protected]> --------- Signed-off-by: kishor82 <[email protected]> (cherry picked from commit 56dd85b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat: Add export functionality for dev tool queries Signed-off-by: kishor82 <[email protected]> * feat: Add import functionality for dev tool queries Signed-off-by: kishor82 <[email protected]> * update: changelog. Signed-off-by: kishor82 <[email protected]> * feat: updated license headers for new file. Signed-off-by: kishor82 <[email protected]> * fix: typo:ImportFlyout and removed ImportModeControl prop (isLegacyFile) Signed-off-by: kishor82 <[email protected]> * fix: default query export Signed-off-by: kishor82 <[email protected]> * fix: added basic text validation for imported file. Signed-off-by: kishor82 <[email protected]> * update: removed legacy variable export. Signed-off-by: kishor82 <[email protected]> * test: Add unit tests for OverwriteModal component Signed-off-by: kishor82 <[email protected]> * test: Add unit tests for ImportModeControl component Signed-off-by: kishor82 <[email protected]> * test: Add unit tests for ImportFlyout component Signed-off-by: kishor82 <[email protected]> * test: updated unit tests for ImportFlyout component Signed-off-by: kishor82 <[email protected]> * test: Enhance async operation handling and complete async cycle in Enzyme test suites. Signed-off-by: kishor82 <[email protected]> * test: Enhanced test coverage for ImportFlyout component unit tests Signed-off-by: kishor82 <[email protected]> * fix: Add 'http' property to serviceContextMock and update test expectations Signed-off-by: kishor82 <[email protected]> --------- Signed-off-by: kishor82 <[email protected]> (cherry picked from commit 56dd85b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat: Add export functionality for dev tool queries * feat: Add import functionality for dev tool queries * update: changelog. * feat: updated license headers for new file. * fix: typo:ImportFlyout and removed ImportModeControl prop (isLegacyFile) * fix: default query export * fix: added basic text validation for imported file. * update: removed legacy variable export. * test: Add unit tests for OverwriteModal component * test: Add unit tests for ImportModeControl component * test: Add unit tests for ImportFlyout component * test: updated unit tests for ImportFlyout component * test: Enhance async operation handling and complete async cycle in Enzyme test suites. * test: Enhanced test coverage for ImportFlyout component unit tests * fix: Add 'http' property to serviceContextMock and update test expectations --------- (cherry picked from commit 56dd85b) Signed-off-by: kishor82 <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat: Add export functionality for dev tool queries * feat: Add import functionality for dev tool queries * update: changelog. * feat: updated license headers for new file. * fix: typo:ImportFlyout and removed ImportModeControl prop (isLegacyFile) * fix: default query export * fix: added basic text validation for imported file. * update: removed legacy variable export. * test: Add unit tests for OverwriteModal component * test: Add unit tests for ImportModeControl component * test: Add unit tests for ImportFlyout component * test: updated unit tests for ImportFlyout component * test: Enhance async operation handling and complete async cycle in Enzyme test suites. * test: Enhanced test coverage for ImportFlyout component unit tests * fix: Add 'http' property to serviceContextMock and update test expectations --------- (cherry picked from commit 56dd85b) Signed-off-by: kishor82 <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Add support for exporting and restoring the history of commands in Dev Tools #3767
Screenshot
Screen.Recording.2023-09-07.at.6.37.35.PM.mov
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr