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

[Lens] Add date histogram granularity slider #124583

Conversation

drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented Feb 3, 2022

Summary

Adds an interval granularity slider for data histogram operations.

Resolves #86437

Screen Shot 2022-02-03 at 4 17 25 PM

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@kibana-ci
Copy link
Collaborator

kibana-ci commented Feb 3, 2022

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #6 / date_histogram param editor should render current value
  • [job] [logs] Jest Tests #6 / date_histogram param editor should render current value for other index pattern
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should hide fields that have no data
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should hide the top level field selector when switching from non-reference to reference
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should keep the latest valid dimension when removing the selection in field combobox
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should list all field names and document as a whole in prioritized order
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should not display hidden operation types
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should not set the state if selecting the currently active operation
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should not update when selecting the current field again
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should show all operations that are not filtered out
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should show field select
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should switch operations when selecting a field that requires another operation
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel should update label and custom label flag on label input changes
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should indicate fields compatible with selected operation
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should leave error state if a compatible operation is selected
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should leave error state if the original operation is re-selected
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should leave error state when switching from incomplete state to fieldless operation
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should set datasource state if compatible field is selected for operation
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should set the state if selecting an operation incompatible with the current field
  • [job] [logs] Jest Tests #6 / IndexPatternDimensionEditorPanel transient invalid state should show error message in invalid state
  • [job] [logs] Default CI Group #2 / Reporting APIs Report generation event logging creates a completed action for a PDF report

Metrics [docs]

Async chunks

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

id before after diff
lens 1.0MB 1.0MB +992.0B
Unknown metric groups

ESLint disabled in files

id before after diff
apm 15 14 -1
securitySolution 67 66 -1
uptime 5 4 -1
total -3

ESLint disabled line counts

id before after diff
apm 92 89 -3
uptime 48 42 -6
total -9

References to deprecated APIs

id before after diff
canvas 70 64 -6
fleet 14 10 -4
lens 237 185 -52
monitoring 40 28 -12
stackAlerts 183 157 -26
upgradeAssistant 8 3 -5
total -105

Total ESLint disabled count

id before after diff
apm 107 103 -4
securitySolution 516 515 -1
uptime 53 46 -7
total -12

History

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

@drewdaemon
Copy link
Contributor Author

@flash1293 @alexwizp I have a few questions for you two (and/or anyone else).

  • What is the current function of "auto" as an interval value? I can see that it is currently set as the default, but I think need an explicit value to position the range slider.
  • How should UI Settings play into this? I see that the slider in TSVB uses histogram:maxBars and histogram:barTarget, but I'm not sure if we should be using these in Lens also. histogram:barTarget appears to be what TSVB uses as its "auto" (default) setting.
  • What is a good way to create a restricted interval? I need to make my code work with restricted intervals but not sure how to create this scenario.
  • Should the slider somehow change the unit as well as the value?

@flash1293
Copy link
Contributor

Maybe instead of storing an explicit interval we can store the position of the slider (from 0 to 10) with 5 being auto, then dynamically turning it into an interval diverging from the auto value on building the expression? This way the slider is independently of the actual interval controlling the granularity (like the same slider for number histograms works).

What is a good way to create a restricted interval? I need to make my code work with restricted intervals but not sure how to create this scenario.

It's used for rollup indices

@drewdaemon drewdaemon closed this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Granularity slider for date histogram interval
3 participants