Add refresh countdown, fix quota fs lookup, update README
- 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>
This commit is contained in:
1 parent
6631b9e832
commit
f4943b6b6d
4 files changed
+75
-14
No files matched your search
@@ -57,5 +57,5 @@ async function loadDashboard() {
|
||||
}).join('');
|
||||
}
|
||||
|
||||
document.getElementById('lastRefresh').textContent = new Date().toLocaleTimeString();
|
||||
_startRefreshCountdown();
|
||||
}
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
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(); }, 30_000);
|
||||
setInterval(() => { loadDashboard(); loadShares(); loadUsers(); }, REFRESH_INTERVAL * 1000);
|
||||
Reference in new issue
Block a user