hassio-addons / addon-log-viewer

Log Viewer - Home Assistant Community Add-ons
https://addons.community
MIT License
69 stars 7 forks source link

please make url "clean" #204

Closed 532910 closed 5 months ago

532910 commented 5 months ago

Problem/Motivation

"garbage" in url: https://ha.tld/a0d7b954_logviewer

Expected behavior

https://ha.tld/logviewer

The same as terminal: https://ha.tld/core_ssh

frenck commented 5 months ago

Feel free to suggest that to Home Assistant as a feature request. This is not something an add-on can do anything about.

../Frenck

532910 commented 5 months ago

so why does the terminal has clean url?

frenck commented 5 months ago

🤷 Because HA decided too.

532910 commented 5 months ago

https://community.home-assistant.io/t/log-viewer-addon-please-make-url-clean/713393

sinclairpaul commented 5 months ago

Just to add some context, the URL isn't "clean", it is prefixed with "core", which as you can see at https://github.com/home-assistant/supervisor/blob/c3c17b2bc30f24a6940523fad743bf57321705de/supervisor/store/__init__.py#L137 is what is hardcoded in the Supervisor for any HA specific addons.

I'm going to assume that your concern is that the URL may change, which it won't as the hash is based on the repo.

532910 commented 5 months ago

Nope, my concern is not that the URL may change, my concern is that the URL is not clean. I wouldn't like to see garbage in my address bar. Moreover, I'm against the fact that some "good" addons like ssh are allowed to have clean url, but "bad" addons are not. I believe all hassio-addons should be considered "good" with a clean url.

sinclairpaul commented 5 months ago

So maybe provide a suggestion, i.e. should all community addon's be prefixed with "community", how does that scale exactly.

Either way, the code base for generating the URL's is within the supervisor code, wish you luck with your feature request.