sadpandajoe commented on code in PR #44982:
URL: https://github.com/apache/superset/pull/44982#discussion_r4210667898
##########
superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx:
##########
@@ -100,24 +166,44 @@ export const RefreshFrequencySelect = ({
value,
onChange,
}: RefreshFrequencySelectProps) => {
+ const configuredIntervals = useSelector(
+ (state: RootState) =>
+ state.dashboardInfo?.common?.conf?.DASHBOARD_AUTO_REFRESH_INTERVALS,
Review Comment:
The interval list is only read from `state.dashboardInfo`, but
`PropertiesModal` (and so this select) also mounts from the Dashboard List and
Home pages (`DashboardList/index.tsx`), where no dashboard has been hydrated.
There `dashboardInfo?.common?.conf` is `undefined`, so a deployment that sets
`DASHBOARD_AUTO_REFRESH_INTERVALS` to `[[0, "Don't refresh"], [600, "10
minutes"]]` still sees the hardcoded 10 seconds/30 seconds/... presets when
editing a dashboard from those pages, and the issue stays unfixed on that path.
Should this fall back to the bootstrapped `state.common.conf` when
`dashboardInfo` has no config?
--
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]