Vis editor: make IP Ranges inputs compressed (#37476) (#39244)

* 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

* Make inputs compressed

* Remove unused translations
This commit is contained in:
Maryia Lapata 2019-06-19 14:42:05 +03:00 committed by GitHub
parent 8358fe20ea
commit 900f48cc5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -86,6 +86,7 @@ function FromToList({ showValidation, onBlur, ...rest }: FromToListProps) {
defaultMessage: 'IP range from: {value}',
values: { value: item.from.value || '*' },
})}
compressed
isInvalid={showValidation ? item.from.isInvalid : false}
placeholder="*"
onChange={ev => {
@ -104,6 +105,7 @@ function FromToList({ showValidation, onBlur, ...rest }: FromToListProps) {
defaultMessage: 'IP range to: {value}',
values: { value: item.to.value || '*' },
})}
compressed
isInvalid={showValidation ? item.to.isInvalid : false}
placeholder="*"
onChange={ev => {

View file

@ -80,6 +80,7 @@ function MaskList({ showValidation, onBlur, ...rest }: MaskListProps) {
defaultMessage: 'CIDR mask: {mask}',
values: { mask: mask.value || '*' },
})}
compressed
isInvalid={showValidation ? mask.isInvalid : false}
placeholder="*"
onChange={ev => {