galwan27 opened a new issue, #44981:
URL: https://github.com/apache/superset/issues/44981
### Bug description
Bug description Since 6.1.0, the dashboard auto-refresh interval options are
hard-coded in the frontend, and DASHBOARD_AUTO_REFRESH_INTERVALS from
superset_config.py is ignored. In previous version this setting limited the
options shown in the refresh dropdown.
Steps to reproduce
Set this in superset_config.py:
Python
DASHBOARD_AUTO_REFRESH_INTERVALS = [
[0, "Don't refresh"],
[600, "10 minutes"],
[1800, "30 minutes"],
[3600, "1 hour"],
]
Open a dashboard and choose Set auto-refresh interval.
The default list (10 seconds to 24 hours) is shown instead of the configured
one.
Findings
The backend loads the value correctly:
current_app.config["DASHBOARD_AUTO_REFRESH_INTERVALS"] returns the configured
list.
The value reaches the browser:
bootstrap.common.conf.DASHBOARD_AUTO_REFRESH_INTERVALS contains the configured
list.
The frontend never uses it. grep -l DASHBOARD_AUTO_REFRESH_INTERVALS
static/assets/*.js returns nothing on 6.1.0 or on apache/superset:master. The
options come from a hard-coded array ([{value:0,label:t("Don't
refresh")},{value:10,label:t("10 seconds")},...]).
This possibly regressed with the auto-refresh rework (#37459).
Expected behaviour The refresh dropdown uses
DASHBOARD_AUTO_REFRESH_INTERVALS when it's set, as it did in 6.0.x.
Superset version: 6.1.0 (also reproduced on master) Deployment: Kubernetes,
official Helm chart
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.11
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [ ] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]