This commit is contained in:
Mark Gregory
2026-10-21 14:54:07 +01:00
parent 8c7b29d50f
commit 578f0218a5
6 changed files with 79 additions and 8 deletions
+17 -1
View File
@@ -35,7 +35,12 @@ struct MonitorMenuView: View {
Spacer()
if monitor.results[server.id]?.refreshing == true { ProgressView().controlSize(.mini) }
else if let report = monitor.results[server.id]?.report {
Text("\(report.counts.ok) OK").font(.caption2).foregroundStyle(.secondary)
VStack(alignment: .trailing, spacing: 2) {
Text("\(report.counts.ok) OK").font(.caption2)
if let uptime = report.uptimeLabel {
Text("Up \(uptime)").font(.caption2)
}
}.foregroundStyle(.secondary)
}
if server.id == monitor.selectedID { Image(systemName: "checkmark") }
}.padding(.horizontal, 14).padding(.vertical, 8)
@@ -55,6 +60,17 @@ struct MonitorMenuView: View {
ScrollView {
LazyVStack(alignment: .leading, spacing: 0) {
if let report = monitor.report {
HStack(spacing: 8) {
Image(systemName: "clock.arrow.circlepath")
.foregroundStyle(.secondary)
Text("Uptime").font(.system(size: 12, weight: .medium))
Spacer()
Text(report.uptimeLabel ?? "Not available")
.font(.system(size: 12, weight: .medium, design: .monospaced))
.foregroundStyle(.secondary)
}
.padding(.horizontal, 14).padding(.vertical, 10)
Divider()
if !monitor.selectedServices.isEmpty {
Text("SERVICES")
.font(.caption.bold()).foregroundStyle(.secondary)