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
Add IP Prefix Aggregation-based Visualization #173474
Conversation
💚 CLA has been signed |
CLA has been signed now. |
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
/ci |
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.
Hey, thanx a lot for your contribution! Some comments from my side:
- Clicking on the chart results to an error page. We should fix this by creating either the correct filter or by disabling the creation of this filter for this aggregation. I think the first is the best path forward
- Same thing happens when I add the new aggregation on the breakdown and try to filter in/out from the legend
src/plugins/vis_default_editor/public/components/agg_params_map.ts
Outdated
Show resolved
Hide resolved
Okay thank you for all of the feedback @stratoula! I'll work on these fixes & let you know when they are ready for review again |
to pass the prefixLength and isIpv6 toggle to the backend form
for the UI fields
Still working on a couple more items to make this PR ready for review again:
|
@elasticmachine merge upstream |
/ci |
Guess I can't trigger the CI 😅 Also seems like I can't access any of the Buildkite urls as a non-elastic employee; however, I did run the tests for the data plugin locally and all seems to pass. Will see what the CI says. Couple notes now that I think this is ready for review again:
|
May need to also update this page of the docs https://github.com/elastic/kibana/blob/main/docs%2Fuser%2Fdashboard%2Fcreate-panels-with-editors.asciidoc |
@elasticmachine merge upstream |
@stratoula thank you for all of your feedback so far on the PR. I believe I have addressed all of your last round of comments. A couple notes:
|
@ION28 thanx a ton! I am running the CI and I will do another round of review/test in a while. |
/ci |
I think it is fine for now, I feel that this is an edge case. We will see how users interact with it and if they fall in this problem often and we will figure out something. I really hope that it is going to be used by users who understand that the ipv6 switch should be set ti true in case of ipv6 addresses. |
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.
src/plugins/data/common/search/aggs/buckets/create_filter/ip_prefix.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
I finally figured out how to run at least some of the CI checks on my local machine since I can't get buildkite to work on my own account. I'm hoping there's no CI problems this time around finally 😅 It passes the jest tests for src/plugins/data and src/plugins/vis_default_editor/ on my box as well as scripts/type_check.js and others in that folder that I ran. Let me know if there's anything else you'd like me to address @stratoula . Thank you again for all of your feedback thus far! |
/ci |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: |
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 looks great 🎉 Thanx @ION28 for all your effort and patience! LGTM
@elasticmachine run elasticsearch-ci/docs |
2 similar comments
@elasticmachine run elasticsearch-ci/docs |
@elasticmachine run elasticsearch-ci/docs |
Admin-merging as per request, it seems we can't trigger the |
## Summary Closes elastic#156121 This PR is for Issue elastic#156121 and adds the ability to perform [IP Prefix](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-ipprefix-aggregation.html) aggregation-based visualizations within the Kibana UI. Previously this aggregation could only be done in DevTools as a manual query to Elasticsearch and not visualized. ![image](https://github.com/elastic/kibana/assets/3931697/7e049da9-fd42-41f6-bbaf-99d3d6cb0790) ![image](https://github.com/elastic/kibana/assets/3931697/dcfae012-9d06-4346-9118-3965434ff8b8) ### Various Notes * The following two folders & their subfolders had files modified for this * src/plugins/vis_default_editor/public/components * src/plugins/data/common/search/aggs * I spent a fair amount of time debating & attempting to build the PrefixLength Input boxes and their interplay with the is_ipv6 toggle button. Originally I tried having only 1 PrefixLength button that the toggle switch would modify the max value / validate the contents of. * In the end, it seemed much cleaner & straightforward to have two separate input boxes (both prefix_length.tsx components) and just create them with different options. This means that when a user toggles the switch back and forth, they would be seeing/editing two different Prefix Length boxes depending on which way the switch is. * To make it a little more clear they are different boxes, I put "IPv4" and "IPv6" in the label name for these boxes. Additionally, I think it is helpful this way if you are potentially swapping back and forth between v4 and v6 visualizations. * There is 4 new unit tests, all related to input options, added in the ip_prefix_fn.test.ts file * Note - here is a test CSV file of IPv4 addresses one could import to test locally and see this addition. [alphadataset.csv](https://github.com/elastic/kibana/files/13691358/alphadataset.csv) * Configure the Override settings in this way if uploading it to Kibana/Elastic * ![image](https://github.com/elastic/kibana/assets/3931697/34ce701a-f4d5-4107-8a08-c6195e21c169) ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Closes #156121
This PR is for Issue #156121 and adds the ability to perform IP Prefix aggregation-based visualizations within the Kibana UI. Previously this aggregation could only be done in DevTools as a manual query to Elasticsearch and not visualized.
Various Notes
alphadataset.csv
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers