[Vis: Default editor] EUIficate IP Ranges#36896
[Vis: Default editor] EUIficate IP Ranges#36896maryia-lapata merged 23 commits intoelastic:masterfrom
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 |
wylieconlon
left a comment
There was a problem hiding this comment.
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.
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.
I unified Mask and FromTo models and updated InputModel definition. Please take a look.
kertal
left a comment
There was a problem hiding this comment.
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 |
kertal
left a comment
There was a problem hiding this comment.
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
Summary
EUIfication of
IP Rangescontrol for aggregation parameter in Default Editor, Data tab.Part of #30922.
Steps to reproduce: create
Data Tablevisualization, chooseIPv4 Rangeaggregation inBucketsgroup.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:
validateIpandvalidateCidrMask.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