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

[TSVB] Visualize runtime fields #95772

Merged
merged 7 commits into from
Apr 12, 2021
Merged

[TSVB] Visualize runtime fields #95772

merged 7 commits into from
Apr 12, 2021

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Mar 30, 2021

Closes: #82438

Release Notes

This PR adds support of Runtime Fields for TSVB visualization. Since Kibana supports this type of fields only through the creation of a Kibana Index Pattern,Runtime fieldswill be available on the indexpattern mode. More information here

Testing Notes

  1. Create a new Runtime Field
    • Navigate to Stack Management -> Index Patterns -> { some index pattern e.g. kibana_sample_data_ecommerce};
    • Press Add Field button;
      image
    • Press Save
  2. Create a new TSVB visualization
  3. Create new Aggregation with created Runtime Field
    image

Expected result:
image

@elastic elastic deleted a comment from kibanamachine Mar 30, 2021
@alexwizp alexwizp requested a review from VladLasitsa March 31, 2021 09:31
@alexwizp alexwizp self-assigned this Mar 31, 2021
@alexwizp alexwizp added v7.13.0 v8.0.0 Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:feature Makes this part of the condensed release notes labels Mar 31, 2021
@elastic elastic deleted a comment from kibanamachine Mar 31, 2021
@alexwizp alexwizp marked this pull request as ready for review March 31, 2021 10:41
@alexwizp alexwizp requested a review from a team March 31, 2021 10:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Contributor

@VladLasitsa VladLasitsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexwizp
Copy link
Contributor Author

alexwizp commented Apr 1, 2021

@elasticmachine merge upstream

@stratoula
Copy link
Contributor

@alexwizp although I am on the string mode, I can still see the runtime fields and create visualizations with them.

@stratoula
Copy link
Contributor

Moreover markdown editor breaks

Uncaught TypeError: Cannot read property 'set' of undefined
    at convert_series_to_vars.js:35
    at Array.forEach (<anonymous>)
    at convert_series_to_vars.js:18
    at Array.forEach (<anonymous>)
    at convertSeriesToVars (convert_series_to_vars.js:17)
    at MarkdownEditor.render (markdown_editor.js:58)
    at finishClassComponent (react-dom.development.js:18470)
    at updateClassComponent (react-dom.development.js:18423)
    at beginWork$1 (react-dom.development.js:20186)

@stratoula
Copy link
Contributor

stratoula commented Apr 1, 2021

Also, we don't respect the format of the field. I have created a keyword runtime field with uppercase formatting but still my value appears lowercase.

For example on the area XY chart it is respected:
image

Moreover if I create a TSVB viz with a runtime field and then delete it, my visualization doesn't appear as broken but with no results found.

image

I think that it should work as the other visualizations, it should notify the user that this visualization uses a field that doesn't exist anymore but still allow the user to edit this.

@alexwizp
Copy link
Contributor Author

alexwizp commented Apr 2, 2021

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

alexwizp commented Apr 7, 2021

@elasticmachine merge upstream

1 similar comment
@stratoula
Copy link
Contributor

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine, found some bugs though:

  • I create a table with runtime field and although it exists I receive

image

  • Something goes wrong when I delete two runtime fields that my visualization relies on (see comment below)

@alexwizp
Copy link
Contributor Author

@stratoula thank you for that two broken scenarios

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice @alexwizp, I think it works great. Thank you a lot for all your effort in this PR and for addressing all comments ❤️

Copy link
Contributor

@VladLasitsa VladLasitsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timroes
Copy link
Contributor

timroes commented Apr 12, 2021

@elasticmachine run elasticsearch-ci/docs

@alexwizp alexwizp enabled auto-merge (squash) April 12, 2021 13:21
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visualizations 84 85 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTimeseries 1.6MB 1.6MB -420.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
visTypeTimeseries 109.3KB 109.7KB +411.0B
visualizations 91.9KB 92.5KB +669.0B
total +1.1KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @alexwizp

@alexwizp alexwizp merged commit 98f40a2 into elastic:master Apr 12, 2021
alexwizp added a commit to alexwizp/kibana that referenced this pull request Apr 12, 2021
* [TSVB] Visualize runtime fields

* fix CI

* Update visualization_error.tsx

* Update build_request_body.ts

* fix group by for table view

* fix issue on switching the index pattern mode

Co-authored-by: Kibana Machine <[email protected]>
alexwizp added a commit that referenced this pull request Apr 12, 2021
* [TSVB] Visualize runtime fields

* fix CI

* Update visualization_error.tsx

* Update build_request_body.ts

* fix group by for table view

* fix issue on switching the index pattern mode

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:TSVB TSVB (Time Series Visual Builder) release_note:feature Makes this part of the condensed release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TSVB] Visualize runtime fields
6 participants