Files
grepo-remote/static/js/app.js
2026-05-01 01:13:18 +03:00

19 lines
868 B
JavaScript

// ================================================================
// Boot Sequence
// ================================================================
window.addEventListener('DOMContentLoaded', () => {
window.fetchTowns();
window.fetchLog(); // pre-loads cmds globally even in queue mode
window.fetchClientStatus();
window.fetchCaptchaStatus();
setInterval(window.fetchTowns, window.POLL_INTERVAL);
// In log mode: fetchLog refreshes the panel. In queue mode: refreshLogPanel polls the queue.
setInterval(() => {
window.fetchLog(); // always keep cmds cache fresh for resource display
window.refreshLogPanel(); // refresh whichever panel is visible
}, window.POLL_INTERVAL);
setInterval(window.fetchClientStatus, window.POLL_INTERVAL);
setInterval(window.fetchCaptchaStatus, 5000); // check every 5s
});