stakater / Forecastle

Forecastle is a control panel which dynamically discovers and provides a launchpad to access applications deployed on Kubernetes – [✩Star] if you're using it!
https://stakater.com
Apache License 2.0
588 stars 59 forks source link

[BUG] Icons don't get displayed #412

Closed lachnerd closed 5 months ago

lachnerd commented 8 months ago

Describe the bug

CSS of every app element truns into this:

<div class="MuiCardMedia-root jss18" title="kroki" style="background-image: url(&quot;`https://github.com/walkxcode/dashboard-icons/blob/main/png/alpine.png`&quot;);"></div>

Theres " added at the beginning and the end of the image url with leads to the icon image beeing not rendered on the page

To Reproduce just add an icon

Expected behavior Icon gets displayed

Screenshots

image

Environment

MuneebAijaz commented 8 months ago

@lachnerd can you pls share the version you are using and the manifests you are applying? we will try to reproduce the issue

lachnerd commented 8 months ago

Hi, i'm now using stakater/forecastle:v1.0.134 with the helm chart.

I added forecastle config as ingress annotations:

ingress:
  enabled: true
  hostname: keycloak.domain.tld
  ingressClassName: internal-global
  annotations: 
    forecastle.stakater.com/expose: 'true'
    forecastle.stakater.com/icon: 'https://github.com/stakater/ForecastleIcons/blob/master/keycloak.png'
    forecastle.stakater.com/group: 'Tools'

which leads to :

<button class="MuiButtonBase-root MuiCardActionArea-root" tabindex="0" type="button"><div class="MuiGrid-root jss17"><div class="MuiCardMedia-root jss18" title="keycloak" style="background-image: url(&quot;https://github.com/stakater/ForecastleIcons/blob/master/keycloak.png&quot;);"></div></div><span class="MuiCardActionArea-focusHighlight"></span><span class="MuiTouchRipple-root"></span></button>

Using CRDs leads to the exact same result

bnallapeta commented 6 months ago

@lachnerd I tested this on my cluster with both ingress annotations as well as ForecastleApp CRD.

It works as expected when you use the right kind of URL for the image.

this works - https://raw.githubusercontent.com/stakater/ForecastleIcons/master/keycloak.png

while this does not - https://github.com/stakater/ForecastleIcons/blob/master/keycloak.png

here's a screenshot to show both of them:

image

Please verify this at your end and feel free to close the issue if its working.

bnallapeta commented 5 months ago

Closing the issue with the above provided resolution.