Project

General

Profile

Feature #37622

mgr/dashboard: Tunable refresh interval

Added by Ernesto Puerta about 4 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
% Done:

0%

Source:
Tags:
low-hanging-fruit
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

As a Admin User I want to increase/decrease how often the data is refreshed in the UI to either increase responsiveness or decrease bandwidth/load.

Currently ceph-dashboard UI refreshes every 5 seconds. This interval is hardcoded and spread across different components. As a first step, all this hardcoded values should come from a single setting, and after that, they could be exposed to the Dashboard admin.


Related issues

Related to Dashboard - Feature #26872: mgr/dashboard Add refresh interval to the dashboard landing page Resolved
Related to Dashboard - Feature #38063: mgr/dashboard: Improve existing design of Grafana timepicker New

History

#1 Updated by Lenz Grimmer about 4 years ago

Good idea, I agree to both the overall idea and the implementation plan!

#2 Updated by Lenz Grimmer about 4 years ago

  • Tags set to low-hanging-fruit

#3 Updated by Ernesto Puerta almost 4 years ago

  • Related to Feature #26872: mgr/dashboard Add refresh interval to the dashboard landing page added

#4 Updated by Ernesto Puerta almost 4 years ago

  • Related to Feature #38063: mgr/dashboard: Improve existing design of Grafana timepicker added

#5 Updated by Pranav Kulshrestha almost 3 years ago

Hi Lenz and Ernesto,
I want to work on this issue,
Just one question, The default value for the refresh interval right now is 5 seconds which is the default interval for other services like summary service etc;
When you say, come from a single setting, I assume that you want to have a single interval variable which can be easily modified by the admin using an input. (Changing the selector to an input which will change the refresh interval)
Or are we trying to add this input to an already existing form?
Also, I cannot find a way to change the refresh interval of the summary service. Do we want to change that also?

#6 Updated by Ernesto Puerta almost 3 years ago

Pranav Kulshrestha wrote:

Hi Lenz and Ernesto,
I want to work on this issue,
Just one question, The default value for the refresh interval right now is 5 seconds which is the default interval for other services like summary service etc;
When you say, come from a single setting, I assume that you want to have a single interval variable which can be easily modified by the admin using an input. (Changing the selector to an input which will change the refresh interval)
Or are we trying to add this input to an already existing form?
Also, I cannot find a way to change the refresh interval of the summary service. Do we want to change that also?

Hi Pranav,

Currently every Angular service polling the backend REST API features its own method of polling and period (recursive with setInterval, iterative with rxjs.timer, ...). To allow users easily tune polling interval for all services you would probably need to:

  • Replace the different polling implementations & polling periods (5 secs, 10, 20, ...) with a single timing source. This could be, for example, a single Rxjs source/subject provided by a service, from which every service takes the 'master clock' reference. But there could exist other approaches.
  • A few services (as the one you mention, SummaryService) can be a bit tricky, since they might need some 'refactoring', but don't be afraid of breaking it. There should be enough unit test and e2e test to detect any breaking change (and if not, that's also a good finding).
  • Once all polling services are fed with the same timing source, you'd need to come up with a way of making that source period 'tunable' and expose that 'tunability' in a front-end component.
  • Some questions remain open and might lead you to different solutions/approaches:
    • Is this setting somehow saved, so that the same user sees the last setting?
    • If it's persisted, where is that setting stored? Front-end? Back-end?

Let me know if you still have any questions!

#7 Updated by Ernesto Puerta almost 2 years ago

  • Tags set to low-hanging-fruit

#8 Updated by Ernesto Puerta almost 2 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 132 to General

Also available in: Atom PDF