diff --git a/server.log b/server.log index f677c95..cc04eea 100644 --- a/server.log +++ b/server.log @@ -1,5 +1,8 @@ -INFO: Started server process [58874] +INFO: Started server process [61446] 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:57702 - "GET / HTTP/1.1" 200 OK +INFO: 192.168.5.30:53794 - "GET /api/status HTTP/1.1" 401 Unauthorized +INFO: 192.168.5.30:53794 - "GET /login HTTP/1.1" 200 OK +INFO: 127.0.0.1:42864 - "GET /icons/fire.svg HTTP/1.1" 200 OK +INFO: 192.168.5.30:53794 - "GET /icons/fire.svg HTTP/1.1" 200 OK diff --git a/static/icons/arrow-left.svg b/static/icons/arrow-left.svg new file mode 100644 index 0000000..1071988 --- /dev/null +++ b/static/icons/arrow-left.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/arrow-right-on-rectangle.svg b/static/icons/arrow-right-on-rectangle.svg new file mode 100644 index 0000000..abea6bf --- /dev/null +++ b/static/icons/arrow-right-on-rectangle.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/bolt.svg b/static/icons/bolt.svg new file mode 100644 index 0000000..506283d --- /dev/null +++ b/static/icons/bolt.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/chart-bar.svg b/static/icons/chart-bar.svg new file mode 100644 index 0000000..31ff30c --- /dev/null +++ b/static/icons/chart-bar.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/check-circle.svg b/static/icons/check-circle.svg new file mode 100644 index 0000000..912ffc6 --- /dev/null +++ b/static/icons/check-circle.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/clock.svg b/static/icons/clock.svg new file mode 100644 index 0000000..a7fce7b --- /dev/null +++ b/static/icons/clock.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/cog-6-tooth.svg b/static/icons/cog-6-tooth.svg new file mode 100644 index 0000000..91ba7db --- /dev/null +++ b/static/icons/cog-6-tooth.svg @@ -0,0 +1,4 @@ + diff --git a/static/icons/cpu-chip.svg b/static/icons/cpu-chip.svg new file mode 100644 index 0000000..7ab9e09 --- /dev/null +++ b/static/icons/cpu-chip.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/document-text.svg b/static/icons/document-text.svg new file mode 100644 index 0000000..8c03e9e --- /dev/null +++ b/static/icons/document-text.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/exclamation-triangle.svg b/static/icons/exclamation-triangle.svg new file mode 100644 index 0000000..dc2e6cf --- /dev/null +++ b/static/icons/exclamation-triangle.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/fire.svg b/static/icons/fire.svg new file mode 100644 index 0000000..0e944f5 --- /dev/null +++ b/static/icons/fire.svg @@ -0,0 +1,4 @@ + diff --git a/static/icons/globe-alt.svg b/static/icons/globe-alt.svg new file mode 100644 index 0000000..b63d268 --- /dev/null +++ b/static/icons/globe-alt.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/information-circle.svg b/static/icons/information-circle.svg new file mode 100644 index 0000000..d4ac360 --- /dev/null +++ b/static/icons/information-circle.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/list-bullet.svg b/static/icons/list-bullet.svg new file mode 100644 index 0000000..0dcb940 --- /dev/null +++ b/static/icons/list-bullet.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/lock-closed.svg b/static/icons/lock-closed.svg new file mode 100644 index 0000000..4917dbb --- /dev/null +++ b/static/icons/lock-closed.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/server-stack.svg b/static/icons/server-stack.svg new file mode 100644 index 0000000..060c820 --- /dev/null +++ b/static/icons/server-stack.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/signal.svg b/static/icons/signal.svg new file mode 100644 index 0000000..9daa002 --- /dev/null +++ b/static/icons/signal.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/sparkles.svg b/static/icons/sparkles.svg new file mode 100644 index 0000000..c8df7f1 --- /dev/null +++ b/static/icons/sparkles.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/sun.svg b/static/icons/sun.svg new file mode 100644 index 0000000..0e49045 --- /dev/null +++ b/static/icons/sun.svg @@ -0,0 +1,3 @@ + diff --git a/static/icons/x-circle.svg b/static/icons/x-circle.svg new file mode 100644 index 0000000..e8d86ef --- /dev/null +++ b/static/icons/x-circle.svg @@ -0,0 +1,3 @@ + diff --git a/web_server.py b/web_server.py index 08915d1..1ba5b82 100644 --- a/web_server.py +++ b/web_server.py @@ -16,6 +16,7 @@ from fastapi import FastAPI, HTTPException, Depends, Request from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse, JSONResponse, Response from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials +from fastapi.staticfiles import StaticFiles from pydantic import BaseModel, Field import sys @@ -277,9 +278,8 @@ def get_html(theme="dark"): }} .status-item:hover {{ transform: translateY(-2px); }} .status-item .icon {{ width: 32px; height: 32px; margin: 0 auto 8px; }} - .status-item .icon svg {{ width: 100%; height: 100%; }} - .icon-svg {{ width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 6px; }} - .icon-svg svg {{ width: 100%; height: 100%; fill: currentColor; }} + .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); }} .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,37 +476,37 @@ def get_html(theme="dark"):
-

IPMI Controller

+

IPMI Controller

- - - + + +
-
+
IPMI
-
-
+
Mode
-
-
+
Max Temp
-
-
+
Fan Speed
-
-
+
Sensors
-
@@ -1172,6 +1172,9 @@ app.add_middleware( allow_headers=["*"], ) +# Static files for icons +app.mount("/icons", StaticFiles(directory=str(Path(__file__).parent / "static" / "icons")), name="icons") + # Routes @app.get("/favicon.ico") async def favicon():