feat: add operational Dashboard
This commit is contained in:
1 parent
4a1959ecd6
commit
b8b741ccee
23 files changed
+1278
-59
No files matched your search
+12
-1
@@ -11,6 +11,7 @@ from fastapi import Request, Depends, FastAPI, Header, HTTPException, Query, sta
|
||||
from pydantic import BaseModel, ConfigDict, EmailStr, Field, ValidationError
|
||||
|
||||
from app.config import settings
|
||||
from app.dashboard.router import router as dashboard_router
|
||||
from app.identity import (
|
||||
COOKIE_TOKEN_HINT,
|
||||
SESSION_COOKIE,
|
||||
@@ -20,7 +21,10 @@ from app.identity import (
|
||||
user_has_permission,
|
||||
router as identity_router,
|
||||
)
|
||||
from app.frontend.router import router as frontend_router
|
||||
from app.frontend.router import (
|
||||
dashboard_page as internal_alpha_dashboard_page,
|
||||
router as frontend_router,
|
||||
)
|
||||
from app.inventory.router import router as inventory_router
|
||||
from app.locations.router import router as locations_router
|
||||
from app.components.router import router as components_router
|
||||
@@ -55,6 +59,7 @@ app.include_router(frontend_router)
|
||||
app.include_router(inventory_router)
|
||||
app.include_router(components_router)
|
||||
app.include_router(locations_router)
|
||||
app.include_router(dashboard_router)
|
||||
install_identity_middleware(app)
|
||||
|
||||
|
||||
@@ -33444,6 +33449,9 @@ async def minerops_inject_repair_polish_assets(request, call_next):
|
||||
try:
|
||||
path = request.url.path or ""
|
||||
|
||||
if request.scope.get("endpoint") is internal_alpha_dashboard_page:
|
||||
return response
|
||||
|
||||
if path not in ("/dashboard", "/locations", "/repairs"):
|
||||
return response
|
||||
|
||||
@@ -33799,6 +33807,9 @@ async def minerops_inject_dashboard_repair_summary(request, call_next):
|
||||
response = await call_next(request)
|
||||
|
||||
try:
|
||||
if request.scope.get("endpoint") is internal_alpha_dashboard_page:
|
||||
return response
|
||||
|
||||
path = request.url.path or ""
|
||||
|
||||
if path != "/dashboard":
|
||||
|
||||
Reference in new issue
Block a user