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

Brilliant #212

Closed
Rukongai opened this issue Dec 19, 2023 · 19 comments
Closed

Brilliant #212

Rukongai opened this issue Dec 19, 2023 · 19 comments

Comments

@Rukongai
Copy link

Seriously - this is the first of its kind in self hosted dashboards. Agnostic OIDC allowing me to restrict dashboard items based on groups is something I wanted for a long time!

If you take feature requests, i'd love the ability to be able to set default settings for my users (default them to unsplash or a custom wallpaper, for example)

It'd also be nice to be able to choose different locations for the apps to appear, like just under the search bar.

One last ask, would be to have a help text option, that would either display additional text information about a tile either on hover, or attached to a small ? on each tile with the property. Or however else.

Anyways, thank you again. So happy this exists.

@Rukongai
Copy link
Author

Oh - and I don't know how edge case this is - but it'd be nice to have the ability to set the headers the dashboard authenticates against. I had to have my idp rewrite the headers, which was workable, but it'd allow it to be easier to use for sure.

That and parse/strip the header values. I had to write a custom expression to pass the groups header properly out of Authentik, and couldn't figure out why it wasn't working. Turns out it was getting hung up on newlines, so if there was a way to strip newlines/whitespace, that might help?

@knrdl
Copy link
Owner

knrdl commented Dec 20, 2023

thanks for your positive feedback :)
you brought up many good points of possible optimizations ... I will definitely look into it, but it may take some time

@knrdl
Copy link
Owner

knrdl commented Dec 30, 2023

Hubleys was my "learning Sveltekit" project. So I had to refactor a bit in order to implement new features. But I think it was worth it.
Please give it a try by running the docker image with the edge tag: ghcr.io/knrdl/hubleys-dashboard:edge. (Backup your data folder first!)

If you take feature requests, i'd love the ability to be able to set default settings for my users (default them to unsplash or a custom wallpaper, for example)

now possible via /data/users/default-config.json

It'd also be nice to be able to choose different locations for the apps to appear, like just under the search bar.

new dashboard settings ui

One last ask, would be to have a help text option, that would either display additional text information about a tile either on hover, or attached to a small ? on each tile with the property. Or however else.

that one was a bit tricky. a popup on tile hover is not mobile friendly. and small (?) popups tend to overload the ui.
so instead I implemented subtitles for tiles and menus, and also messages which can be shown on the dashboard.

Oh - and I don't know how edge case this is - but it'd be nice to have the ability to set the headers the dashboard authenticates against. I had to have my idp rewrite the headers, which was workable, but it'd allow it to be easier to use for sure.

now possible via env vars, see https://github.com/knrdl/hubleys-dashboard/blob/main/Dockerfile#L49

That and parse/strip the header values. I had to write a custom expression to pass the groups header properly out of Authentik, and couldn't figure out why it wasn't working. Turns out it was getting hung up on newlines, so if there was a way to strip newlines/whitespace, that might help?

tried to implement that: https://github.com/knrdl/hubleys-dashboard/blob/main/src/hooks.server.ts#L13
but not sure if it helps, please test it

From your PR: #213

You may need to restart the application to have the icons load correctly

that one should be fixed now too

@Rukongai
Copy link
Author

Rukongai commented Jan 2, 2024

Having an issue with the edge build. It's 404ing and the container is reporting unhealthy. I've deleted and set perms on the data folder, so i'm not sure what's going on. I'll keep poking at it.

@Rukongai
Copy link
Author

Rukongai commented Jan 2, 2024

Would there be a new or different header requirement from the current docker image from Oct 27th?

I'm not sure what the issue is. I have it reverse proxied through traefik using docker labels, which works great for the previous version but is throwing a 404 with the edge build.

I've set log level to debug through ENV, but the container isn't actually throwing errors

2024-01-02T04:11:43.544219365Z up and running

2024-01-02T04:11:43.584191784Z Listening on 0.0.0.0:3000

Here is the docker config I'm using

version: '2.4'

services:
  hubleys:
    image: ghcr.io/knrdl/hubleys-dashboard:edge
    hostname: hubleys
    restart: unless-stopped
    env_file:
      - stack.env
    labels:
      traefik.enable: true
      traefik.http.routers.dash.rule: Host(`tld.domain`)
      traefik.http.routers.dash.entryPoints: web-secure
      traefik.http.routers.dash.middlewares: auth@file #this is a forward auth redirect middleware for authentik
      traefik.http.services.dash.loadbalancer.server.port: 3000

    volumes:
      - /path/to/appdata/hubley-dashboard:/data 
    networks:
      - proxy
    mem_limit: 100m

networks:
  proxy:
    external: true

stack.env has

OPENWEATHERMAP_API_KEY=blahblahblah
UNSPLASH_API_KEY=blahblahblah
ADMIN_USERIDS=blahblahblah
LOG_LEVEL=debug

