From 87e03fdb26f470a5e00732448dac8c1b9766a3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9A=D0=BE=D0=BA=D0=BE?= =?UTF-8?q?=D1=81?= Date: Thu, 12 Feb 2026 23:17:13 +0700 Subject: [PATCH] Add Web Dashboard --- main.py | 4 ++ static/index.html | 149 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 static/index.html diff --git a/main.py b/main.py index 662d2dd..030d19c 100644 --- a/main.py +++ b/main.py @@ -4,6 +4,7 @@ from contextlib import asynccontextmanager from typing import Optional, List from fastapi import FastAPI, HTTPException +from fastapi.staticfiles import StaticFiles from sqlalchemy import select from app.core.discovery import DiscoveryService @@ -173,6 +174,9 @@ async def control_group( return {"status": "ok", "applied": params, "sent_to": ips} +# Монтируем папку static для фронтенда +app.mount("/", StaticFiles(directory="static", html=True), name="static") + if __name__ == "__main__": import uvicorn diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..8294074 --- /dev/null +++ b/static/index.html @@ -0,0 +1,149 @@ + + + + + + Ignis Control Center + + + + + +
+
+
+ 🔥 +

Ignis Core

+
+
+
+
Устройств
+
{{ devicesCount }}
+
+
+ +
+
+ +
+
+
+
+

{{ group.name }}

+ {{ id }} +
+
+ + +
+
+ +
+
+
+ + {{ group.brightness || 100 }}% +
+ +
+ +
+
+ + {{ group.temp || 3000 }}K +
+ +
+ +
+
+ + +
+
+ +
+
+
+
+
+ +
+

Группы не найдены в базе

+
+
+ + + +