chore: update watchlist features and fixes

This commit is contained in:
root
2026-02-28 09:22:57 +00:00
parent 4c96d0c1c5
commit 20bcc75b9b
64 changed files with 5193 additions and 77 deletions
+15 -5
View File
@@ -425,19 +425,29 @@ function updateSchedulerUI(status) {
const stopBtn = document.getElementById('stopSchedulerBtn');
const nextRunInfo = document.getElementById('nextRunInfo');
if (!startBtn || !stopBtn || !nextRunInfo) return;
// nextRunInfo is required, but buttons are optional
if (!nextRunInfo) {
console.warn('nextRunInfo element not found');
return;
}
if (status.running) {
startBtn.style.display = 'none';
stopBtn.style.display = 'inline-block';
// Update buttons if they exist
if (startBtn) startBtn.style.display = 'none';
if (stopBtn) stopBtn.style.display = 'inline-block';
if (status.next_run) {
const nextRun = new Date(status.next_run);
nextRunInfo.innerHTML = `✓ En cours<br>Prochaine vérification: ${nextRun.toLocaleString('fr-FR')}`;
} else {
// Scheduler running but no next_run yet (just started)
const interval = status.settings?.check_interval_hours || 6;
nextRunInfo.innerHTML = `✓ En cours<br>Vérification toutes les ${interval}h`;
}
} else {
startBtn.style.display = 'inline-block';
stopBtn.style.display = 'none';
// Update buttons if they exist
if (startBtn) startBtn.style.display = 'inline-block';
if (stopBtn) stopBtn.style.display = 'none';
nextRunInfo.innerHTML = '⏸️ Arrêté';
}
}