From 2db01f6f51867549fb350b9b18b1b398c61de464 Mon Sep 17 00:00:00 2001 From: "Codex, agent ChatGPT" Date: Thu, 12 Mar 2026 18:13:46 +0100 Subject: [PATCH] Keep only the request column fluid --- internal/web/handler.go | 58 +++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/internal/web/handler.go b/internal/web/handler.go index e9c7ccf..37636ab 100644 --- a/internal/web/handler.go +++ b/internal/web/handler.go @@ -909,15 +909,22 @@ const queryLogHTML = ` .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; } .toolbar-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; } .page-status { color: #cbd5e1; font-size: .92rem; } - .table-shell { overflow-x: auto; overflow-y: hidden; } - table { width: 100%; border-collapse: collapse; table-layout: auto; } - th, td { padding: .6rem .65rem; border-bottom: 1px solid #1e293b; text-align: left; vertical-align: top; } + .table-shell { overflow: hidden; } + table { width: 100%; border-collapse: collapse; table-layout: fixed; } + th, td { padding: .6rem .65rem; border-bottom: 1px solid #1e293b; text-align: left; vertical-align: top; min-width: 0; } thead th { color: #93c5fd; } tbody tr:nth-child(even) { background: rgba(15, 23, 42, .55); } - th.tight, td.tight { white-space: nowrap; width: 1%; } - th.request-col, td.request-cell { width: 100%; min-width: 18rem; } - td.request-cell { overflow: hidden; } - .request-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .col-time, .col-source, .col-ip, .col-method, .col-status, .col-state, .col-reason, .col-actions { white-space: nowrap; } + .col-time { width: 11rem; } + .col-source { width: 7rem; } + .col-ip { width: 12rem; } + .col-method { width: 5.5rem; } + .col-status { width: 4.5rem; } + .col-state { width: 6.5rem; } + .col-reason { width: 12rem; overflow: hidden; } + .col-actions { width: 11rem; } + .col-request { width: auto; overflow: hidden; } + .request-text, .reason-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .status { display: inline-block; padding: .15rem .45rem; border-radius: 999px; font-size: .8rem; background: #1e293b; } .status.blocked { background: #7f1d1d; } .status.review { background: #78350f; } @@ -961,6 +968,7 @@ const queryLogHTML = ` header { padding: .9rem 1rem; } main { padding: 1rem; } .panel { padding: .85rem; } + .table-shell { overflow-x: auto; } table { min-width: 900px; } } @@ -1005,15 +1013,15 @@ const queryLogHTML = ` - - - - - - - - - + + + + + + + + + @@ -1212,15 +1220,15 @@ const queryLogHTML = ` const requestLabel = ((item.host || '') ? (item.host + item.uri) : (item.uri || '—')); return [ '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', '' ].join(''); });
TimeSourceIPMethodRequestStatusStateReasonActionsTimeSourceIPMethodRequestStatusStateReasonActions
' + escapeHtml(formatDate(item.occurred_at)) + '' + escapeHtml(item.source_name || '—') + '
' + renderBotChip(item.bot) + '' + escapeHtml(item.client_ip || '—') + '
' + escapeHtml(item.method || 'OTHER') + '' + escapeHtml(requestLabel) + '' + escapeHtml(String(item.status || 0)) + '' + escapeHtml(item.current_state || 'observed') + '' + escapeHtml(item.decision_reason || '—') + '' + renderActions(item) + '' + escapeHtml(formatDate(item.occurred_at)) + '' + escapeHtml(item.source_name || '—') + '
' + renderBotChip(item.bot) + '' + escapeHtml(item.client_ip || '—') + '
' + escapeHtml(item.method || 'OTHER') + '' + escapeHtml(requestLabel) + '' + escapeHtml(String(item.status || 0)) + '' + escapeHtml(item.current_state || 'observed') + '' + escapeHtml(item.decision_reason || '—') + '' + renderActions(item) + '