Add demo and test scripts for monitor dashboard activity

- Introduced a demo script (`demo_monitor_dashboard.py`) to showcase various monitoring features through simulated activity.
- Implemented a test script (`test_monitor_demo.py`) to generate dashboard activity and verify monitor health and endpoint statistics.
- Added a logo image to the static assets for branding purposes.
This commit is contained in:
unclecode
2025-10-17 22:43:06 +08:00
parent e2af031b09
commit aba4036ab6
8 changed files with 338 additions and 107 deletions

View File

@@ -174,6 +174,15 @@ app.mount(
name="monitor_ui",
)
# ── static assets (logo, etc) ────────────────────────────────
ASSETS_DIR = pathlib.Path(__file__).parent / "static" / "assets"
if ASSETS_DIR.exists():
app.mount(
"/static/assets",
StaticFiles(directory=ASSETS_DIR),
name="assets",
)
@app.get("/")
async def root():