+
+
+
Provider Diagnostics
+
+ Every API call made to DNS providers — last 200 entries. Use this to troubleshoot connectivity issues.
+
+
+
+
+
+ {error &&
Error: {error}
}
+
+
+
+
+
+
+ {total} entries{errorCount > 0 && · {errorCount} errors on this page}
+
+
+ {loading ?
Loading…
: entries.length === 0 ? (
+
+
No diagnostic entries yet — make a DNS operation (sync, add, delete) to populate the log.
+
+ ) : (
+ <>
+
+
+
+
+ | Time |
+ Provider |
+ Operation |
+ Status |
+ Latency |
+ URL |
+ Error |
+
+
+
+ {entries.map(e => (
+
+ | {formatDate(e.timestamp)} |
+ {e.provider} |
+ {e.operation} |
+
+
+ {e.status ?? 'ERR'}
+
+ |
+ 2000 ? '#f59e0b' : 'var(--text-muted)' }}>
+ {e.latency}ms
+ |
+
+ {e.url}
+ |
+
+ {e.error ?? ''}
+ |
+
+ ))}
+
+
+
+
+ {totalPages > 1 && (
+
+
+ Page {page + 1} of {totalPages}
+
+
+ )}
+ >
+ )}
+
+ {confirmClear && (
+
setConfirmClear(false)}
+ />
+ )}
+
+ );
+}
diff --git a/frontend/src/components/SettingsPage.js b/frontend/src/components/SettingsPage.js
index abf2085..e01013d 100644
--- a/frontend/src/components/SettingsPage.js
+++ b/frontend/src/components/SettingsPage.js
@@ -16,6 +16,7 @@ const TABS = [
function NotificationsTab() {
const [form, setForm] = useState({ enabled: false, url: '', token: '', priority: 5 });
+ const [events, setEvents] = useState({ dns_add: true, dns_update: true, dns_delete: true, secret_check: true, secret_check_time: '08:00', timezone: 'UTC' });
const [loading, setLoading] = useState(true);
const [saving, setSaving] = useState(false);
const [testing, setTesting] = useState(false);
@@ -25,7 +26,10 @@ function NotificationsTab() {
useEffect(() => {
getSettings()
- .then(s => setForm({ ...s.gotify }))
+ .then(s => {
+ setForm({ ...s.gotify });
+ setEvents({ ...{ dns_add: true, dns_update: true, dns_delete: true, secret_check: true, secret_check_time: '08:00', timezone: 'UTC' }, ...s.notifications });
+ })
.catch(e => setError(e.message))
.finally(() => setLoading(false));
}, []);
@@ -37,11 +41,17 @@ function NotificationsTab() {
setTestResult(null);
}
+ function handleEventChange(e) {
+ const { name, value, type, checked } = e.target;
+ setEvents(ev => ({ ...ev, [name]: type === 'checkbox' ? checked : value }));
+ setSaved(false);
+ }
+
async function handleSave(e) {
e.preventDefault();
setSaving(true); setError(''); setSaved(false);
try {
- await saveSettings({ gotify: { ...form, priority: Number(form.priority) } });
+ await saveSettings({ gotify: { ...form, priority: Number(form.priority) }, notifications: events });
setSaved(true);
setTimeout(() => setSaved(false), 3000);
} catch (err) { setError(err.message); }
@@ -82,6 +92,64 @@ function NotificationsTab() {
+
Notify on
+ {[
+ { key: 'dns_add', label: 'DNS record added' },
+ { key: 'dns_update', label: 'DNS record updated' },
+ { key: 'dns_delete', label: 'DNS record deleted' },
+ { key: 'secret_check', label: 'Secret expiry reminder' },
+ ].map(({ key, label }) => (
+
+ ))}
+
+
+
+
+
+
{testResult && (