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

Dashboard improvements #1022

Merged
merged 8 commits into from
Oct 16, 2018
Merged

Dashboard improvements #1022

merged 8 commits into from
Oct 16, 2018

Conversation

bjoernricks
Copy link
Contributor

  • store display (chart) specific data in the in the user settings
  • fix main dashboard
  • fix rendering the linechart

memoize-one caches a return value of a function depending on the passed
parameters.
Put the display specific state in the dashboard settings at the redux
store.
Forward the settings passed to StartDashboard to the Dashboard and
DashboardControls.
Rework main Dashboard to abstract settings and dashboard settings.
The line chart must re-render if with, data and height has changed.
After the state has been calculated the re-render must be allowed in
shouldComponentUpdate by checking if the data in the state has changed
since last render.

The state calculation in LineChart is far from beeing optimal. Maybe all
charts could be simplified by extracting the width re-calculation when a
legend is displayed into another separated reusable component.
@bjoernricks bjoernricks requested a review from a team October 15, 2018 14:32
@codecov
Copy link

codecov bot commented Oct 15, 2018

Codecov Report

Merging #1022 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1022      +/-   ##
=========================================
- Coverage    9.51%    9.5%   -0.02%     
=========================================
  Files         820     820              
  Lines       26615   26650      +35     
  Branches     5616    5621       +5     
=========================================
  Hits         2533    2533              
- Misses      22466   22499      +33     
- Partials     1616    1618       +2
Impacted Files Coverage Δ
gsa/src/web/store/dashboard/settings/selectors.js 100% <ø> (ø) ⬆️
gsa/src/web/pages/start/dashboard.js 0% <ø> (ø) ⬆️
gsa/src/web/components/dashboard/dashboard.js 0% <0%> (ø) ⬆️
...rc/web/components/dashboard/display/datadisplay.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/start/page.js 0% <0%> (ø) ⬆️
gsa/src/web/components/chart/line.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a930555...8af7e76. Read the comment docs.

The settings are loaded via the main dashboard so isLoading is always
false for these dashboards.
The store layout is a bit confusing the for main dashboard because it's
so complex. Fix getting the isLoading indicator.
@swaterkamp swaterkamp merged commit bdb10c1 into greenbone:master Oct 16, 2018
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.

2 participants