From 3f0b7746b1bee4c2f626eb805e3fd13c5f2f5d22 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 24 Apr 2026 15:04:54 -0500 Subject: DomainDig v3.8.0 — Smart Monitoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Stable domain intervals * Frequent changes decrease intervals * Duplicate states do not trigger alerts * Quiet hours suppress alerts * Quiet hours across midnight work correctly * Sensitivity levels alter behavior as expected --- DomainDig/MonitoringView.swift | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'DomainDig/MonitoringView.swift') diff --git a/DomainDig/MonitoringView.swift b/DomainDig/MonitoringView.swift index 0b7a916..fc0b8ab 100644 --- a/DomainDig/MonitoringView.swift +++ b/DomainDig/MonitoringView.swift @@ -17,7 +17,14 @@ struct MonitoringView: View { VStack(alignment: .leading, spacing: 8) { LabeledContent("Status", value: viewModel.monitoringSettings.isEnabled ? "Scheduled" : "Manual only") LabeledContent("Domains", value: "\(monitoredDomainsCount)") - LabeledContent("Frequency", value: viewModel.monitoringSettings.frequency.title) + LabeledContent("Base Interval", value: MonitoringBaseInterval.nearest(to: viewModel.monitoringSettings.baseInterval).title) + LabeledContent("Adaptive", value: viewModel.monitoringSettings.adaptiveEnabled ? viewModel.monitoringSettings.sensitivity.title : "Off") + LabeledContent( + "Quiet Hours", + value: viewModel.monitoringSettings.quietHours.map { + "\(Self.hourLabel($0.startHour)) to \(Self.hourLabel($0.endHour))" + } ?? "Off" + ) LabeledContent("Alerts", value: viewModel.monitoringSettings.alertsEnabled ? viewModel.monitoringSettings.alertFilter.title : "Off") if let monitoringStatusMessage = viewModel.monitoringStatusMessage, @@ -42,7 +49,8 @@ struct MonitoringView: View { title: "No Monitoring Runs Yet", message: "Monitoring history appears here after manual or background runs finish.", suggestion: "Enable monitoring in Settings or run a manual monitoring sweep.", - systemImage: "waveform.path.ecg" + systemImage: "waveform.path.ecg", + showsCardBackground: false ) } .listRowBackground(Color(.systemGray6).opacity(0.5)) @@ -102,6 +110,13 @@ struct MonitoringView: View { .background(tint.opacity(0.16)) .clipShape(Capsule()) } + + private static func hourLabel(_ hour: Int) -> String { + let formatter = DateFormatter() + formatter.dateFormat = "h a" + let components = DateComponents(calendar: .current, hour: hour) + return components.date.map(formatter.string(from:)) ?? "\(hour):00" + } } struct MonitoringLogDetailView: View { -- cgit v1.2.3