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

Add support for HDR percentiles in TSVB visualizations #78306

Merged
merged 16 commits into from
Oct 7, 2020

Conversation

alexwizp
Copy link
Contributor

Closes: #64238

Summary

Having access to HDR percentiles can be more performant for some queries, as outlined in the Elasticsearch docs.

Describe a specific use case for the feature:

It would be really nice to have access to build these types of percentile aggregations in the TSVB visualization.

This is related to the more broad request #40612 of getting access to HDR support added to regular visualizations.

Screens

  • Percentile Agg:
    image
    image
  • Percentile Rank Agg:
    image
    image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp self-assigned this Sep 24, 2020
@alexwizp alexwizp added Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0 release_note:enhancement Feature:TSVB TSVB (Time Series Visual Builder) labels Sep 24, 2020
@alexwizp alexwizp marked this pull request as ready for review September 24, 2020 08:29
@alexwizp alexwizp requested a review from a team September 24, 2020 08:29
@elasticmachine
Copy link
Contributor

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

@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.

I see the following regression that has to do with the UI actually. On master when I select Band mode it is displayed correctly
Screenshot 2020-09-24 at 3 58 53 PM

but here it is not so good even in larger screens:
Screenshot 2020-09-24 at 3 53 01 PM

Moreover it seems that it fails for negative values. Can we restrict the user from adding them ?
Screenshot 2020-09-24 at 4 20 08 PM

}
>
<>
{model.values && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't you add the whole EuiFormRow under model.values check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I just moved it from the other place without thinking about it. I see that model.values are not optional fo this agg and should have a value. I think it was added cause in model it's an optional value....

Fixed

<>
{model.values && (
<PercentileRankValues
disableAdd={isTablePanel}
Copy link
Contributor

Choose a reason for hiding this comment

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

I get a warning for the key here when I add multiple Values
Screenshot 2020-09-24 at 4 15 39 PM
I don't reproduce it in master.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stratoula you are not right, on master I see the same issue. But it's not a reason to don't solve it. Will be fixed in that PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

My mistake @alexwizp, thank you so much for fixing this

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

@cchaos could you please confirm that my fix which found @statula is ok from the design perspective

Before:
image
After:
image

I moved some optional for the Band mode fields into new Panel. As a result all looks fine on all screens. It also seems to me that this is more user friendly

@stratoula thank you so much, I forgot about that mode

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@elastic elastic deleted a comment from elasticmachine Sep 28, 2020
@cchaos
Copy link
Contributor

cchaos commented Sep 28, 2020

The problem with the panel visually is that it doesn't encompass the whole setting and so it's not clear where it came from or which line will delete it.

Image 2020-09-28 at 11 40 38 AM

My suggestion would be to keep it as a separate line but align it with the above inputs so that the +/delete icons are vertically centered with both lines of forms. Also make sure to use the horizontal form rows to match the above display.

Image 2020-09-28 at 11 40 38 AM

@alexwizp
Copy link
Contributor Author

@cchaos I still think that we should use EuiPanel. What do you think about?:

Percentile:
image

Percentile Rank:
image

@alexwizp alexwizp requested a review from cchaos September 29, 2020 17:31
@cchaos
Copy link
Contributor

cchaos commented Sep 30, 2020

That's fine. I think we've tried to be more condensed in the past in the TSVB forms. Just be sure to continue to test in smaller window sizes.

@alexwizp
Copy link
Contributor Author

@cchaos on mobile it looks like:
image

@stratoula
Copy link
Contributor

@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.

It looks much better now @alexwizp 🙂 LGTM!

@stratoula
Copy link
Contributor

@sulemanof can you also check this please?

@alexwizp alexwizp added v7.11.0 and removed v7.10.0 labels Oct 1, 2020
Copy link
Contributor

@sulemanof sulemanof left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested locally, works as expected (except the thing when I type value of numberOfSignificantValueDigits as magic 5, this breaks my local es snapshot with out of memory exception - not a problem for the PR, but locally should increase the value of memory heap ).

I have only concerns around css here, IMHO it looks strange on different screen sizes.

Screen with high resolution (1920px) - I assume forms should be responsive:

image

Tablet (790px):

image

Mobile (the only percentile will take more than screen height):

image

But this is definitely a question to design team @cchaos

@cchaos
Copy link
Contributor

cchaos commented Oct 1, 2020

@sulemanof I agree, it's not great. I did emphasize making sure this layout worked well responsively. I'd consider continuing to tweak for all all screen sizes.

@alexwizp
Copy link
Contributor Author

alexwizp commented Oct 7, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id before after diff
visTypeTimeseries 466 467 +1

async chunks size

id before after diff
visTypeTimeseries 1.8MB 1.8MB +2.4KB

History

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

@alexwizp alexwizp merged commit 59d83e6 into elastic:master Oct 7, 2020
alexwizp added a commit to alexwizp/kibana that referenced this pull request Oct 7, 2020
* Add support for HDR percentiles in TSVB visualizations

Closes: elastic#64238

* remove extra console.log

* fix CI

* fix PR comments

* fix layout

* remove legacy injectI18n

* fix localization issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
alexwizp added a commit that referenced this pull request Oct 7, 2020
* Add support for HDR percentiles in TSVB visualizations

Closes: #64238

* remove extra console.log

* fix CI

* fix PR comments

* fix layout

* remove legacy injectI18n

* fix localization issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
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:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for HDR percentiles in TSVB visualizations
6 participants