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

Log viewer: Fixed column width for timestamp, level & logger name #3011

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,27 @@
td.sticky
position sticky
left 0
width 105px
color black
background #f1f1f1
z-index 1
white-space nowrap
overflow hidden

td.level
width 50px

td.logger
width 280px
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.


span.logger
width 280px
display block
direction rtl
overflow hidden
text-overflow ellipsis
white-space nowrap

tr.table-rows
height 31px

Expand Down Expand Up @@ -335,6 +350,7 @@ export default {
batchLogs: [],
nextId: 0,
maxEntries: 2000,
maxLoggerNameLength: 40,
florian-h05 marked this conversation as resolved.
Show resolved Hide resolved
logStart: '--:--:--',
logEnd: '--:--:--',
currentHighlightColorItemIndex: null,
Expand Down Expand Up @@ -468,8 +484,8 @@ export default {
break
}
tr.innerHTML = '<td class="sticky"><i class="icon f7-icons" style="font-size: 18px;">' + icon + `</i> ${entity.time}<span class="milliseconds">${entity.milliseconds}</span></td>` +
`<td>${entity.level}</td>` +
`<td>${entity.loggerName}</td>` +
`<td class="level">${entity.level}</td>` +
`<td class="logger"><span class="logger">${entity.loggerName}</span></td>` +
`<td class="nowrap">${this.highlightText(entity.message)}</td>`
return tr
},
Expand Down
Loading