feat(phase3): import/export, sparklines, user theme overrides
- 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)
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
# Phase 2: Ping History Sparklines
|
||||
|
||||
**Status:** ⬜ Not Started
|
||||
**Status:** ✅ Complete
|
||||
**Parent plan:** [PLAN.md](./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)
|
||||
|
||||
- [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
|
||||
<!-- Filled in after completion -->
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user