From 67e274fd4e4bf186290de41447c7a480b4888b73 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sun, 31 May 2026 22:16:46 -0400 Subject: [PATCH] =?UTF-8?q?ui:=20transcode=20active=20sessions=20=E2=80=94?= =?UTF-8?q?=20static=202=C3=972=20balanced=20grid,=20no=20scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Splits up to 4 sessions into two balanced columns (ceil/floor split), separated by a subtle divider. A '+N more' line appears beyond 4. Co-Authored-By: Claude Sonnet 4.6 --- Plugin/unraid/pages/monitor.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Plugin/unraid/pages/monitor.php b/Plugin/unraid/pages/monitor.php index 1436cb9..7e5d29e 100644 --- a/Plugin/unraid/pages/monitor.php +++ b/Plugin/unraid/pages/monitor.php @@ -1326,19 +1326,28 @@ function vvPollMonitor() { let sessHtml = ''; if (activeSessions.length) { - let rowsHtml = ''; - activeSessions.forEach(s => { + function vvTcRow(s) { const meth = s.method.replace('Transcode', 'TC').replace('Direct ', ''); - rowsHtml += `
+ return `
${vvSrvIcon(s.server_type, s.server)} ${s.title} ${typeLabel(s.type)} ${meth}
`; - }); + } + const shown = activeSessions.slice(0, 4); + const mid = Math.ceil(shown.length / 2); + const colA = shown.slice(0, mid).map(vvTcRow).join(''); + const colB = shown.slice(mid).map(vvTcRow).join(''); + const colBDiv = colB ? `
${colB}
` : ''; + const overflow = activeSessions.length > 4 + ? `
+${activeSessions.length - 4} more
` + : ''; sessHtml = `
Active transcodes ${activeSessions.length}
-
${rowsHtml}
+
+
${colA}
${colBDiv} +
${overflow}
`; }