Proactive log: inline TR hex, remove expand toggle + polling re-render
This commit is contained in:
+2
-24
@@ -3966,12 +3966,6 @@ function pysimStartBackendPoll() {
|
||||
pysimFetch('/api/stk-status'),
|
||||
pysimFetch('/api/poll-status'),
|
||||
]);
|
||||
const elLog = document.getElementById('pysim-proactive-log');
|
||||
const visible = elLog && elLog.parentElement && !elLog.parentElement.closest('.hidden');
|
||||
if (visible) {
|
||||
pysimProactiveLogRender();
|
||||
pysimEventsRender();
|
||||
}
|
||||
pysimUpdatePollUI(ps.enabled, ps.interval);
|
||||
if (Array.isArray(log) && log.length > 0) _hadData = true;
|
||||
if (_hadData && !ps.enabled && Array.isArray(log) && log.length === 0) {
|
||||
@@ -4021,15 +4015,12 @@ async function pysimProactiveLogRender() {
|
||||
if (qs) qual = ' [' + (qs[parseInt(e.qualifier,16)] || '0x'+e.qualifier.toUpperCase()) + ']';
|
||||
else qual = ' [0x' + e.qualifier.toUpperCase() + ']';
|
||||
}
|
||||
html += '<div data-plog-row="' + i + '">'
|
||||
+ '<div class="flex items-center gap-2 py-0.5">'
|
||||
+ (e.tr_hex ? '<span class="cursor-pointer select-none text-gray-400 hover:text-gray-600 dark:hover:text-gray-300" onclick="pysimPlogToggle(' + i + ')" id="plog-tog-' + i + '">▶</span>' : '<span class="w-3"></span>')
|
||||
html += '<div class="flex items-center gap-2 py-0.5">'
|
||||
+ '<span class="w-12 text-right text-gray-400">' + e.elapsed + 's</span>'
|
||||
+ '<span class="font-mono text-gray-400">0x' + e.type_hex.toUpperCase() + '</span>'
|
||||
+ '<span class="truncate">' + esc(name) + '</span>'
|
||||
+ (qual ? '<span class="text-[10px] text-gray-500 dark:text-slate-400">' + esc(qual) + '</span>' : '')
|
||||
+ '</div>'
|
||||
+ (e.tr_hex ? '<div class="pli-decode-panel hidden ml-4 pl-2 border-l border-gray-300 dark:border-slate-600" data-plog-data="' + i + '"><div class="text-[10px] font-mono text-gray-500 dark:text-slate-400 max-h-20 overflow-auto whitespace-pre-wrap">Response: ' + esc(e.tr_hex) + '\nSW: ' + esc(e.tr_sw) + '</div></div>' : '')
|
||||
+ (e.tr_hex ? '<span class="font-mono text-[10px] text-gray-400 dark:text-slate-500">' + esc(e.tr_hex) + '</span>' : '')
|
||||
+ '</div>';
|
||||
});
|
||||
el.innerHTML = html;
|
||||
@@ -4038,19 +4029,6 @@ async function pysimProactiveLogRender() {
|
||||
}
|
||||
}
|
||||
|
||||
function pysimPlogToggle(idx) {
|
||||
const panel = document.querySelector('[data-plog-data="' + idx + '"]');
|
||||
const tog = document.getElementById('plog-tog-' + idx);
|
||||
if (!panel || !tog) return;
|
||||
if (panel.classList.contains('hidden')) {
|
||||
panel.classList.remove('hidden');
|
||||
tog.textContent = '▼';
|
||||
} else {
|
||||
panel.classList.add('hidden');
|
||||
tog.textContent = '▶';
|
||||
}
|
||||
}
|
||||
|
||||
// ===== PLI data dictionary =====
|
||||
function decPlmn(hex3) {
|
||||
const h = hex3.replace(/\s/g, '').slice(0, 6);
|
||||
|
||||
Reference in New Issue
Block a user