fix: frontend-backend integration — 14 issues resolved
- nginx: add proxy routes for /settings/, /templates/, /ipam/, /logs/, /admin/, /health
- dashboard: fix data format mismatch (servers[] not nodes[]/vms[])
- dashboard: add WebSocket subscription to dashboard_metrics for real-time updates
- dashboard: connect activity feed to /logs/api/logs endpoint
- dashboard: reduce polling to 15s with WS as primary update source
- graphs: fix rrddata response unwrap (backend returns {data:[],timeframe:''})
- graphs: add i18n translations for chart titles
- console: add xterm.js CSS import for proper terminal rendering
- console: add i18n translations (connecting, reconnect)
- workspace: add switcher dropdown in TopBar
- workspace: add edit dialog in WorkspacesPage
- workspace: create Zustand store with localStorage persistence
- workspace: add X-Active-Workspace header to API client
- sidebar: replace generic icon with actual favicon.svg logo
- instances: translate RowActionMenu and InstanceDetailPage strings
- locales: add graphs, console, workspace, instance tab keys to en/ru
This commit is contained in:
@@ -11,8 +11,6 @@ All authenticated: list (filtered to their workspaces), get detail.
|
||||
from typing import List, Optional
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, Request, status
|
||||
from fastapi.responses import HTMLResponse
|
||||
from fastapi.templating import Jinja2Templates
|
||||
from sqlalchemy.orm import Session
|
||||
from loguru import logger
|
||||
|
||||
@@ -20,11 +18,9 @@ from ..db import get_db
|
||||
from ..models import Workspace, WorkspaceServer, WorkspaceUser, ProxmoxServer, User
|
||||
from ..schemas import WorkspaceCreate, WorkspaceUpdate, WorkspaceResponse, WorkspaceDetail
|
||||
from ..auth import get_current_user, PermissionChecker
|
||||
from ..template_helpers import add_i18n_context
|
||||
from ..logging_service import LoggingService
|
||||
|
||||
router = APIRouter()
|
||||
templates = Jinja2Templates(directory="app/templates")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -150,24 +146,6 @@ def _build_detail(ws: Workspace) -> WorkspaceDetail:
|
||||
)
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# HTML Page
|
||||
# ===========================================================================
|
||||
|
||||
@router.get("/workspaces", response_class=HTMLResponse, include_in_schema=False)
|
||||
def workspaces_page(
|
||||
request: Request,
|
||||
):
|
||||
"""Admin workspace management page"""
|
||||
context = {
|
||||
"request": request,
|
||||
"page_title": "Workspaces",
|
||||
}
|
||||
from ..template_helpers import add_i18n_context
|
||||
context = add_i18n_context(request, context)
|
||||
return templates.TemplateResponse("workspaces.html", context)
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# REST API
|
||||
# ===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user