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

Dashboard improvements #2626

Merged
merged 6 commits into from Aug 8, 2016

Conversation

Projects
None yet
2 participants
@edmundoa
Member

edmundoa commented Aug 8, 2016

This PR brings some improvements to dashboards:

  • Improve CPU usage by avoiding unnecessary re-renders. Fixes #2281
  • Get value once for widgets added in the background. Fixes #2084
  • Set initial widget refresh state by using the updateUnfocussed user preference. The button to "Update in the background/foreground" lets now override that preference temporarily, no matter what it initial value is
  • Avoid loading widget value once it is deleted, which could return a 404 and an error message

edmundoa added some commits Aug 4, 2016

Only re-render dashboard when it actually changes
Avoid re-rendering dashboards every two seconds, only updating the state
when the dashboard changes.
Fix widget refresh preference
When the user set the `updateUnfocussed` flag to true, the dashboard
update in the foreground/background button does not reflect the actual
status of the refresh policy, and it also doesn't make any changes in
it.

This commit uses the user preference as default refresh policy, and
let the user temporarily override it by using the update in the
foreground/background button in the dashboard.
Always load widget value for the first time
When a dashboard is in the background a new widget is added, load the
widget value at least once, so the widget doesn't look broken.

Fixes #2084
Only re-render visualizations when data changes
The widget component now checks if the data from the server is a new
version of the one already in the state, before updating and propagating
the state.

Visualizations also check now if the data passed in their props is
actually new or just the same, avoiding re-rendering visualizations if
it's not necessary.

@edmundoa edmundoa added this to the 2.1.0 milestone Aug 8, 2016

@bernd bernd self-assigned this Aug 8, 2016

@edmundoa

This comment has been minimized.

Member

edmundoa commented Aug 8, 2016

In case you are interested, these are the performance tests before, and after the changes:

screen shot 2016-08-08 at 10 41 09

screen shot 2016-08-08 at 10 41 43

@bernd

This comment has been minimized.

Member

bernd commented Aug 8, 2016

LGTM 👍

@bernd bernd merged commit 9aec318 into master Aug 8, 2016

4 checks passed

ci-server-integration Jenkins build graylog2-server-integration-pr 1224 has succeeded
Details
ci-web-linter Jenkins build graylog-pr-linter-check 707 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@bernd bernd deleted the dashboard-improvements branch Aug 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment