-
-
Notifications
You must be signed in to change notification settings - Fork 629
feat(ui): Allow to configure config refresh interval #1442
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
base: master
Are you sure you want to change the base?
feat(ui): Allow to configure config refresh interval #1442
Conversation
config/ui/ui_test.go
Outdated
| Name: "ZeroConfigRefreshInterval", | ||
| ConfigRefreshInterval: 0, | ||
| ExpectedError: nil, | ||
| ExpectedValue: defaultConfigRefreshInterval, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if that is whats expected. Like this it behaves the same as the endpoint interval option, there setting the value to zero does not make the config invalid but instead just uses the 1m default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue could be solved in a similar way to how config bool values are handled:
Lines 118 to 120 in 1df0801
| if cfg.DarkMode == nil { | |
| cfg.DarkMode = &defaultDarkMode | |
| } |
For a duration this would be:
- nil -> set default
- zero -> return error
Only question would whether to make a new pr where this is also "solved" for endpoint interval config and possible other occurrences. Changing this would only be a breaking change for invalid configurations.
Summary
Adds config option to customize config refresh interval in the UI (refresh is used to get update announcements)
Checklist
README.md, if applicable.