Add admin panel, WebSocket support, and API versioning
Introduce an admin portal (React + Nginx), WebSocket routing, and API versioning middleware with `/api/v1/` prefix deprecation. Add master API key authentication, new Prometheus metrics for AI token consumption and active WebSockets, and extend S3 config with a public endpoint URL. Update test paths and fixtures to align with the new routing structure.
This commit is contained in:
+15
-1
@@ -9,12 +9,20 @@ from prometheus_client import Counter, Histogram, Gauge
|
||||
hub_images_uploaded = Counter(
|
||||
"hub_images_uploaded_total",
|
||||
"Nombre total d'images uploadées",
|
||||
["client_plan"],
|
||||
["client_id"],
|
||||
)
|
||||
|
||||
hub_images_deleted = Counter(
|
||||
"hub_images_deleted_total",
|
||||
"Nombre total d'images supprimées",
|
||||
["client_id"],
|
||||
)
|
||||
|
||||
# ── AI ────────────────────────────────────────────────────────
|
||||
hub_ai_tokens_consumed = Counter(
|
||||
"hub_ai_tokens_consumed_total",
|
||||
"Nombre total de tokens consommés",
|
||||
["client_id", "model"],
|
||||
)
|
||||
|
||||
# ── Pipeline ──────────────────────────────────────────────────
|
||||
@@ -44,6 +52,12 @@ hub_storage_used_bytes = Gauge(
|
||||
["client_id"],
|
||||
)
|
||||
|
||||
# ── WebSockets ────────────────────────────────────────────────
|
||||
hub_active_websockets = Gauge(
|
||||
"hub_active_websockets",
|
||||
"Nombre de connexions WebSocket actives",
|
||||
)
|
||||
|
||||
# ── ARQ ───────────────────────────────────────────────────────
|
||||
hub_arq_jobs_enqueued = Counter(
|
||||
"hub_arq_jobs_enqueued_total",
|
||||
|
||||
Reference in New Issue
Block a user