From 6c6470910d6d70da86f493a3ad933218793115ae Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Mon, 13 Jan 2025 14:27:15 +0100 Subject: [PATCH] Log viewer: Limit column width Signed-off-by: Florian Hotze --- .../web/src/pages/developer/log-viewer.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue b/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue index e630449ff2..968ec56335 100644 --- a/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue +++ b/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue @@ -197,8 +197,6 @@ width 100% display flex flex-direction column - overflow hidden - border-radius 0 .table-block padding 0 @@ -227,9 +225,18 @@ 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 tr.table-rows height 31px @@ -335,6 +342,7 @@ export default { batchLogs: [], nextId: 0, maxEntries: 2000, + maxLoggerNameLength: 40, logStart: '--:--:--', logEnd: '--:--:--', currentHighlightColorItemIndex: null, @@ -449,9 +457,11 @@ export default { renderEntry (entity) { let tr = document.createElement('tr') tr.className = 'table-rows ' + entity.level.toLowerCase() + let loggerName = entity.loggerName + if (loggerName.length > this.maxLoggerNameLength) loggerName = loggerName.substring(loggerName.length - this.maxLoggerNameLength) tr.innerHTML = `${entity.time}${entity.milliseconds}` + - `${entity.level}` + - `${entity.loggerName}` + + `${entity.level}` + + `${loggerName}` + `${this.highlightText(entity.message)}` return tr },