diff --git a/server.log b/server.log index e0f29a7..76cd4a2 100644 --- a/server.log +++ b/server.log @@ -1,7 +1,98 @@ -INFO: Started server process [64283] +INFO: Started server process [64990] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) -INFO: 127.0.0.1:39150 - "GET /icons/wifi.svg HTTP/1.1" 200 OK -INFO: 127.0.0.1:39164 - "GET / HTTP/1.1" 200 OK -INFO: 127.0.0.1:41300 - "GET / HTTP/1.1" 200 OK +INFO: 192.168.5.30:56691 - "GET /favicon.ico HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "POST /api/setup/test-ipmi HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /favicon.ico HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "POST /api/setup/test-http HTTP/1.1" 200 OK +2026-02-20 19:42:26,004 - fan_controller - INFO - Loaded config from /home/devmatrix/projects/fan-controller-v2/data/config.json +2026-02-20 19:42:26,006 - fan_controller - INFO - Saved config to /home/devmatrix/projects/fan-controller-v2/data/config.json +2026-02-20 19:42:26,179 - fan_controller - INFO - Connected to IPMI at 192.168.5.191 +2026-02-20 19:42:26,179 - fan_controller - INFO - HTTP sensor client initialized for http://192.168.5.200:8888 +/home/devmatrix/projects/fan-controller-v2/web_server.py:153: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). + self._sessions[token] = (username, datetime.utcnow() + timedelta(days=7)) +INFO: 192.168.5.30:55585 - "POST /api/setup HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET / HTTP/1.1" 200 OK +INFO: 192.168.5.30:53288 - "GET /icons/server-stack.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:55585 - "GET /icons/sun.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:52997 - "GET /icons/wifi.svg HTTP/1.1" 200 OK +INFO: 192.168.5.30:61829 - "GET /icons/arrow-right-on-rectangle.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:59884 - "GET /icons/lock-closed.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:54039 - "GET /icons/clock.svg HTTP/1.1" 304 Not Modified +/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). + if datetime.utcnow() > expiry: +INFO: 192.168.5.30:53288 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:53288 - "GET /icons/document-text.svg HTTP/1.1" 200 OK +INFO: 192.168.5.30:59884 - "GET /icons/viewfinder-circle.svg HTTP/1.1" 200 OK +INFO: 192.168.5.30:61829 - "GET /icons/list-bullet.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:54039 - "GET /icons/chart-bar.svg HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /icons/adjustments-horizontal.svg HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET / HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:55585 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:53971 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:53971 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:53971 - "GET / HTTP/1.1" 200 OK +INFO: 192.168.5.30:53971 - "GET /icons/fire.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:62677 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:60990 - "GET /icons/sun.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:55569 - "GET /icons/lock-closed.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:60990 - "GET /icons/list-bullet.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:62677 - "GET /icons/wifi.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:60301 - "GET /icons/arrow-right-on-rectangle.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:53971 - "GET /icons/clock.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:50652 - "GET /icons/server-stack.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:55569 - "GET /icons/adjustments-horizontal.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:60301 - "GET /icons/chart-bar.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:60990 - "GET /icons/document-text.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:62677 - "GET /icons/viewfinder-circle.svg HTTP/1.1" 304 Not Modified +INFO: 192.168.5.30:62677 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62677 - "GET /login HTTP/1.1" 200 OK +INFO: 192.168.5.30:62677 - "GET /login HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "POST /api/auth/login HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET / HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /favicon.ico HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK +INFO: 192.168.5.30:62355 - "GET /api/status HTTP/1.1" 200 OK diff --git a/static/icons/fan.svg b/static/icons/fan.svg new file mode 100644 index 0000000..e939974 --- /dev/null +++ b/static/icons/fan.svg @@ -0,0 +1 @@ +fan-blades \ No newline at end of file diff --git a/static/icons/favicon.svg b/static/icons/favicon.svg new file mode 100644 index 0000000..209300b --- /dev/null +++ b/static/icons/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web_server.py b/web_server.py index 5d0c6c7..9e0ad8a 100644 --- a/web_server.py +++ b/web_server.py @@ -280,6 +280,7 @@ def get_html(theme="dark"): .status-item .icon {{ width: 32px; height: 32px; margin: 0 auto 8px; }} .status-item .icon img {{ width: 100%; height: 100%; filter: brightness(0) invert(1); }} .icon-svg {{ width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 6px; filter: brightness(0) invert(1); }} + .icon-logo {{ width: 28px; height: 28px; display: inline-block; vertical-align: middle; margin-right: 8px; filter: brightness(0) invert(1); }} .status-item .label {{ font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 3px; }} .status-item .value {{ font-size: 1.1rem; font-weight: bold; }} .status-item .value.good {{ color: var(--accent-success); }} @@ -476,7 +477,7 @@ def get_html(theme="dark"):
-

IPMI Controller

+

IPMI Controller

@@ -1178,21 +1179,9 @@ app.mount("/icons", StaticFiles(directory=str(Path(__file__).parent / "static" / # Routes @app.get("/favicon.ico") async def favicon(): - """Transparent 1x1 PNG favicon.""" - return Response( - content=bytes([ - 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, - 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, - 0x00, 0x00, 0x00, 0x0D, 0x49, 0x44, 0x41, 0x54, - 0x08, 0xD7, 0x63, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x01, 0xE2, 0x21, 0xBC, 0x33, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, - 0xAE, 0x42, 0x60, 0x82 - ]), - media_type="image/png" - ) + """Fan icon as favicon.""" + icon_path = Path(__file__).parent / "static" / "icons" / "favicon.svg" + return Response(content=icon_path.read_text(), media_type="image/svg+xml") @app.get("/") async def root(request: Request):