feat: add dashboard-icons as icon fallback source#1154
Merged
Conversation
When packaging selfhosted apps (Grafana, Proxmox, TrueNAS, etc.) behind authentication, the existing domain-based icon services fail because they cannot access the favicon. This adds walkxcode/dashboard-icons as a primary icon source, matching by app name (--name). Falls back to existing domain-based services if no match is found.
Owner
|
@dbraendle Thanks for the contribution. I merged this with a follow-up adjustment on top of your branch. Reason for the change:
This keeps the benefit for self-hosted and authenticated installs, without changing the normal path for public websites. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--nameparameterProblem
When running e.g.
pake https://grafana.mylab.local --name Grafana, the icon services try to resolve the favicon forgrafana.mylab.local. Since the app is behind auth,/favicon.icoreturns a redirect or error. The services then match the root domain and return an incorrect generic icon.Solution
Before trying domain-based services, attempt to fetch the icon from
cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/{name}.pngusing the--nameparameter. This covers 500+ popular selfhosted applications. If the name doesn't match any dashboard icon (404), the existing flow continues unchanged.Test plan
--name Grafana→ correct Grafana icon fetchedpake https://twitter.com --name Twitter)