c6a7de895d
- JSON import/export with conflict resolution (skip/overwrite) + admin UI - Ping history sparklines on AppWidget and AppCard (24h, 288 points) - Hourly cleanup job for old AppStatus records - User theme preferences (hue, saturation, mode, background, locale) - Settings page with ThemeCustomizer (sliders, toggles, live preview) - Prisma migration for user preference fields - i18n translations for all new strings (EN/RU)
1.1 KiB
1.1 KiB
Phase 2: Ping History Sparklines
Status: ✅ Complete Parent plan: PLAN.md Domain: fullstack
Tasks
- Task 1: Create
src/routes/api/apps/[id]/history/+server.ts— GET last 24h of healthcheck results - Task 2: Create
src/lib/components/app/SparklineChart.svelte— tiny inline SVG sparkline (green=up, red=down) - Task 3: Update
src/lib/components/widget/AppWidget.svelte— show sparkline below status badge - Task 4: Update
src/lib/components/app/AppCard.svelte— show sparkline on app cards - Task 5: Calculate and display uptime percentage (last 24h)
- Task 6: Update healthcheck service to retain last 288 records per app (24h at 5min intervals)
- Task 7: Add cleanup job to prune old AppStatus records beyond retention period
- Task 8: Add i18n translations (EN/RU)
Handoff to Next Phase
All sparkline features implemented. History API returns last 288 records with uptime percentage. SparklineChart renders color-coded bars (green/red/yellow/gray). Cleanup job prunes records older than 24h hourly. Both AppWidget and AppCard fetch and display sparklines with uptime percentage on mount.