Compare commits

...

2 Commits

Author SHA1 Message Date
60d8fcace9 Add improved Ziti status check 2026-08-26 17:43:12 +01:00
39a2300aa3 Add date display styling 2026-08-26 17:29:24 +01:00
2 changed files with 21 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
# checks.py
import socket
import urllib.request
import urllib.error
class SystemChecks:
@@ -16,11 +18,21 @@ class SystemChecks:
return False
def check_ziti_status(self):
"""Probes the configured Ziti target endpoint."""
"""Makes an HTTP request to the configured address."""
if not self.ziti_target:
return False
host, port = self.ziti_target
return self._tcp_ping(host, int(port), timeout=1.0)
try:
request = urllib.request.Request(
self.ziti_target,
method="GET",
)
with urllib.request.urlopen(request, timeout=2.0) as response:
return 200 <= response.status < 300
except (urllib.error.URLError, TimeoutError, OSError):
return False
def _tcp_ping(self, host, port, timeout=1):
try:

View File

@@ -6,6 +6,12 @@ window {
}
/* Large, prominent clock */
label.date-display {
font-size: 30px;
font-weight: 500;
color: #fafafa;
padding-right: 30px;
}
label.clock-display {
font-size: 32px;
font-weight: 700;