feat(monitoring): Manueller Refresh-Button im Sicherheits-Monitoring-Log
Auto-Refresh läuft schon alle 30 s im Hintergrund (refetchInterval), aber wer nach einem getesteten Login-Versuch sofort sehen will, ob das Event im Log landet, will nicht 30 s warten. Refresh-Button neben "Log leeren" + "Pro Seite"-Selector invalidiert den monitoring-events-Query → sofortiger Refetch. Spin-Animation während des Loads, deaktiviert wenn schon ein Load läuft. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -272,6 +272,16 @@ export default function Monitoring() {
|
||||
<option value={100}>100</option>
|
||||
<option value={200}>200</option>
|
||||
</select>
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
onClick={() => queryClient.invalidateQueries({ queryKey: ['monitoring-events'] })}
|
||||
disabled={eventsLoading}
|
||||
title="Events jetzt neu laden. Auto-Refresh läuft sonst alle 30 s im Hintergrund."
|
||||
>
|
||||
<RefreshCw className={`w-4 h-4 mr-1 ${eventsLoading ? 'animate-spin' : ''}`} />
|
||||
Aktualisieren
|
||||
</Button>
|
||||
<Button variant="secondary" size="sm" onClick={() => setShowClearConfirm(true)}>
|
||||
<Trash2 className="w-4 h-4 mr-1" /> Log leeren
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user