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)
21 lines
1.1 KiB
Markdown
21 lines
1.1 KiB
Markdown
# Phase 2: Ping History Sparklines
|
|
|
|
**Status:** ✅ Complete
|
|
**Parent plan:** [PLAN.md](./PLAN.md)
|
|
**Domain:** fullstack
|
|
|
|
## Tasks
|
|
|
|
- [x] Task 1: Create `src/routes/api/apps/[id]/history/+server.ts` — GET last 24h of healthcheck results
|
|
- [x] Task 2: Create `src/lib/components/app/SparklineChart.svelte` — tiny inline SVG sparkline (green=up, red=down)
|
|
- [x] Task 3: Update `src/lib/components/widget/AppWidget.svelte` — show sparkline below status badge
|
|
- [x] Task 4: Update `src/lib/components/app/AppCard.svelte` — show sparkline on app cards
|
|
- [x] Task 5: Calculate and display uptime percentage (last 24h)
|
|
- [x] Task 6: Update healthcheck service to retain last 288 records per app (24h at 5min intervals)
|
|
- [x] Task 7: Add cleanup job to prune old AppStatus records beyond retention period
|
|
- [x] 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.
|