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

Fixes: #18184 - Gracefully handle unavailable internet connection on RSS feed dashboard widget if ISOLATED_DEPLOYMENT is set #18186

Open
wants to merge 4 commits into
base: feature
Choose a base branch
from

Conversation

bctiemann
Copy link
Contributor

@bctiemann bctiemann commented Dec 10, 2024

Fixes: #18184

Because the RSS feed widget ("NetBox News") will return an error in an isolated deployment, this change skips adding that widget to the default dashboard if ISOLATED_DEPLOYMENT is set in the configuration.

Note that this matches all extras.RSSFeedWidget type widgets, so any additional RSS feeds we add to DEFAULT_DASHBOARD in the future will also be skipped in this situation.

@bctiemann bctiemann self-assigned this Dec 10, 2024
@bctiemann
Copy link
Contributor Author

Also note that this filtering behavior only occurs when the dashboard object is first populated from DEFAULT_DASHBOARD, which might occur before the user knows to set ISOLATED_DEPLOYMENT in the config. Maybe we should filter the RSS widget(s) out of the user's already-assigned Dashboard object? That feels invasive and presumptuous however.

@jeremystretch
Copy link
Member

This works, but I worry about precluding the use of RSS feed widgets entirely for an isolated deployment: It would be valid (though admittedly rare) to want to include an RSS feed from another locally-accessible system.

Maybe we could add a configuration parameter on RSSFeedWidget to indicate whether external access is required. If so, and ISOLATED_DEPLOYMENT is true, the widget will not be displayed. But maybe I'm overthinking it.

@bctiemann
Copy link
Contributor Author

How would it be if we showed a message like this? It's an error like the regular generic one, but at least the user will know exactly why and what to do about it:

Screenshot 2024-12-10 at 1 27 16 PM

@bctiemann bctiemann changed the title Fixes: #18184 - Suppress adding the RSS feed widget to the dashboard if ISOLATED_DEPLOYMENT is set Fixes: #18184 - Gracefully handle unavailable internet connection on RSS feed dashboard widget if ISOLATED_DEPLOYMENT is set Dec 10, 2024
@bctiemann bctiemann linked an issue Dec 10, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable RSS feed when ISOLATED_DEPLOYMENT is true
2 participants