chore: update watchlist features and fixes
This commit is contained in:
@@ -148,17 +148,29 @@
|
||||
const stopBtn = document.getElementById('stopSchedulerBtn');
|
||||
const nextRunInfo = document.getElementById('nextRunInfo');
|
||||
|
||||
// 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é';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user