- main.js: show live countdown "Updated HH:MM:SS — next in Xs" so the 30s auto-refresh is visually obvious instead of just a static timestamp - app.py: rename _find_mountpoint → _find_quota_fs and fix the stale call site that caused a NameError; function now returns mountpoint from df, falling back to the path itself if df returns / - README: add full quota setup section (fstab usrquota, quotacheck, quotaon, verify with repquota); fix stale "127.0.0.1" bind note (service already uses 0.0.0.0); update Auth section (sessions, not Basic Auth) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
650 B
JavaScript
21 lines
650 B
JavaScript
const REFRESH_INTERVAL = 30;
|
|
let _countdownTimer = null;
|
|
|
|
function _startRefreshCountdown() {
|
|
if (_countdownTimer) clearInterval(_countdownTimer);
|
|
let secs = REFRESH_INTERVAL;
|
|
const el = document.getElementById('lastRefresh');
|
|
const update = () => {
|
|
const t = new Date().toLocaleTimeString();
|
|
el.textContent = `Updated ${t} — next in ${secs}s`;
|
|
if (secs <= 0) secs = REFRESH_INTERVAL; else secs--;
|
|
};
|
|
update();
|
|
_countdownTimer = setInterval(update, 1000);
|
|
}
|
|
|
|
loadDashboard();
|
|
loadShares();
|
|
loadUsers();
|
|
setInterval(() => { loadDashboard(); loadShares(); loadUsers(); }, REFRESH_INTERVAL * 1000);
|