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 Auto Refresh Efficiency (settings and caching) #686

Closed
alanmcruickshank opened this issue Jun 28, 2016 · 2 comments
Closed

Dashboard Auto Refresh Efficiency (settings and caching) #686

alanmcruickshank opened this issue Jun 28, 2016 · 2 comments
Labels
enhancement:request Enhancement request submitted by anyone from the community inactive Inactive for >= 30 days

Comments

@alanmcruickshank
Copy link
Contributor

This is an edit that I'm happy to take a crack at but I need some guidance on how best to approach it (@mistercrunch).

I'd like the option to set some dashboards to always autorefresh. At the moment every dashboard loads as non-refreshing as standard, and I'd like to store the refresh setting (either after setting it on the dashboard view and saving it or setting it on the dashboard properties page), and then pass this through on dashboard load so that it automatically gets set.

Simply doing this will also put quite a lot of strain on out Database for some of the common dashboards if the timed refresh always does a force refresh (except for the first load):

line 266 in dashboard.jsx

var refreshAll = function () {
        dash.slices.forEach(function (slice) {
          var force = !dash.firstLoad;
          setTimeout(function () {
            slice.render(force);
          },
          //Randomize to prevent all widgets refreshing at the same time
          maxRandomDelay * Math.random());
        });
        dash.firstLoad = false;

to combat this I'd also like to be able to set something on the dashboard which disables the forced refresh on the time refreshes and allows it instead to use the cached values. This means that if multiple people are looking at the same dashboard all with autorefresh enabled that the values only get calculated once (when the cache expires) and the everyone else is served the cached values. The "Force refresh the whole dashboard" button should still actually force refresh the whole dashboard, I don't want to change the functionality there.

Where would be the most appropriate place to store the setting, and how do I pass that through on loading the dashboard so that the javascript has access to that variable? (My javascript is pretty rusty)

@mistercrunch
Copy link
Member

Seems like you can just add is as an Integer Column to caravel.models.Dashboard and maybe you need an additional Boolean for autorefresh_from_cache or something like that. The option in the modal should be changed to allow for arbitrary Ints as seconds.

@stale
Copy link

stale bot commented Apr 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 11, 2019
@stale stale bot closed this as completed Apr 18, 2019
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
…che#686)

* fix(plugin-chart-table): value undefined when table name has dot

* Upgrade react everywhere

* add comment
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
…che#686)

* fix(plugin-chart-table): value undefined when table name has dot

* Upgrade react everywhere

* add comment
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
…che#686)

* fix(plugin-chart-table): value undefined when table name has dot

* Upgrade react everywhere

* add comment
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
…che#686)

* fix(plugin-chart-table): value undefined when table name has dot

* Upgrade react everywhere

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement:request Enhancement request submitted by anyone from the community inactive Inactive for >= 30 days
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants