c38b7d4c78
Add database foundation for observability features: - event_log table with severity/source filtering and pagination - standalone_proxies table for user-created reverse proxies - stale_threshold_days setting (default 7 days) - Auto-persist warn/error events from event bus to database - SSE broadcast of persistent events for real-time UI updates - Frontend types and API functions for downstream UI phases
55 lines
2.7 KiB
Markdown
55 lines
2.7 KiB
Markdown
# Phase 6: Direct Proxy Creation UI
|
|
|
|
**Status:** ⬜ Not Started
|
|
**Parent plan:** [PLAN.md](./PLAN.md)
|
|
**Domain:** frontend
|
|
|
|
## Objective
|
|
Build the proxy creation form with live validation feedback, diagnostic hints, and management actions (edit/delete).
|
|
|
|
## Tasks
|
|
|
|
- [ ] Task 1: Create "Create Proxy" form component — fields: destination URL/IP, port, domain (auto-suggested from subdomain pattern), optional custom subdomain override
|
|
- [ ] Task 2: Live validation — debounced calls to POST /api/proxies/validate as user types (300ms debounce)
|
|
- [ ] Task 3: Validation result display — step-by-step checklist with icons:
|
|
- ✅ DNS resolution OK / ❌ DNS resolution failed
|
|
- ✅ TCP port reachable / ❌ TCP port not reachable
|
|
- ✅ HTTP responding / ❌ HTTP not responding
|
|
- Each failure shows the diagnostic hint from the backend
|
|
- [ ] Task 4: Create proxy submission — calls POST /api/proxies, shows success toast with health indicator
|
|
- [ ] Task 5: Edit proxy — modal or inline form, pre-populated with current values, re-validates on save
|
|
- [ ] Task 6: Delete proxy — ConfirmDialog with domain name confirmation
|
|
- [ ] Task 7: Integration with proxy viewer page — "Create Proxy" button in the proxy viewer header
|
|
- [ ] Task 8: Domain auto-suggestion — when user enters destination, suggest domain based on subdomain_pattern from settings
|
|
- [ ] Task 9: Add i18n keys for proxy creation
|
|
|
|
## Files to Modify/Create
|
|
- `web/src/lib/components/ProxyForm.svelte` — NEW: Create/edit proxy form
|
|
- `web/src/lib/components/ValidationChecklist.svelte` — NEW: Step-by-step validation display
|
|
- `web/src/routes/proxies/+page.svelte` — Add "Create Proxy" button and modal/panel
|
|
- `web/src/lib/api.ts` — Ensure validateProxy, createProxy, updateProxy, deleteProxy are present (from Phase 3)
|
|
|
|
## Acceptance Criteria
|
|
- Form validates destination in real-time with debouncing
|
|
- Each validation step shows pass/fail with diagnostic hints
|
|
- Proxy creation works end-to-end (form → API → NPM → success)
|
|
- Edit and delete work for existing standalone proxies
|
|
- Domain auto-suggestion works from settings pattern
|
|
- Error states handled gracefully (network errors, API failures)
|
|
|
|
## Notes
|
|
- Validation should show a loading spinner while in progress
|
|
- Don't validate on every keystroke — use 300ms debounce
|
|
- If all validation steps fail, still allow creation (user might know better — just warn)
|
|
- SSL certificate is applied automatically from global settings (no cert picker in form)
|
|
|
|
## Review Checklist
|
|
- [ ] All tasks completed
|
|
- [ ] Code follows project conventions
|
|
- [ ] No unintended side effects
|
|
- [ ] Build passes
|
|
- [ ] Tests pass (new + existing)
|
|
|
|
## Handoff to Next Phase
|
|
<!-- Filled in by the implementation agent after completing this phase. -->
|