I've cleared out the data folder as well, made sure permissions were right. The docker compose works perfectly with the current build

@knrdl
Copy link
Owner

knrdl commented Jan 3, 2024

the healthcheck was broken, so it always reported unhealthy ... now fixed.

Traefik ignores starting and unhealthy containers. So from traefik's point of view, your routing rules simply didn't exist.
As a result, it returned 404's. That's pretty misleading IMHO. But at least you can configure traefik to return more meaningful 503's instead: https://doc.traefik.io/traefik/providers/docker/#allowemptyservices

@Rukongai
Copy link
Author

Rukongai commented Jan 3, 2024

Thanks for the update. Been going through and testing things

I've tested the default settings, icon positions, messages, subtitles and they're all working flawlessly

The headers seem to be working as well.

The only issue i've run into with the edge build is that my svg icons will no longer render. I needed to use png instead

@knrdl
Copy link
Owner

knrdl commented Jan 4, 2024

svg icons work flawlessly for me in firefox and chrome. not sure where that problem comes from

@Rukongai
Copy link
Author

Rukongai commented Jan 4, 2024

Interesting. So I started digging into it a little more and what i'm seeing is that the svg now has a plaintext content type rather than image/svg+xml

I'm not sure what the cause could be, but with the edge version - the svg is loading with a content/mime type text/plain, and on the old version it loads correctly as image

The file referenced is identical and is reporting as image/svg+xml on the host machine. Any ideas?

Screenshot 2024-01-04 at 4 13 00 PM Screenshot 2024-01-04 at 4 13 59 PM /svg+xml

@knrdl
Copy link
Owner

knrdl commented Jan 5, 2024

very good observation! you were right, I tested wrong ... now fixed

@Rukongai
Copy link
Author

Rukongai commented Jan 5, 2024

It's working great. I'm going to go ahead and close out this issue! Thanks for all the changes, I honestly didn't expect you to jump on them and knock them all out. Thanks a billion.

@Rukongai Rukongai closed this as completed Jan 5, 2024
@K-J-VV
Copy link

K-J-VV commented Jan 6, 2024

very good observation! you were right, I tested wrong ... now fixed

I've tried both v0.1.0 as well as edge, but my instance appears to have an issue rendering svg icons as well? It was working back on v0.6.0

Any advice on how to troubleshoot? Preferred browser is Chrome

@knrdl
Copy link
Owner

knrdl commented Jan 6, 2024

please provide more details: what problems exactly? icon filename? icon content?

@knrdl knrdl reopened this Jan 6, 2024
@K-J-VV
Copy link

K-J-VV commented Jan 7, 2024

All of my icons are .svg files, and it seems like now none of the files are being pulled/rendered correctly? (FYI, I am not a coder/developer; just an advanced homelaber). Image attached of what my screen is like.

I have cleared all cookies, history, used a new browser (Firefox); but still the same end result.

There are no error logs in my Hubley's instance. I've seen before where I map an icon incorrectly and the log notifies me of the files not being found/accessible, but there are no errors

image

@knrdl
Copy link
Owner

knrdl commented Jan 7, 2024

that is odd. please check:

  • your images are in the /data/logos folder
  • your images have the file extension .svg in the filename
  • your images are readable by the user with uid=1000 (that's the user hubleys runs as, in the container)

if the wekan logo file is "wekan.svg", please open in the browser https://yourhubleys.instance/logo/wekan ... you should see the image being displayed

please also provide your docker-compose.yaml or k8s manifest for hubleys

@K-J-VV
Copy link

K-J-VV commented Jan 7, 2024

  • docker-compose regarding volumes:
    volumes: - ./data:/data - /mnt/Media/Icons:/data/logos

  • ownership of /mnt/Media/Icons folder & the wekan.svg file is 1000:1000

  • can confirm mounts correctly when entering Hubley console and navigating to /data/logos (i.e., /data/logos/wekan.svg exists)

  • config.yml for the WeKan app:
    `tiles:

  • image filename of WeKan icon: wekan.svg

  • result when navigating to hubleys.example.com/logos/wekan.svg
    image

@K-J-VV
Copy link

K-J-VV commented Jan 7, 2024

When I take down the container, remove it, change release tag back to 0.0.6; everything renders correctly

image

Navigating to hubleys.example.com/logos/wekan.svg results in:

image

@knrdl
Copy link
Owner

knrdl commented Jan 7, 2024

ahh, you are not supposed to use the full image path in config.yml! Please change into logo: wekan.svg or logo: wekan

@K-J-VV
Copy link

K-J-VV commented Jan 7, 2024

Amazing, you have no idea how many variations I tried lol

Thank you! All working

@knrdl knrdl closed this as completed Jan 7, 2024
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

No branches or pull requests

3 participants