fix: acknowledge alert button not updating count (addresses #380)

- Fixed reactivity issue with alertStats computation in SolidJS
- Properly access store values to ensure count updates when alerts are acknowledged
- Changed from Object.values() to mapping over keys for proper store reactivity
This commit is contained in:
Pulse Monitor
2025-08-30 17:12:33 +00:00
parent 76595e8865
commit 940a253dc8
+3 -1
View File
@@ -732,7 +732,9 @@ function OverviewTab(props: {
// Get alert stats from actual active alerts
const alertStats = createMemo(() => {
const alerts = Object.values(props.activeAlerts);
// Access the store properly for reactivity
const alertIds = Object.keys(props.activeAlerts);
const alerts = alertIds.map(id => props.activeAlerts[id]);
return {
active: alerts.filter(a => !a.acknowledged).length,
acknowledged: alerts.filter(a => a.acknowledged).length,