feat: loading overlay on dashboard, RDP pooled session routing fix
- dashboard.html: overlay div moved before <script> so getElementById works; double rAF ensures browser paints spinner before navigation - main.py: pooled_rdp route fix — session_status now returns /svc/<slug>/ route and redirect_url for POOL: RDP sessions (was always ready instantly) - docker-compose.yml: parametrise env vars via .env for easier tuning Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -2419,7 +2419,13 @@ def session_status(session_id: str, user: User = Depends(require_user), db: Sess
|
||||
universal_pool_idx = int(sess.container_id.split(":", 1)[1])
|
||||
except Exception:
|
||||
universal_pool_idx = None
|
||||
route_path = f"/svc/{service.slug}/" if pooled_web and service else f"/s/{session_id}/"
|
||||
pooled_rdp = bool(sess.container_id and sess.container_id.startswith("POOL:") and service and service.type == ServiceType.RDP)
|
||||
if pooled_web and service:
|
||||
route_path = f"/svc/{service.slug}/"
|
||||
elif pooled_rdp and service:
|
||||
route_path = f"/svc/{service.slug}/"
|
||||
else:
|
||||
route_path = f"/s/{session_id}/"
|
||||
if web_pool_idx is not None:
|
||||
route_path = f"/w/{web_pool_idx}/"
|
||||
if universal_pool_idx is not None:
|
||||
@@ -2436,7 +2442,7 @@ def session_status(session_id: str, user: User = Depends(require_user), db: Sess
|
||||
"message": "Готово, открываем..." if ready else "Запуск сессии...",
|
||||
"steps": steps,
|
||||
}
|
||||
if pooled_web:
|
||||
if pooled_web or pooled_rdp:
|
||||
payload["redirect_url"] = f"/s/{session_id}/view"
|
||||
if web_pool_idx is not None:
|
||||
payload["redirect_url"] = f"/s/{session_id}/view"
|
||||
|
||||
Reference in New Issue
Block a user