v1.6.3: Logs SARA en temps reel — auto-refresh + python3 -u unbuffered
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,9 @@
|
||||
<div class="card-header">
|
||||
<span data-i18n="logs.saraLogs">Sara logs</span>
|
||||
<button type="submit" class="btn btn-secondary btn-sm" id="refresh-master-log" data-i18n="logs.refresh">Refresh</button>
|
||||
<button type="button" class="btn btn-sm" id="auto-refresh-toggle" onclick="toggleAutoRefresh()">
|
||||
<span id="auto-refresh-icon">▶</span> Auto
|
||||
</button>
|
||||
<button type="submit" class="btn btn-secondary btn-sm" onclick="clear_loopLogs()" data-i18n="logs.clear">Clear</button>
|
||||
|
||||
<span id="script_running"></span>
|
||||
@@ -274,6 +277,32 @@ function clear_loopLogs(){
|
||||
});
|
||||
}
|
||||
|
||||
// Auto-refresh for SARA logs
|
||||
let autoRefreshInterval = null;
|
||||
const AUTO_REFRESH_MS = 3000;
|
||||
|
||||
function toggleAutoRefresh() {
|
||||
const btn = document.getElementById('auto-refresh-toggle');
|
||||
const icon = document.getElementById('auto-refresh-icon');
|
||||
|
||||
if (autoRefreshInterval) {
|
||||
clearInterval(autoRefreshInterval);
|
||||
autoRefreshInterval = null;
|
||||
icon.textContent = '▶';
|
||||
btn.classList.remove('btn-success');
|
||||
btn.classList.add('btn-secondary');
|
||||
} else {
|
||||
// Refresh immediately, then every N seconds
|
||||
displayLogFile('../logs/sara_service.log', document.getElementById('card_loop_content'), true, 1000);
|
||||
autoRefreshInterval = setInterval(() => {
|
||||
displayLogFile('../logs/sara_service.log', document.getElementById('card_loop_content'), true, 1000);
|
||||
}, AUTO_REFRESH_MS);
|
||||
icon.textContent = '⏸';
|
||||
btn.classList.remove('btn-secondary');
|
||||
btn.classList.add('btn-success');
|
||||
}
|
||||
}
|
||||
|
||||
function getModem_busy_status() {
|
||||
//console.log("Getting modem busy status");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user