openanalytics/shinyproxy

ShinyProxy Logos not displayed when using CSS Template (3.1.0)

Closed this issue · 2 comments

Hi, I am using the new template provided here: https://github.com/openanalytics/shinyproxy-config-examples/blob/master/04-custom-html-template/templates/1col/index_new.html

However, none of the images are showing based on the logo-url that is in the application.yml, see example:

  • id: app1
    display-name: app1
    description: View and download hourly weather data.
    container-image: app1
    access-groups: [xxxxxxxxxxxxxxxx]
    logo-url: file:///srv/shiny/apps/app1/logo/app1.png

RESULT:
image
image

I need to be able to specify the path with logo-url and use it. I don't want to use the other template, where it just references the assets folder. I want to use the version that uses appLogos.get(app) as referenced in the docs:

How can we get this to work? Am I missing something?

Hi, this template was not yet updated for the ShinyProxy 3.1.0 release, I just fixed this.

Instead of using

          <img th:if="${appLogos.get(app) != null}" th:src="${appLogos.get(app)}">

you should now be using:

  <img class="img-responsive" th:if="${appLogos.get(app) != null}"
                             th:with="logo=${appLogos.get(app)}" th:height="${logo.height}" th:src="${logo.src}"
                             th:style="${logo.style}" th:width="${logo.width}">

This will fix the issue.

thank you sir. it worked just as i needed. gonna close the issue. @LEDfan