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

Implement QuickValues over time widget #4244

Merged
merged 25 commits into from Oct 16, 2017

Conversation

Projects
None yet
2 participants
@bernd
Member

bernd commented Oct 13, 2017

This implements a new visualization to show quick values over time as a stacked bar chart.

Refs #4082

peek 2017-10-13 15-42

bernd added some commits Oct 9, 2017

Make interval optional and build a sane default based on the timerange
This uses the same logic we use in the web interface to construct an
interval.
Rename StackedChartVisualization to QuickValuesHistogramVisualization
This is nowhere near a generic component at the moment.
Move quick values config out of QueryConfiguration
Adding this in #4205 was a mistake. The fields need to be in a separate
file.
Restrict the chart legend to max 5 entries
Otherwise we would overwrite the x axis label.
Fix chart size issue where the chart gets smaller every new render
We have been passing this.CHART_MARGINS into the chart and dc.js was
modifying the values. So on every new chart render the chart got
smaller.

Use an immutable value for this.CHART_MARGINS.
Fix terms/termsHistogram bug with stacked fields
Wrap terms query with stacked fields in an additional filter to ensure
that the main and stacked fields actually exist in the message. Otherwise
we would get "null" values in the result.
Cleanup QuickValuesHistogramVisualization
Removing unused variables and simplify some code.

@bernd bernd added this to the 2.4.0 milestone Oct 13, 2017

@bernd bernd requested a review from kroepke Oct 13, 2017

@bernd bernd removed their assignment Oct 13, 2017

@kroepke

This comment has been minimized.

Member

kroepke commented Oct 16, 2017

image

The Top-2 value is actually the most common term here, so somewhere the ordering goes wrong.

@bernd bernd assigned kroepke and unassigned bernd Oct 16, 2017

@kroepke

This comment has been minimized.

Member

kroepke commented Oct 16, 2017

There are a couple of improvements we can do, but in the interest of getting broader feedback we'll postpone those and talk about them in subsequent PRs.

Rest lgtm!

@kroepke kroepke merged commit d5fd35d into master Oct 16, 2017

3 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
ci-web-linter Jenkins build graylog-pr-linter-check 2009 has succeeded
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 604 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@wafflebot wafflebot bot removed the ready-for-review label Oct 16, 2017

@kroepke kroepke deleted the feature-4082 branch Oct 16, 2017

kroepke added a commit that referenced this pull request Oct 16, 2017

Implement QuickValues over time widget (#4244)
* Extract histogram boundary parsing into tools

* First stab at terms histogram API endpoints

* Add /terms-histogram endpoint for absolute and keyword searches

* Make interval optional and build a sane default based on the timerange

This uses the same logic we use in the web interface to construct an
interval.

* Initial QuickValues over time visualization

* Make sure the chart container is using the complete width

* Add link to go back from histogram to the overview

* Disable animations

* Rename StackedChartVisualization to QuickValuesHistogramVisualization

This is nowhere near a generic component at the moment.

* Move some code from SearchResource into a helper so we can reuse it

* Move some code from QuickvaluesWidgetStrategy into base class

We will reuse this soon.

* Add QUICKVALUES_HISTOGRAM widget strategy

* Make it possible to add the quickvalues histogram to dashboards

* Move quick values config out of QueryConfiguration

Adding this in #4205 was a mistake. The fields need to be in a separate
file.

* Only show data table limit if not qv histogram

* Remove unused "show_chart_legend"

* Restrict the chart legend to max 5 entries

Otherwise we would overwrite the x axis label.

* Improve QV histogram rendering based on GraphVisualization

* Handle resizing issues

* Fix chart size issue where the chart gets smaller every new render

We have been passing this.CHART_MARGINS into the chart and dc.js was
modifying the values. So on every new chart render the chart got
smaller.

Use an immutable value for this.CHART_MARGINS.

* Account for y label in margin

* Fix terms/termsHistogram bug with stacked fields

Wrap terms query with stacked fields in an additional filter to ensure
that the main and stacked fields actually exist in the message. Otherwise
we would get "null" values in the result.

* Cleanup QuickValuesHistogramVisualization

Removing unused variables and simplify some code.

* Cleanup QuickValues configuration forms

* Fix bucket sorting in quickvalue histogram

(cherry picked from commit d5fd35d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment