Skip to content
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

Support new half_float and scaled_float field types #7789

Merged
merged 1 commit into from
Jul 22, 2016

Conversation

Bargs
Copy link
Contributor

@Bargs Bargs commented Jul 21, 2016

Elasticsearch added a couple of new numeric datatypes, which means we
need to update our type casting list to include them. Kibana should
see them as "numbers" so they work properly in searches and aggs.

Also updates Console's list of known types

Fixes #7782
Related elastic/elasticsearch#18887
Related elastic/elasticsearch#19264

@Bargs
Copy link
Contributor Author

Bargs commented Jul 21, 2016

@monicasarbu here's the PR to track for the new floats in Kibana

@monicasarbu
Copy link

@Bargs Thanks! It seems to work now 👍

@ycombinator
Copy link
Contributor

I've verified that Kibana correctly treats the half_float and scaled_float Elasticsearch data types as numbers now:

screen shot 2016-07-22 at 3 51 10 am

screen shot 2016-07-22 at 3 51 17 am

Console autocompletes the datatypes as well. However, for the scaled_float datatype, there is an additional required parameter, scaling_factor, which Console does not offer as an autocomplete suggestion:

half_float_autocomplete

scaled_float_autocomplete

So the only addition needed to this PR is for Console to offer scaling_factor as an autocomplete suggestion.

@ycombinator ycombinator assigned Bargs and unassigned ycombinator Jul 22, 2016
@Bargs
Copy link
Contributor Author

Bargs commented Jul 22, 2016

Good catch @ycombinator, I've pushed an update for scaling_factor autocomplete.

@Bargs Bargs assigned ycombinator and unassigned Bargs Jul 22, 2016
@Bargs
Copy link
Contributor Author

Bargs commented Jul 22, 2016

jenkins, test this

@Bargs Bargs added the review label Jul 22, 2016
@ycombinator
Copy link
Contributor

@Bargs The scaling_factor autocomplete works. I see that it autocompletes the property's value to 100. From my testing of various properties, the convention in Console seems to be:

  • If the property has a default in ES, autocomplete the property's value to that default.
  • Else, autocomplete the value to a placeholder value. For example, copy_to's value autocompletes to "{field}".

From what I can tell there is no default value for scaling_factor in ES. So I'd autocomplete its value to something like {scaling_factor}, which would then require the user to replace it with an actual value.

@tsullivan
Copy link
Member

Manually tested this in Console, created a template that uses half_float, and saw in Kibana Index Patterns that the field is mapped as number

LGTM

@spalger
Copy link
Contributor

spalger commented Jul 22, 2016

LGTM, also +1 to @ycombinator's point

Elasticsearch added a couple of new numeric datatypes, which means we
need to update our type casting list to include them. Kibana should
see them as "numbers" so they work properly in searches and aggs.

Fixes elastic#7782
Related elastic/elasticsearch#18887
Related elastic/elasticsearch#19264
@Bargs Bargs force-pushed the supportHalfScaledFloats branch from 1fc51e4 to 298ee35 Compare July 22, 2016 18:01
@ycombinator
Copy link
Contributor

ycombinator commented Jul 22, 2016

Chatted with @Bargs about my comment above. He tried out my suggestion but it looks like Console code does not like autocompleting to invalid JSON values. So autocompleting the scaling_factor property's value to {scaling_factor} is not an option, at least at the moment. So it looks like the only reasonable option is to autocomplete to a number.

@Bargs is going to break out the Console part of this PR into its own so we can figure out the right thing to do there (perhaps after consulting Adrien from the ES team on what a good autocompleted number might be). That'll leave just the index pattern changes in this PR, letting us move forward with merging those.

@ycombinator
Copy link
Contributor

ycombinator commented Jul 22, 2016

LGTM! :shipit:

@Bargs Bargs merged commit f3c047c into elastic:master Jul 22, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Support new half_float and scaled_float field types

