-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default editor] EUIficate IP Ranges #36896
[Vis: Default editor] EUIficate IP Ranges #36896
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
Pinging @elastic/kibana-app |
💚 Build Succeeded |
@kertal I created a PR with fix for not clickable button with svg: elastic/eui#1985 |
💚 Build Succeeded |
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.
Functionality LGTM, but I'd like more type safety in the spot I mentioned. We should be avoiding any
types.
|
||
export type InputModel = | ||
| InputModelBase & { [model: string]: InputItem } | ||
| InputModelBase & InputItem; |
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 type is currently meaningless for the reason above- the union of [key: string]: any
and anything else allows all values.
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 unified Mask and FromTo models and updated InputModel
definition. Please take a look.
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.
There seems to be a problem at CIDR mask validation, 0.0.0.0/123d
validates correctly
💚 Build Succeeded |
@kertal thank you for noticing, it was a bug in initial version of |
💚 Build Succeeded |
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.
Thank you for the fixes, Code LGTM, tested in Chrome / Firefox. We should test it again in Safari/IE11 when your EUI fix is released
* Create IpRangeType and IpRanges controls * Add validation * Refactoring * Add behavior when discarding changes * Refactoring: create common input list * Remove old template * Move add btn to input_list, add placeholder * Remove unused directives * Remove unused translations * Refactoring * Use EuiButtonGroup instead of toggle button * Update options ids, add aria-labels * Remove unused translations * Update mask model, update TS, update aria labels * Add validation for CIRD mask
* Create IpRangeType and IpRanges controls * Add validation * Refactoring * Add behavior when discarding changes * Refactoring: create common input list * Remove old template * Move add btn to input_list, add placeholder * Remove unused directives * Remove unused translations * Refactoring * Use EuiButtonGroup instead of toggle button * Update options ids, add aria-labels * Remove unused translations * Update mask model, update TS, update aria labels * Add validation for CIRD mask
* Create IpRangeType and IpRanges controls * Add validation * Refactoring * Add behavior when discarding changes * Refactoring: create common input list * Remove old template * Move add btn to input_list, add placeholder * Remove unused directives * Remove unused translations * Refactoring * Use EuiButtonGroup instead of toggle button * Update options ids, add aria-labels * Remove unused translations * Update mask model, update TS, update aria labels * Add validation for CIRD mask
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.
Great 👍
Summary
EUIfication of
IP Ranges
control for aggregation parameter in Default Editor, Data tab.Part of #30922.
Steps to reproduce: create
Data Table
visualization, chooseIPv4 Range
aggregation inBuckets
group.Details
{ from: '0.0.0.0', to: '255.255.255.255'}
and{ mask: '0.0.0.0/1' }
*
by default.This PR also contains removing unused directives:
validateIp
andvalidateCidrMask
.Screenshots:
--
2) CIDR mask
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Documentation was added for features that require explanation or tutorialsFor maintainers
[ ] This was checked for breaking API changes and was labeled appropriately[ ] This includes a feature addition or change that requires a release note and was labeled appropriately