-
-
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
Log viewer: Fixed column width for timestamp, level & logger name #3011
Log viewer: Fixed column width for timestamp, level & logger name #3011
Conversation
6c64709
to
876a56c
Compare
#2721 Bundle Size — 10.98MiB (~+0.01%).f8c86bb(current) vs bf2f2ee main#2718(baseline) Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
|
Current #2721 |
Baseline #2718 |
|
---|---|---|
Initial JS | 1.9MiB |
1.9MiB |
Initial CSS | 577.21KiB |
577.21KiB |
Cache Invalidation | 17.39% |
17.39% |
Chunks | 227 |
227 |
Assets | 250 |
250 |
Modules | 2951 |
2951 |
Duplicate Modules | 154 |
154 |
Duplicate Code | 1.8% |
1.8% |
Packages | 98 |
98 |
Duplicate Packages | 2 |
2 |
Bundle size by type 2 changes
2 regressions
Current #2721 |
Baseline #2718 |
|
---|---|---|
JS | 9.19MiB (~+0.01% ) |
9.19MiB |
CSS | 867.25KiB (+0.02% ) |
867.06KiB |
Fonts | 526.1KiB |
526.1KiB |
Media | 295.6KiB |
295.6KiB |
IMG | 140.74KiB |
140.74KiB |
HTML | 1.38KiB |
1.38KiB |
Other | 871B |
871B |
Bundle analysis report Branch florian-h05:logviewer-limit-colu... Project dashboard
Generated by RelativeCI Documentation Report issue
/cc @cdjackson @ghys |
Thanks - I'll take a look later today. Just to mention I noticed a bug on the table / column widths a day or two ago. Due to the virtual table, the column widths change as you scroll up/down through the list - depending on what part of the log is displayed. This ought to fix this. Just for info I'm working on core changes and UI changes to improve the log display. By sending logs in an array rather than single messages speeds things up a hell of a lot (I've not tried it with zigbee debug yet, but sending through 100 lines of historic logs is essentially instantaneous rather than taking maybe a few hundred ms). |
Great to hear that and thanks for letting me know 👍 |
That’s because this PR was developed on top of your logger icon PR, the icon will avoid that behaviour. |
Instead of actually cutting the logger name, can't you do something with styling like suggested here: https://stackoverflow.com/questions/47926246/how-can-i-align-text-to-the-right-in-a-div-so-its-beginning-is-cut-down-with-ove ? Cutting the text on the number of characters is difficult when not using a fixed width character set. |
Setting width, and text-align right together with overflow hidden doesn't work. |
I will merge this soon, we can always come back and improve later if we find a better solution, but for now this already is an improvement. |
This style does align right and cut, but I can't get ellipsis to work:
|
I think I solved it: instead of a
and use this for the HTML:
|
Signed-off-by: Florian Hotze <dev@florianhotze.com>
b239fbb
to
f8c86bb
Compare
Thanks for the help @mherwege, got it working now with some extra styling. |
Bildschirmaufnahme_20250115_184520.webm |
width 50px | ||
|
||
td.logger | ||
width 280px |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t need this when testing in Firefox. It will not harm either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed this when developing in Chromium.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some strange reason, when I was trying this, things worked in Firefox, but I couldn’t even get the websocket connection to start in Chrome, so no way to test (there was an error in the console). That is obviously another issue and I will keep an eye out for it.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Refs openhab#3011. Signed-off-by: Florian Hotze <dev@florianhotze.com>
I agree, will change that: #3026 |
Refs #3011. Signed-off-by: Florian Hotze <dev@florianhotze.com>
Thanks @florian-h05 I'll take a look. |
When using the log viewer, I have regularly noticed that the time column is wider than required, as well as the logger name column taking up much space and making the message column move if a new log with a longer logger name comes in.
This PR sets the width of the time, level and logger name columns to a fixed value and limits the logger name length to the last 40 chars, which is enough to identify the logger.