Former-commit-id: f3c047c
cee-chen added a commit that referenced this pull request Jun 18, 2024
`v94.6.0` ⏩ `v95.0.0-backport.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

##
[`v95.0.0-backport.0`](https://github.com/elastic/eui/releases/v95.0.0-backport.0)

**This is a backport release only intended for use by Kibana.**

- Updated `EuiSteps` to support a new `titleSize="xxs"` style, which
outputs the same title font size but smaller unnumbered step indicators
([#7813](elastic/eui#7813))
- Updated `EuiStepsHorizontal` to support a new `size="xs"` style, which
outputs smaller unnumbered step indicators
([#7813](elastic/eui#7813))
- Updated `EuiStepNumber` to support new `titleSize="none"` which omits
rendering step numbers, and will only render icons
([#7813](elastic/eui#7813))

## [`v95.0.0`](https://github.com/elastic/eui/releases/v95.0.0)

- Added `move` glyph to `EuiIcon`
([#7789](elastic/eui#7789))
- Updated `EuiBasicTable` and `EuiInMemoryTable`s with `selection` - the
header row checkbox will now render an indeterminate state if some (but
not all) rows are selected
([#7817](elastic/eui#7817))

**Bug fixes**

- Fixed an `EuiDataGrid` visual bug when using `lineCount` row heights
where the clamped text was still visible for some font sizes
([#7793](elastic/eui#7793))
- Fixed `EuiSearchBar`'s filter configs to always respect `autoClose:
false` ([#7806](elastic/eui#7806))

**Breaking changes**

- Removed deprecated `EUI_CHARTS_THEME_DARK`, `EUI_CHARTS_THEME_LIGHT`
and `EUI_SPARKLINE_THEME_PARTIAL` exports
([#7682](elastic/eui#7682))
- Removed deprecated `euiPalettePositive` and `euiPaletteNegative`. Use
`euiPaletteGreen` and `euiPaletteRed` instead
([#7808](elastic/eui#7808))
- Removed `type="inList"` from `EuiCheckbox`. Simply omit passing a
`label` prop to render this style of checkbox
([#7814](elastic/eui#7814))
- Removed the unused `compressed` prop from `EuiCheckbox` and
`EuiRadio`. This prop was not doing anything on individual components.
([#7818](elastic/eui#7818))

**CSS-in-JS conversions**

- Converted `EuiCheckboxGroup` to Emotion
([#7818](elastic/eui#7818))
- Converted `EuiRadioGroup` to Emotion
([#7818](elastic/eui#7818))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
bhapas pushed a commit to bhapas/kibana that referenced this pull request Jun 18, 2024
`v94.6.0` ⏩ `v95.0.0-backport.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

##
[`v95.0.0-backport.0`](https://github.com/elastic/eui/releases/v95.0.0-backport.0)

**This is a backport release only intended for use by Kibana.**

- Updated `EuiSteps` to support a new `titleSize="xxs"` style, which
outputs the same title font size but smaller unnumbered step indicators
([elastic#7813](elastic/eui#7813))
- Updated `EuiStepsHorizontal` to support a new `size="xs"` style, which
outputs smaller unnumbered step indicators
([elastic#7813](elastic/eui#7813))
- Updated `EuiStepNumber` to support new `titleSize="none"` which omits
rendering step numbers, and will only render icons
([elastic#7813](elastic/eui#7813))

## [`v95.0.0`](https://github.com/elastic/eui/releases/v95.0.0)

- Added `move` glyph to `EuiIcon`
([elastic#7789](elastic/eui#7789))
- Updated `EuiBasicTable` and `EuiInMemoryTable`s with `selection` - the
header row checkbox will now render an indeterminate state if some (but
not all) rows are selected
([elastic#7817](elastic/eui#7817))

**Bug fixes**

- Fixed an `EuiDataGrid` visual bug when using `lineCount` row heights
where the clamped text was still visible for some font sizes
([elastic#7793](elastic/eui#7793))
- Fixed `EuiSearchBar`'s filter configs to always respect `autoClose:
false` ([elastic#7806](elastic/eui#7806))

**Breaking changes**

- Removed deprecated `EUI_CHARTS_THEME_DARK`, `EUI_CHARTS_THEME_LIGHT`
and `EUI_SPARKLINE_THEME_PARTIAL` exports
([elastic#7682](elastic/eui#7682))
- Removed deprecated `euiPalettePositive` and `euiPaletteNegative`. Use
`euiPaletteGreen` and `euiPaletteRed` instead
([elastic#7808](elastic/eui#7808))
- Removed `type="inList"` from `EuiCheckbox`. Simply omit passing a
`label` prop to render this style of checkbox
([elastic#7814](elastic/eui#7814))
- Removed the unused `compressed` prop from `EuiCheckbox` and
`EuiRadio`. This prop was not doing anything on individual components.
([elastic#7818](elastic/eui#7818))

**CSS-in-JS conversions**

- Converted `EuiCheckboxGroup` to Emotion
([elastic#7818](elastic/eui#7818))
- Converted `EuiRadioGroup` to Emotion
([elastic#7818](elastic/eui#7818))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants