Added labels to each service

This commit is contained in:
2025-08-31 13:00:23 +02:00
parent 4876f16760
commit 3e8ecf7565
2 changed files with 19 additions and 12 deletions

View File

@@ -9,9 +9,15 @@ class service:
error: Optional[str] error: Optional[str]
ping: Optional[int] ping: Optional[int]
def __init__(self, url: str = "", public: bool = True): def __init__(
self,
url: str = "",
label: str = "",
public: bool = True,
):
self.url = url self.url = url
self.public = public self.public = public
self.label = label
self.online = False self.online = False
self.status = None self.status = None
@@ -26,6 +32,7 @@ class service:
"online": self.online, "online": self.online,
"error": self.error, "error": self.error,
"ping": self.ping, "ping": self.ping,
"label": self.label,
} }
def set_status(self, status: Optional[int]): def set_status(self, status: Optional[int]):
@@ -42,14 +49,14 @@ class service:
services: list[service] = [ services: list[service] = [
service("https://git.ihatemen.uk/"), service("https://git.ihatemen.uk/", "Gitea"),
service("https://plex.ihatemen.uk/"), service("https://plex.ihatemen.uk/", "Plex"),
service("https://truenas.local/", False), service("https://truenas.local/", "TrueNAS", False),
service("https://cloud.ihatemen.uk/"), service("https://cloud.ihatemen.uk/", "NextCloud"),
service("https://request.ihatemen.uk/"), service("https://request.ihatemen.uk/", "Overseerr"),
service("https://id.ihatemen.uk/"), service("https://id.ihatemen.uk/", "PocketID"),
service("http://tautulli.local", False), service("http://tautulli.local", "Tautulli", False),
service("https://transmission.local", False), service("https://transmission.local", "Transmission", False),
service("https://vault.ihatemen.uk"), service("https://vault.ihatemen.uk", "Vault Warden"),
service("https://nginx.local", False), service("https://nginx.local", "Nginx (NPM)", False),
] ]

View File

@@ -17,7 +17,7 @@
style="width: 200px"> style="width: 200px">
<div class="bg-body-tertiary d-flex flex-column align-items-center"> <div class="bg-body-tertiary d-flex flex-column align-items-center">
<div class="bg-dark w-100"> <div class="bg-dark w-100">
<h4 class="text-center text-truncate m-0" style="font-size: 1.5rem;">{{s.url}}</h4> <h4 class="text-center text-truncate m-0" style="font-size: 1.5rem;">{{s.label}}</h4>
</div> </div>
<div class="ratio ratio-1x1"> <div class="ratio ratio-1x1">
<img src="static/placeholder.svg" class="img-fluid"> <img src="static/placeholder.svg" class="img-fluid">