-
Notifications
You must be signed in to change notification settings - Fork 8.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
[SIEM][Detections] Value Lists Management Modal #67068
Commits on Jul 1, 2020
-
Add Frontend components for Value Lists Management Modal
Imports and uses the hooks provided by the lists plugin. Tests coming next.
Configuration menu - View commit details
-
Copy full SHA for f807600 - Browse repository at this point
Copy the full SHA f807600View commit details -
Update value list components to use newest Lists API
* uses useEffect on a task's state instead of promise chaining * handles the fact that API calls can be rejected with strings * uses exportList function instead of hook
Configuration menu - View commit details
-
Copy full SHA for cc34d86 - Browse repository at this point
Copy the full SHA cc34d86View commit details -
Configuration menu - View commit details
-
Copy full SHA for af6a86e - Browse repository at this point
Copy the full SHA af6a86eView commit details -
Add hook for using a cursor with paged API calls.
For e.g. findLists, we can send along a cursor to optimize our query. On the backend, this cursor is used as part of a search_after query.
Configuration menu - View commit details
-
Copy full SHA for bf7fb72 - Browse repository at this point
Copy the full SHA bf7fb72View commit details -
Better implementation of useCursor
* Does not require args for setCursor as they're already passed to the hook * Finds nearest cursor for the same page size Eventually this logic will also include sortField as part of the hash/lookup, but we do not currently use that on the frontend.
Configuration menu - View commit details
-
Copy full SHA for 38fa27c - Browse repository at this point
Copy the full SHA 38fa27cView commit details -
Fixes useCursor hook functionality
We were previously storing the cursor on the _current_ page, when it's only truly valid for the _next_ page (and beyond). This was causing a few issues, but now that it's fixed everything works great.
Configuration menu - View commit details
-
Copy full SHA for b606f57 - Browse repository at this point
Copy the full SHA b606f57View commit details -
This allows us to search_after a previous page's search, if available.
Configuration menu - View commit details
-
Copy full SHA for ce1edb2 - Browse repository at this point
Copy the full SHA ce1edb2View commit details -
Do not validate response of export
This is just a blob, so we have nothing to validate.
Configuration menu - View commit details
-
Copy full SHA for e39116c - Browse repository at this point
Copy the full SHA e39116cView commit details -
Fix double callback post-import
After uploading a list, the modal was being shown twice. Declaring the constituent state dependencies separately fixed the issue.
Configuration menu - View commit details
-
Copy full SHA for df70e5c - Browse repository at this point
Copy the full SHA df70e5cView commit details -
Update ValueListsForm to manually abort import request
These hooks no longer care about/expose an abort function. In this one case where we need that functionality, we can do it ourselves relatively simply.
Configuration menu - View commit details
-
Copy full SHA for 344b81c - Browse repository at this point
Copy the full SHA 344b81cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23fd1ee - Browse repository at this point
Copy the full SHA 23fd1eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3670ea - Browse repository at this point
Copy the full SHA e3670eaView commit details -
Try to fit table contents on a single row
Dates were wrapping (and raw), and so were wrapped in a FormattedDate component. However, since this component didn't wrap, we needed to shrink/truncate the uploaded_by field as well as allow the fileName to truncate.
Configuration menu - View commit details
-
Copy full SHA for c36e959 - Browse repository at this point
Copy the full SHA c36e959View commit details
Commits on Jul 2, 2020
-
Add helper function to prevent tests from logging errors
enzymejs/enzyme#2073 seems to be an ongoing issue, and causes components with useEffect to update after the test is completed. waitForUpdates ensures that updates have completed within an act() before continuing on.
Configuration menu - View commit details
-
Copy full SHA for 312fbde - Browse repository at this point
Copy the full SHA 312fbdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9587b7e - Browse repository at this point
Copy the full SHA 9587b7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab66483 - Browse repository at this point
Copy the full SHA ab66483View commit details -
Merge branch 'master' into value_lists_ui
Conflicts: x-pack/plugins/security_solution/public/lists_plugin_deps.ts x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx
Configuration menu - View commit details
-
Copy full SHA for 7789c91 - Browse repository at this point
Copy the full SHA 7789c91View commit details -
Add more waitForUpdates to new overview page tests
Each of these logs a console.error without them.
Configuration menu - View commit details
-
Copy full SHA for f16cf4e - Browse repository at this point
Copy the full SHA f16cf4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5be0e87 - Browse repository at this point
Copy the full SHA 5be0e87View commit details -
Make cursor an optional parameter to findLists
This param is an optimization and not required for basic functionality.
Configuration menu - View commit details
-
Copy full SHA for 0e4fee7 - Browse repository at this point
Copy the full SHA 0e4fee7View commit details -
Makes actions column smaller, leaving more room for everything else.
Configuration menu - View commit details
-
Copy full SHA for 728b272 - Browse repository at this point
Copy the full SHA 728b272View commit details
Commits on Jul 3, 2020
-
Fix bug where onSuccess is called upon pagination change
Because fetchLists changes when pagination does, and handleUploadSuccess changes with fetchLists, our useEffect in Form was being fired on every pagination change due to its onSuccess changing. The solution in this instance is to remove fetchLists from handleUploadSuccess's dependencies, as we merely want to invoke fetchLists from it, not change our reference.
Configuration menu - View commit details
-
Copy full SHA for 0abbfc4 - Browse repository at this point
Copy the full SHA 0abbfc4View commit details
Commits on Jul 6, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e0cb6a5 - Browse repository at this point
Copy the full SHA e0cb6a5View commit details
Commits on Jul 8, 2020
-
Merge branch 'master' into value_lists_ui
Conflicts: x-pack/plugins/security_solution/public/lists_plugin_deps.ts x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx
Configuration menu - View commit details
-
Copy full SHA for 18459c1 - Browse repository at this point
Copy the full SHA 18459c1View commit details
Commits on Jul 13, 2020
-
Merge branch 'master' into value_lists_ui
Conflicts: x-pack/plugins/lists/public/lists/api.test.ts x-pack/plugins/lists/public/lists/api.ts x-pack/plugins/lists/public/shared_exports.ts x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/form.test.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/form.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/index.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/modal.test.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/modal.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/table.test.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/table.tsx x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/translations.ts x-pack/plugins/security_solution/public/lists_plugin_deps.ts
Configuration menu - View commit details
-
Copy full SHA for 551a435 - Browse repository at this point
Copy the full SHA 551a435View commit details -
It looks like this broke because EuiTable's pagination changed from a button to an anchor tag.
Configuration menu - View commit details
-
Copy full SHA for 8fb7e4c - Browse repository at this point
Copy the full SHA 8fb7e4cView commit details -
Hide page size options on ValueLists modal table
These have style issues, and anything above 5 rows causes the modal to scroll, so we're going to disable it for now.
Configuration menu - View commit details
-
Copy full SHA for e496614 - Browse repository at this point
Copy the full SHA e496614View commit details -
Update error callbacks now that we have Errors
We don't display the nice errors in the case of an ApiError right now, but this is better than it was.
Configuration menu - View commit details
-
Copy full SHA for 3f12007 - Browse repository at this point
Copy the full SHA 3f12007View commit details -
Synchronize delete with the subsequent fetch
Our start() no longer resolves in a meaningful way, so we instead need to perform the refetch in an effect watching the result of our delete.
Configuration menu - View commit details
-
Copy full SHA for bc984c4 - Browse repository at this point
Copy the full SHA bc984c4View commit details
Commits on Jul 14, 2020
-
Cast our unknown error to an Error
useAsync generally does not know how what its tasks are going to be rejected with, hence the unknown. For these API calls we know that it will be an Error, but I don't currently have a way to type that generally. For now, we'll cast it where we use it.
Configuration menu - View commit details
-
Copy full SHA for 66d8241 - Browse repository at this point
Copy the full SHA 66d8241View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59e3b02 - Browse repository at this point
Copy the full SHA 59e3b02View commit details