multisite update dokumentace
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
```
|
||||
┌─────────────────────────────────────────────┐
|
||||
│ React Frontend (Vite + TypeScript) │
|
||||
│ Dashboard, plány, telemetrie, overrides │
|
||||
│ Dashboard, plány, telemetrie; výběr site │
|
||||
│ (combobox → /api/v1/me/sites + PostgREST) │
|
||||
└─────────────┬───────────────────────────────┘
|
||||
│ HTTP/REST
|
||||
┌─────────────▼───────────────────────────────┐
|
||||
@@ -25,7 +26,7 @@
|
||||
│ FastAPI (Python) │
|
||||
│ – Scheduled tasks (APScheduler) │
|
||||
│ – telemetry_collector (každých 60s) │
|
||||
│ – price_importer (13:30, 14:00, 00:05)│
|
||||
│ – price_importer (13:30, 14:00, 00:05) │
|
||||
│ – forecast_service (každé 2h, minute 05)│
|
||||
│ – planning_engine (denně 15:00) │
|
||||
│ – control_exporter (každých 15min) │
|
||||
@@ -118,7 +119,9 @@ ems-platform/
|
||||
App.tsx
|
||||
api/
|
||||
postgrest.ts ← PostgREST client
|
||||
backend.ts ← FastAPI client
|
||||
backend.ts ← FastAPI client (/me/sites, …)
|
||||
context/
|
||||
SiteSelectionContext.tsx ← výběr lokality, localStorage
|
||||
pages/
|
||||
Dashboard.tsx
|
||||
Planning.tsx
|
||||
@@ -162,7 +165,8 @@ PostgreSQL (ceny + forecast) → fn_create_planning_run() → planning_interval
|
||||
### Operátorské manuální akce (UI)
|
||||
```
|
||||
Browser → FastAPI:
|
||||
POST /api/v1/sites/{site_id}/prices/import?date=YYYY-MM-DD
|
||||
GET /api/v1/me/sites ← seznam aktivních lokalit (UI combobox; bez auth zatím = všechny aktivní)
|
||||
POST /api/v1/sites/{site_id}/prices/import?date=YYYY-MM-DD ← zapisuje globální market_interval_price; site_id jen validace URL
|
||||
POST /api/v1/sites/{site_id}/forecast/run
|
||||
POST /api/v1/sites/{site_id}/plan/run?type=daily|rolling
|
||||
```
|
||||
@@ -176,8 +180,8 @@ PostgreSQL (planning_interval + overrides) → control_exporter
|
||||
|
||||
### Frontend
|
||||
```
|
||||
Browser → PostgREST (čtení views/tabulek)
|
||||
Browser → FastAPI (triggery: replanning, override, manual export)
|
||||
Browser → PostgREST (čtení views/tabulek, filtr site_id dle výběru v UI)
|
||||
Browser → FastAPI (seznam lokalit /me/sites, triggery: replanning, import cen, …)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user