Make BPQ console station-independent with modem detection and Windows installer

This commit is contained in:
alberto committed 2026-10-14 19:43:01 +02:00
1 parent 5a50f0cfdf
commit 3bf26cec13
22 files changed
+285 -133

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ $('#monitor-stop').onclick=async()=>{try{await api('/monitor/disconnect',{method
$('#monitor-pause').onclick=()=>{paused=!paused;$('#monitor-pause').textContent=paused?'Riprendi':'Pausa';if(!paused)render();else $('#monitor-count').textContent+=' · visualizzazione in pausa';};
$('#monitor-clear').onclick=()=>{events=[];render();};
for(const id of ['monitor-port','monitor-direction','monitor-search'])$('#'+id).addEventListener('input',()=>{if(!paused)render()});
$('#monitor-export').onclick=()=>{const list=filtered();if(!list.length){toast('Nessun frame da scaricare');return;}const blob=new Blob([list.map(e=>`[${e.at}] ${e.direction} P${e.port||'?'}\n${e.text}\n`).join('\n')],{type:'text/plain;charset=utf-8'}),url=URL.createObjectURL(blob),a=document.createElement('a');a.href=url;a.download='ALNODE-monitor-'+new Date().toISOString().replace(/[:.]/g,'-')+'.txt';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);};
$('#monitor-export').onclick=()=>{const list=filtered();if(!list.length){toast('Nessun frame da scaricare');return;}const blob=new Blob([list.map(e=>`[${e.at}] ${e.direction} P${e.port||'?'}\n${e.text}\n`).join('\n')],{type:'text/plain;charset=utf-8'}),url=URL.createObjectURL(blob),a=document.createElement('a');a.href=url;a.download='BPQ-monitor-'+new Date().toISOString().replace(/[:.]/g,'-')+'.txt';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);};
setInterval(()=>{if(csrf&&page==='monitor')poll()},1000);
window.addEventListener('hashchange',()=>{if(location.hash==='#monitor')navigate('monitor')});
if(location.hash==='#monitor')navigate('monitor');