Add custom homelab dashboard stack
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from app.models.common import APIModel, OverallStatus, SourceStatus, TimestampedResponse
|
||||
|
||||
|
||||
class OverviewServicesSummary(APIModel):
|
||||
online: int
|
||||
degraded: int
|
||||
offline: int
|
||||
total: int
|
||||
|
||||
|
||||
class OverviewDockerSummary(APIModel):
|
||||
running: int
|
||||
stopped: int
|
||||
unhealthy: int
|
||||
total: int
|
||||
source_status: SourceStatus
|
||||
|
||||
|
||||
class OverviewSystemSummary(APIModel):
|
||||
cpu_percent: float
|
||||
ram_percent: float
|
||||
root_storage_percent: float
|
||||
network_rx_mbps: float
|
||||
network_tx_mbps: float
|
||||
uptime_seconds: int
|
||||
|
||||
|
||||
class OverviewHomeAssistantSummary(APIModel):
|
||||
status: SourceStatus
|
||||
label: str
|
||||
version: str | None = None
|
||||
response_time_ms: int | None = None
|
||||
last_checked: str | None = None
|
||||
|
||||
|
||||
class OverviewResponse(TimestampedResponse):
|
||||
overall_status: OverallStatus
|
||||
refresh_hint_seconds: int
|
||||
services: OverviewServicesSummary
|
||||
docker: OverviewDockerSummary
|
||||
system: OverviewSystemSummary
|
||||
home_assistant: OverviewHomeAssistantSummary
|
||||
Reference in New Issue
Block a user