-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add log viewer directly to the main UI #2883
Comments
@cdjackson I had planned to do this once with a SSE source: but as I thought openHAB's future was to move from SSEs to WebSockets I abandoned the idea. |
Thanks @ghys Yes, I'm using the websocket interface you reference - it's working quite well in my testing. Since it looks like there's nothing currently being worked on, I'll try and get a draft (and rough) PR out in the next week or so. Currently I'm fighting some CSS issues (I'dd forgotten how much I hate CSS!). I've got a few different ways to filter / highlight the logs to try and make them a bit easier to view (one of my main drivers). I have a question that maybe you can point me in the right direction - currently I've hard coded a token to access websockets - is there some way that this can be done automatically? Can you point me at some code? Thanks. |
This is normally handled in https://github.com/openhab/openhab-webui/blob/main/bundles/org.openhab.ui/web/src/components/auth-mixin.js and https://github.com/openhab/openhab-webui/blob/main/bundles/org.openhab.ui/web/src/js/openhab/auth.js. You're not supposed to have a way to get the current access_token which is refreshed regularly every hour or so before it expires - but instead use APIs and abstraction layers which will use it for you, refresh it when necessary, but not expose it. Since there's no current WebSocket client implementation yet it's a blank state how to deal with the access token in a new WebSocket API... As for the presentation this is definitely a developer tool so it belongs there, but we could also have it part of the "developer sidebar", eventually opening a bottom drawer (https://v5.framework7.io/docs/sheet-modal) so you can see the logs while working on other stuff. |
milestone is not set, i guess this was allready available in 4.3 ? |
We don’t set milestones on issues … but the linked PR has the 4.3 milestone. |
sorry, somehow missed this was the issue not the PR. Got to leave my computer for some time..... |
Currently frontail is available as an addon in openhabian. I just moved my main system to a new server that's not openhabian - Frontail requires a lot of dependencies so I wanted to avoid loading it - it also seems to be no longer developed, and it would be nice(r) IMHO to have a log viewer directly embedded within the Developer Tools menu in the main UI. I guess given there is a websocket
/logs
endpoint in the core, this was also considered as the way forward...I just wanted to raise this issue for visibility / comment. Is anyone working on such a viewer? I've not found anything from a quick search other than these closed issues.
#1185
#1109
I very quickly hacked something together last week as an initial concept to display the logs and manipulate logging levels - it needs a LOT more work to make it what I'd personally like to see. If someone is already working on a viewer or has plans, or has a minimum product etc, then I won't spend too much time on it, but if not I might look to put together a minimum solution. Conversely, if someone does have something running, maybe they'd like to share...
The text was updated successfully, but these errors were encountered: