chore: add more health info for n8n, refs NOISSUE
This commit is contained in:
@@ -10,9 +10,9 @@ from fastapi.responses import RedirectResponse
|
||||
from nicegui import app, ui
|
||||
|
||||
try:
|
||||
from .dashboard_ui import create_dashboard
|
||||
from .dashboard_ui import create_dashboard, create_health_page
|
||||
except ImportError:
|
||||
from dashboard_ui import create_dashboard
|
||||
from dashboard_ui import create_dashboard, create_health_page
|
||||
|
||||
|
||||
def init(fastapi_app: FastAPI, storage_secret: str = 'Secr2t!') -> None:
|
||||
@@ -38,6 +38,10 @@ def init(fastapi_app: FastAPI, storage_secret: str = 'Secr2t!') -> None:
|
||||
def show() -> None:
|
||||
render_dashboard_page()
|
||||
|
||||
@ui.page('/health-ui')
|
||||
def health_ui() -> None:
|
||||
create_health_page()
|
||||
|
||||
@fastapi_app.get('/dashboard', include_in_schema=False)
|
||||
def dashboard_redirect() -> RedirectResponse:
|
||||
return RedirectResponse(url='/', status_code=307)
|
||||
|
||||
Reference in New Issue
Block a user