feat: Slot-basierter Auto-Refresh mit konfigurierbarer Startzeit
Auto-Refresh nutzt jetzt eine feste Anker-Uhrzeit (refresh_start_time) statt reinem Intervall-basiertem Driften. Verpasste Slots werden max. 1x aufgeholt. Bestehendes Intervall-Verhalten bleibt als Fallback erhalten (ohne Startzeit). Migration: Bestehende Auto-Lagen erhalten 07:00 als Startzeit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -398,6 +398,10 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group conditional-field" id="refresh-starttime-field">
|
||||
<label for="inc-refresh-starttime">Erste Aktualisierung um <span class="info-icon tooltip-below" data-tooltip="Legt den Startzeitpunkt fest. Danach wird im eingestellten Intervall aktualisiert."><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></span></label>
|
||||
<input type="time" id="inc-refresh-starttime" value="07:00" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inc-retention">Aufbewahrung (Tage) <span class="info-icon tooltip-below" data-tooltip="Nach Ablauf wird die Lage automatisch archiviert. 0 = unbegrenzt aufbewahren."><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></span></label>
|
||||
<input type="number" id="inc-retention" min="0" max="999" value="30" placeholder="0 = Unbegrenzt">
|
||||
|
||||
@@ -821,9 +821,16 @@ const App = {
|
||||
: '';
|
||||
}
|
||||
|
||||
{ const _e = document.getElementById('meta-refresh-mode'); if (_e) _e.textContent = incident.refresh_mode === 'auto'
|
||||
? `Auto alle ${App._formatInterval(incident.refresh_interval)}`
|
||||
: 'Manuell'; }
|
||||
{ const _e = document.getElementById('meta-refresh-mode'); if (_e) {
|
||||
if (incident.refresh_mode === 'auto' && incident.refresh_start_time) {
|
||||
const intervalText = App._formatInterval(incident.refresh_interval);
|
||||
_e.textContent = `Auto alle ${intervalText} ab ${incident.refresh_start_time} Uhr`;
|
||||
} else if (incident.refresh_mode === 'auto') {
|
||||
_e.textContent = `Auto alle ${App._formatInterval(incident.refresh_interval)}`;
|
||||
} else {
|
||||
_e.textContent = 'Manuell';
|
||||
}
|
||||
} }
|
||||
|
||||
// International-Badge
|
||||
const intlBadge = document.getElementById('intl-badge');
|
||||
@@ -1517,6 +1524,9 @@ const App = {
|
||||
type: document.getElementById('inc-type').value,
|
||||
refresh_mode: document.getElementById('inc-refresh-mode').value,
|
||||
refresh_interval: interval,
|
||||
refresh_start_time: document.getElementById('inc-refresh-mode').value === 'auto'
|
||||
? document.getElementById('inc-refresh-starttime').value || null
|
||||
: null,
|
||||
retention_days: parseInt(document.getElementById('inc-retention').value) || 0,
|
||||
international_sources: document.getElementById('inc-international').checked,
|
||||
include_telegram: document.getElementById('inc-telegram').checked,
|
||||
@@ -1914,6 +1924,7 @@ async handleRefresh() {
|
||||
{ const _e = document.getElementById('inc-type'); if (_e) _e.value = incident.type || 'adhoc'; }
|
||||
{ const _e = document.getElementById('inc-refresh-mode'); if (_e) _e.value = incident.refresh_mode; }
|
||||
App._setIntervalFields(incident.refresh_interval);
|
||||
{ const _e = document.getElementById('inc-refresh-starttime'); if (_e) _e.value = incident.refresh_start_time || '07:00'; }
|
||||
{ const _e = document.getElementById('inc-retention'); if (_e) _e.value = incident.retention_days; }
|
||||
{ const _e = document.getElementById('inc-international'); if (_e) _e.checked = incident.international_sources !== false && incident.international_sources !== 0; }
|
||||
{ const _e = document.getElementById('inc-telegram'); if (_e) _e.checked = !!incident.include_telegram; }
|
||||
@@ -3214,7 +3225,9 @@ function buildDetailedSourceOverview() {
|
||||
function toggleRefreshInterval() {
|
||||
const mode = document.getElementById('inc-refresh-mode').value;
|
||||
const field = document.getElementById('refresh-interval-field');
|
||||
const startField = document.getElementById('refresh-starttime-field');
|
||||
field.classList.toggle('visible', mode === 'auto');
|
||||
if (startField) startField.classList.toggle('visible', mode === 'auto');
|
||||
}
|
||||
|
||||
function updateIntervalMin() {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren