Backend: GET /api/stats/ (staff only) gathers psutil CPU/memory counters, nvidia-smi GPU stats, the cached disk numbers and the running/finished download + match jobs. Root logging now also writes a rotating file (backend/logs/j621.log) so the dashboard can tail it, and psutil joins the requirements. The storage payload computation is shared with the existing storage endpoint. Frontend: a /stats route + Stats nav entry for staff, polling every 2 s — per-core CPU bars, memory and swap, GPUs (utilization, VRAM, temperature), disk with the media/temp breakdown, active jobs with progress bars, recently finished jobs with summaries, and the log tail with level colours and an auto-scroll toggle. Section 4 of the roadmap is complete.
9 lines
203 B
Python
9 lines
203 B
Python
from django.urls import path
|
|
|
|
from .views import StatsView, StatusView
|
|
|
|
urlpatterns = [
|
|
path("status/", StatusView.as_view(), name="status"),
|
|
path("stats/", StatsView.as_view(), name="stats"),
|
|
]
|