first commit
Go quality gates / test (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-30 11:37:40 +01:00
commit 8c4d463f1e
96 files changed
+3319

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
{{define "base"}}<!doctype html>
<html lang="en" data-bs-theme="dark"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="dark"><meta name="theme-color" content="#050706">
<title>{{.Title}} · EasyDNS</title>
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/static/vendor/bootstrap.min.css"><link rel="stylesheet" href="/static/app.css">
<script defer src="/static/app.js"></script><script defer src="/static/charts.js"></script>
</head><body>
<div class="shell">
<aside class="sidebar" id="sidebar" aria-label="Primary navigation">
<div class="brand"><a href="/" aria-label="EasyDNS Overview">EasyDNS</a></div>
<div class="sidebar-content">
<div class="nav-section">DNS</div>
<nav class="sidenav" aria-label="DNS"><a {{if eq .Active "overview"}}class="active" aria-current="page"{{end}} href="/">Overview</a><a {{if eq .Active "zones"}}class="active" aria-current="page"{{end}} href="/zones">Zones</a><a {{if eq .Active "query"}}class="active" aria-current="page"{{end}} href="/query">DNS lookup</a></nav>
<div class="nav-section">RESOLUTION &amp; POLICY</div>
<nav class="sidenav" aria-label="Resolution and policy"><a {{if eq .Active "upstreams"}}class="active" aria-current="page"{{end}} href="/upstreams">Upstreams</a><a {{if eq .Active "policies"}}class="active" aria-current="page"{{end}} href="/policies">Policies</a><a {{if eq .Active "views"}}class="active" aria-current="page"{{end}} href="/views">Views</a><a {{if eq .Active "acl"}}class="active" aria-current="page"{{end}} href="/acl">ACL</a><a {{if eq .Active "rate"}}class="active" aria-current="page"{{end}} href="/rate-limiting">Rate limiting</a><a {{if eq .Active "blocklists"}}class="active" aria-current="page"{{end}} href="/blocklists">Blocklists</a></nav>
<div class="nav-section">MONITORING &amp; SYSTEM</div>
<nav class="sidenav" aria-label="Monitoring"><a {{if eq .Active "cache"}}class="active" aria-current="page"{{end}} href="/cache">Cache</a><a {{if eq .Active "metrics"}}class="active" aria-current="page"{{end}} href="/metrics">Metrics</a><a {{if eq .Active "audit"}}class="active" aria-current="page"{{end}} href="/audit">Audit log</a><a {{if eq .Active "status"}}class="active" aria-current="page"{{end}} href="/status">Server status</a><a {{if eq .Active "configuration"}}class="active" aria-current="page"{{end}} href="/configuration">Configuration</a></nav>
</div>
<div class="sidebar-foot"><span class="indicator"></span> Local control panel <small>EasyDNS API connection</small></div>
</aside>
<div class="workspace">
<header class="topbar"><button class="mobile-menu" type="button" id="menuToggle" aria-controls="sidebar" aria-expanded="false" aria-label="Open navigation">☰</button><div class="breadcrumbs">{{.Breadcrumb}}</div>
<div class="top-actions"><a href="https://git.linuxiarz.pl/gru/EasyDNS" target="_blank" rel="noopener noreferrer" class="tool-button"><svg class="ico"><use href="/static/icons.svg#book"/></svg><span>Documentation</span></a><a href="/audit" class="tool-button"><svg class="ico"><use href="/static/icons.svg#list"/></svg><span>Audit</span></a><a href="/configuration" class="tool-button"><svg class="ico"><use href="/static/icons.svg#settings"/></svg><span>Configuration</span></a><form method="post" action="/logout" class="inline"><input type="hidden" name="_csrf" value="{{.CSRF}}"><button type="submit" class="tool-button"><svg class="ico"><use href="/static/icons.svg#logout"/></svg><span>Sign out</span></button></form></div>
</header>
<main class="content" id="main">
<div class="page-head"><div class="page-head-left"><p class="eyebrow"><span class="indicator"></span> EasyDNS control room</p><h1>{{.Title}}</h1><p class="page-subtitle">{{.Subtitle}}</p></div><div class="page-head-right"><span class="operator-label">{{.User}}</span></div></div>
{{if .Message}}<div class="notice {{.MessageType}}" role="alert"><span>{{.Message}}</span><button class="notice-dismiss" type="button" aria-label="Dismiss notice">×</button></div>{{end}}
{{template "content" .}}
<footer class="footer">EasyDNS · independent management panel <span>Only verified EasyDNS API operations are available</span></footer>
</main>
</div>
</div>
<div id="sidebarOverlay" class="sidebar-overlay" aria-hidden="true"></div>
</body></html>{{end}}
@@ -0,0 +1,2 @@
{{define "content"}}<section class="panel"><div class="toolbar"><div class="toolbar-title"><h2>Administrative events</h2><p>Most recent administrative operations</p></div><form method="get" action="/audit" class="toolbar-form"><label class="field-label" for="auditN">Tail length</label><select class="field field-select" id="auditN" name="n">{{range auditSizes}}<option value="{{.}}" {{if eq (selectval $.Data.Filter "n") (string .)}}selected{{end}}>{{.}}</option>{{end}}</select><button type="submit" class="btn-ui">Load events</button></form></div>
<div class="table-scroll"><table class="data-table"><thead><tr><th>TIMESTAMP</th><th>ACTOR</th><th>ACTION</th><th>TARGET</th><th>RESULT</th><th>DETAILS</th></tr></thead><tbody>{{range .Data.Audit}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td class="mono">{{.Actor}}</td><td>{{.Action}}</td><td class="mono">{{.Target}}</td><td><span class="dot {{statusclass .Result}}"></span>{{.Result}}</td><td class="break-any">{{.Detail}}</td></tr>{{else}}<tr><td colspan="6" class="empty">No audit events returned by EasyDNS.</td></tr>{{end}}</tbody></table></div><div class="table-footer"><span>{{len .Data.Audit}} entries returned · maximum supported by API: 10,000</span></div></section><div class="notice-inline mt-panel">The audit endpoint records management operations. It is not a DNS query log and does not provide date-range filters or pagination.</div>{{end}}
@@ -0,0 +1 @@
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>New block rule</h2><p>One validated policy rule per request.</p></div></div><form method="post" action="/blocklists" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label class="field-label" for="blockRule">Rule <span class="required">*</span></label><input class="field mono" id="blockRule" name="rule" required value="{{selectval .Data.Form "rule"}}" placeholder="malware.example.org"><small>A single line. EasyDNS validates syntax and writes to its API overlay.</small></div><div class="form-actions"><a href="/blocklists" class="btn-ui">Cancel</a><button class="btn-ui btn-primary-ui" type="submit">Add rule</button></div></form></section><aside class="panel guide"><div class="panel-head"><h2>API boundaries</h2></div><div class="panel-body"><p>The REST API returns the number of loaded rules, but not their complete list. Editing or removing an individual rule is not supported.</p><div class="data-row"><span>Invalid rule</span><strong>400</strong></div><div class="data-row"><span>Rejected reload</span><strong>422</strong></div></div></aside></div>{{end}}
@@ -0,0 +1,3 @@
{{define "content"}}<div class="status-strip panel compact-strip"><div class="strip-cell"><span>CONFIGURED LISTS</span><strong>{{len .Data.Blocklists.Lists}}</strong></div><div class="strip-cell"><span>LOADED LISTS</span><strong>{{len .Data.Blocklists.Loaded}}</strong></div><div class="strip-cell"><span>ACTIVE RULES</span><strong>{{int .Data.Blocklists.Rules}}</strong></div><div class="strip-cell"><span>UPDATE INTERVAL</span><strong>{{.Data.Blocklists.UpdateInterval}}</strong></div></div>
<section class="panel mt-panel"><div class="toolbar"><div class="toolbar-title"><h2>Configured feeds</h2><p>Rule sources and their effective enablement.</p></div><a class="btn-ui btn-primary-ui" href="/blocklists/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Add rule</a></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>CATEGORY</th><th>SOURCE FILE</th><th>REMOTE URL</th><th>ENABLED</th><th>UPDATE INTERVAL</th></tr></thead><tbody>{{range .Data.Blocklists.Lists}}<tr><td class="entity">{{string (get . "name")}}</td><td>{{string (get . "category")}}</td><td class="mono">{{string (get . "file")}}</td><td class="mono break-any">{{string (get . "url")}}</td><td>{{string (get . "enabled")}}</td><td class="mono">{{string (get . "update_interval")}}</td></tr>{{else}}<tr><td class="empty" colspan="6">No blocklist feeds configured.</td></tr>{{end}}</tbody></table></div></section>
<section class="panel mt-panel"><div class="panel-head"><div><h2>Remote list sync state</h2><p>Read-only update and download results</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>LAST SUCCESS</th><th>LAST ATTEMPT</th><th>RESULT</th><th>MESSAGE</th></tr></thead><tbody>{{range $key,$v:=.Data.Blocklists.State}}<tr><td class="mono">{{$key}}</td><td class="mono">{{string (get $v "last_success")}}</td><td class="mono">{{string (get $v "last_attempt")}}</td><td>{{string (get $v "ok")}}</td><td>{{string (get $v "message")}}</td></tr>{{else}}<tr><td class="empty" colspan="5">No remote feed sync state available.</td></tr>{{end}}</tbody></table></div></section><div class="notice-inline mt-panel">REST can add individual block rules, but cannot list/remove them individually or force a remote feed download.</div>{{end}}
@@ -0,0 +1,4 @@
{{define "content"}}<div class="metrics-grid four"><div class="panel metric"><span class="metric-label">CACHE ENTRIES</span><strong>{{int .Data.Cache.Entries}}</strong><small>Capacity {{int .Data.Cache.Capacity}}</small></div><div class="panel metric"><span class="metric-label">HITS</span><strong>{{int .Data.Cache.Hits}}</strong><small>Cumulative hits</small></div><div class="panel metric"><span class="metric-label">MISSES</span><strong>{{int .Data.Cache.Misses}}</strong><small>Cumulative misses</small></div><div class="panel metric"><span class="metric-label">EVICTIONS</span><strong>{{int .Data.Cache.Evictions}}</strong><small>Cumulative evictions</small></div></div>
<div class="dashboard-lower mt-panel"><section class="panel"><div class="panel-head"><h2>Cache counters</h2></div><div class="panel-body compact"><div class="data-row"><span>Entries</span><strong>{{int .Data.Cache.Entries}}</strong></div><div class="data-row"><span>Inserts</span><strong>{{int .Data.Cache.Inserts}}</strong></div><div class="data-row"><span>Expired</span><strong>{{int .Data.Cache.Expired}}</strong></div><div class="data-row"><span>Stale served</span><strong>{{int .Data.Cache.StaleServed}}</strong></div><div class="data-row"><span>Prefetches</span><strong>{{int .Data.Cache.Prefetches}}</strong></div></div></section>
<section class="panel"><div class="panel-head"><h2>Flush domain suffix</h2></div><form method="post" action="/cache/flush" class="panel-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="scope" value="domain"><p>Invalidate entries under a domain suffix. Cache contents cannot be enumerated over REST.</p><label class="field-label" for="flushDomain">Domain suffix</label><input class="field mono" id="flushDomain" name="domain" required placeholder="example.org"><button class="btn-ui mt-3" type="submit">Flush domain</button></form></section>
<section class="panel danger-panel"><div class="panel-head"><h2>Flush entire cache</h2></div><form method="post" action="/cache/flush" class="panel-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="scope" value="all"><p>Remove all DNS cache entries. This is a destructive action without an undo endpoint.</p><label class="field-label" for="flushConfirm">Type FLUSH ALL to confirm</label><input class="field mono" name="confirm" id="flushConfirm" required pattern="FLUSH ALL" autocomplete="off" placeholder="FLUSH ALL"><button class="btn-ui btn-danger-ui mt-3" type="submit">Flush all cache entries</button></form></section></div>{{end}}
@@ -0,0 +1,4 @@
{{define "content"}}<div class="form-layout policy-layout"><section class="panel"><div class="panel-head"><div><h2>Visible runtime configuration</h2><p>Selected runtime parameters exposed by EasyDNS</p></div></div><div class="panel-body compact"><div class="data-row"><span>Server mode</span><strong>{{.Data.Status.Mode}}</strong></div><div class="data-row"><span>Version</span><strong>{{.Data.Status.Version}}</strong></div><div class="data-row"><span>Default resolution</span><strong>{{.Data.Status.Roles.DefaultResolution}}</strong></div><div class="data-row"><span>DNSSEC validation</span><strong>{{string .Data.Status.DNSSECValidation}}</strong></div><div class="data-row"><span>Block action</span><strong>{{string (get .Data.Policies.Policy "block_action")}}</strong></div><div class="data-row"><span>API allowed clients</span><strong>{{join .Data.Policies.APIAllowedClients ", "}}</strong></div><div class="data-row"><span>Recursion allowed clients</span><strong>{{join .Data.Policies.RecursionAllowedClients ", "}}</strong></div></div>
<div class="panel-head border-top"><div><h2>Hot reload</h2><p>Reload configuration from disk. EasyDNS reports errors and preserves prior active configuration.</p></div></div>
<form method="post" action="/configuration/reload" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><label class="field-label" for="reloadConfirm">Type RELOAD to confirm</label><input class="field mono" id="reloadConfirm" name="confirm" required pattern="RELOAD" autocomplete="off" placeholder="RELOAD"><div class="form-actions"><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#refresh"/></svg>Reload EasyDNS configuration</button></div></form></section>
<aside class="panel guide"><div class="panel-head"><h2>What this panel cannot change</h2></div><div class="panel-body"><p>The REST API does not expose arbitrary configuration file editing, token rotation, server restarts, listener updates, ACL edits or rate limiter changes.</p><div class="notice-inline">EasyDNS creates <span class="mono">control.token</span> itself when its TCP API is enabled. The Go process reads that file server-side. It is never sent to your browser.</div><p class="mt-3 muted">This page never displays the token or pretends to modify local configuration.</p></div></aside></div>{{end}}
@@ -0,0 +1 @@
{{define "content"}}<div class="confirmation-box panel"><div class="panel-head"><div><h2>Stale zone serial</h2><p>The operation was not applied.</p></div><span class="tag amber">HTTP 412</span></div><div class="panel-body"><p>EasyDNS rejected the request because the zone changed after the form was opened. Review the latest records and start a new edit. This panel will not silently overwrite another administrator's modifications.</p><div class="form-actions"><a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records">Reload records</a><a class="btn-ui" href="{{.Data.ZoneURL}}">Zone details</a></div></div></div>{{end}}
@@ -0,0 +1,4 @@
{{define "content"}}<div class="confirmation-box panel"><div class="panel-head"><div><h2>Confirm permanent deletion</h2><p>This operation cannot be undone through EasyDNS REST.</p></div><span class="tag red">DESTRUCTIVE</span></div><div class="panel-body">
{{if eq .Data.Action "record"}}<p>You are about to remove the following DNS record:</p><div class="target-summary"><div class="data-row"><span>Name</span><strong class="mono">{{.Data.Record.Name}}</strong></div><div class="data-row"><span>Type</span><strong>{{.Data.Record.Type}}</strong></div><div class="data-row"><span>RDATA</span><strong class="mono">{{.Data.Record.Data}}</strong></div></div><form method="post" action="{{.Data.ZoneURL}}/records/{{.Data.Record.ID}}/delete"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="etag" value="{{.Data.ETag}}"><label class="field-label" for="confirmDelete">Type DELETE <span class="required">*</span></label><input id="confirmDelete" class="field mono" name="confirm" required pattern="DELETE" autocomplete="off" placeholder="DELETE"><div class="form-actions"><a class="btn-ui" href="{{.Data.ZoneURL}}/records">Cancel</a><button type="submit" class="btn-ui btn-danger-ui">Delete record</button></div></form>
{{else}}<p>Zone <strong class="mono">{{.Data.Zone.Name}}</strong> will be removed if it was created via the REST API overlay. File-configured zones cannot be removed using this endpoint (409).</p><form method="post" action="{{.Data.ZoneURL}}/delete"><input type="hidden" name="_csrf" value="{{.CSRF}}"><label class="field-label" for="confirmZone">Type the complete zone name <span class="required">*</span></label><input id="confirmZone" class="field mono" name="confirm" required autocomplete="off" placeholder="{{.Data.Zone.Name}}"><div class="form-actions"><a class="btn-ui" href="{{.Data.ZoneURL}}">Cancel</a><button type="submit" class="btn-ui btn-danger-ui">Delete zone</button></div></form>{{end}}
</div></div>{{end}}
@@ -0,0 +1,4 @@
{{define "login"}}<!doctype html><html lang="en" data-bs-theme="dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sign in · EasyDNS</title><link rel="stylesheet" href="/static/vendor/bootstrap.min.css"><link rel="stylesheet" href="/static/app.css"></head>
<body class="login-body"><main class="login-panel"><div class="login-brand">EasyDNS</div><p class="overline">LOCAL CONTROL ROOM</p><h1>Sign in</h1><p class="muted mb-4">Access the EasyDNS administration panel. The EasyDNS bearer token stays on the server.</p>
{{with index . "Error"}}{{if .}}<div class="notice danger" role="alert">{{.}}</div>{{end}}{{end}}
<form method="post" action="/login" autocomplete="on"><label class="field-label" for="username">Username</label><input class="field" id="username" name="username" autocomplete="username" value="{{index . "Username"}}" required><label class="field-label mt-3" for="password">Password</label><input class="field" type="password" id="password" name="password" autocomplete="current-password" required><button class="btn-ui btn-primary-ui w-100 mt-4" type="submit">Sign in</button></form><p class="login-help">Panel authentication is separate from EasyDNS REST API credentials.</p></main></body></html>{{end}}
@@ -0,0 +1,11 @@
{{define "content"}}<div class="metrics-grid six"><div class="panel metric"><span class="metric-label">DNS QUERIES</span><strong>{{int .Data.Stats.QueriesTotal}}</strong><small>Cumulative counter</small></div><div class="panel metric"><span class="metric-label">CACHE HIT RATE</span><strong class="success">{{pct .Data.Stats.CacheHitRate}}</strong><small>Latest cache ratio</small></div><div class="panel metric"><span class="metric-label">P50 LATENCY</span><strong>{{ms .Data.Stats.LatencyP50S}}</strong><small>Live histogram</small></div><div class="panel metric"><span class="metric-label">P95 LATENCY</span><strong>{{ms .Data.Stats.LatencyP95S}}</strong><small>Live histogram</small></div><div class="panel metric"><span class="metric-label">P99 LATENCY</span><strong>{{ms .Data.Stats.LatencyP99S}}</strong><small>Live histogram</small></div><div class="panel metric"><span class="metric-label">RATE LIMITED</span><strong class="warning">{{int .Data.Stats.RateLimited}}</strong><small>Cumulative count</small></div></div>
<div class="chart-grid triple"><section class="panel chart-card"><div class="panel-head"><div><h2>DNS query throughput</h2><p>Measured requests per second</p></div></div><canvas data-dns-chart="queries" role="img" aria-label="DNS query rate"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> DNS queries / s</div></section>
<section class="panel chart-card"><div class="panel-head"><div><h2>Response codes</h2><p>Rates from cumulative result counters</p></div></div><canvas data-dns-chart="responses" role="img" aria-label="DNS responses over time"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> NOERROR <span class="legend-dot amber"></span> NXDOMAIN <span class="legend-dot red"></span> SERVFAIL</div></section>
<section class="panel chart-card"><div class="panel-head"><div><h2>Cache efficiency</h2><p>Hit share calculated per poll</p></div></div><canvas data-dns-chart="cache" role="img" aria-label="Cache hit ratio"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> Cache hit %</div></section></div>
<div class="chart-grid triple"><section class="panel chart-card"><div class="panel-head"><div><h2>Resolver latency</h2><p>p50 / p95 / p99 snapshot history</p></div></div><canvas data-dns-chart="latency" role="img" aria-label="Latency percentiles"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> p50 <span class="legend-dot amber"></span> p95 <span class="legend-dot red"></span> p99</div></section>
<section class="panel chart-card"><div class="panel-head"><div><h2>Blocked query rate</h2><p>Derived from blocked counter</p></div></div><canvas data-dns-chart="blocked" role="img" aria-label="Blocked DNS query rate"></canvas><div class="chart-foot"><span class="legend-dot amber"></span> Blocked / s</div></section>
<section class="panel chart-card"><div class="panel-head"><div><h2>Response count mix</h2><p>Actual cumulative EasyDNS counters</p></div></div><div class="panel-body compact bars-large">{{range $key,$v:=.Data.Stats.Responses}}<div class="barline"><span class="mono upper">{{$key}}</span><div class="bar-track"><span class="bar-fill {{statusclass $key}}" data-count="{{$v}}" data-total="{{$.Data.Stats.QueriesTotal}}"></span></div><strong>{{int $v}}</strong></div>{{else}}<div class="empty">No response counts available.</div>{{end}}</div></section></div>
<div class="dashboard-lower mt-panel"><section class="panel"><div class="panel-head"><h2>Query sources</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>SOURCE</th><th>COUNT (CUMULATIVE)</th></tr></thead><tbody>{{range $key,$v:=.Data.Stats.Sources}}<tr><td class="mono">{{$key}}</td><td class="mono right">{{int $v}}</td></tr>{{else}}<tr><td class="empty" colspan="2">No query source counters.</td></tr>{{end}}</tbody></table></div></section>
<section class="panel"><div class="panel-head"><h2>Cache counters</h2></div><div class="panel-body compact"><div class="data-row"><span>Entries</span><strong>{{int .Data.Stats.Cache.Entries}}</strong></div><div class="data-row"><span>Hits</span><strong>{{int .Data.Stats.Cache.Hits}}</strong></div><div class="data-row"><span>Misses</span><strong>{{int .Data.Stats.Cache.Misses}}</strong></div><div class="data-row"><span>Evictions</span><strong>{{int .Data.Stats.Cache.Evictions}}</strong></div></div></section>
<section class="panel"><div class="panel-head"><h2>Telemetry sampling</h2></div><div class="panel-body compact"><div class="data-row"><span>Samples stored in UI memory</span><strong>{{.Data.SamplingCount}}</strong></div><div class="data-row"><span>Polling frequency</span><strong>15 s</strong></div><div class="data-row"><span>Last sample</span><strong>{{if .Data.SamplingTime.IsZero}}—{{else}}{{.Data.SamplingTime.Format "15:04:05"}}{{end}}</strong></div><div class="notice-inline">No artificial 24-hour chart data. Samples are collected only while the Go service runs, and reset on restart.</div></div></section></div>
{{end}}
@@ -0,0 +1,34 @@
{{define "content"}}
<div class="status-strip panel">
<div class="status-main"><div class="status-heading"><span class="dot {{statusclass .Data.Health.Status}}"></span><strong>{{if eq .Data.Health.Status "ok"}}DNS service operational{{else if eq .Data.Health.Status "degraded"}}DNS service degraded{{else}}Status unavailable{{end}}</strong></div><div class="tiny muted">Health: {{if .Data.Health.Status}}{{.Data.Health.Status}}{{else}}Unknown{{end}} · {{if .Data.Status.Roles.Recursive}}Resolver enabled{{else}}No recursive resolver{{end}}</div></div>
<div class="strip-cell"><span>SERVER MODE</span><strong>{{if .Data.Status.Mode}}{{.Data.Status.Mode}}{{else}}—{{end}}</strong></div>
<div class="strip-cell"><span>UPTIME</span><strong>{{uptime .Data.Status.UptimeSeconds}}</strong></div>
<div class="strip-cell"><span>ZONES</span><strong>{{int .Data.Status.Roles.Primary}} primary / {{int .Data.Status.Roles.Secondary}} secondary</strong></div>
<div class="strip-cell"><span>VERSION</span><strong>{{if .Data.Status.Version}}{{.Data.Status.Version}}{{else}}—{{end}}</strong></div>
</div>
<div class="metrics-grid six">
<div class="metric panel"><span class="metric-label">DNS QUERIES</span><strong>{{int .Data.Stats.QueriesTotal}}</strong><small>Cumulative since startup</small></div>
<div class="metric panel"><span class="metric-label">CACHE HIT RATIO</span><strong class="success">{{pct .Data.Stats.CacheHitRate}}</strong><small>Hits / (hits + misses)</small></div>
<div class="metric panel"><span class="metric-label">RESOLVER LATENCY P95</span><strong>{{ms .Data.Stats.LatencyP95S}}</strong><small>Latest API histogram</small></div>
<div class="metric panel"><span class="metric-label">BLOCKED QUERIES</span><strong class="warning">{{int .Data.Stats.Blocked}}</strong><small>Cumulative policy count</small></div>
<div class="metric panel"><span class="metric-label">RATE LIMITED</span><strong>{{int .Data.Stats.RateLimited}}</strong><small>Cumulative count</small></div>
<div class="metric panel"><span class="metric-label">ZONE HEALTH</span><strong class="{{statusclass .Data.Health.Status}}">{{if eq .Data.Health.Status "ok"}}Healthy{{else if eq .Data.Health.Status "degraded"}}Degraded{{else}}Unknown{{end}}</strong><small>{{len .Data.Health.ExpiredZones}} expired zones</small></div>
</div>
<div class="chart-grid triple">
<section class="panel chart-card"><div class="panel-head"><div><h2>Query rate</h2><p>Calculated from real /stats counter deltas.</p></div><span class="live-mark">PANEL SAMPLES</span></div><canvas data-dns-chart="queries" aria-label="Queries per second, measured by panel" role="img"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> Queries / s</div></section>
<section class="panel chart-card"><div class="panel-head"><div><h2>Cache hit ratio</h2><p>Derived from cache hit/miss deltas.</p></div></div><canvas data-dns-chart="cache" aria-label="Cache hit percentage" role="img"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> Hits / all lookups</div></section>
<section class="panel chart-card"><div class="panel-head"><div><h2>Resolver latency</h2><p>Live p50 and p95, milliseconds.</p></div></div><canvas data-dns-chart="latency" aria-label="Resolver latency p50 p95" role="img"></canvas><div class="chart-foot"><span class="legend-dot amber"></span> p95 <span class="legend-dot cyan"></span> p50</div></section>
</div>
<div class="dashboard-lower">
<section class="panel"><div class="panel-head"><div><h2>Response codes</h2><p>Cumulative DNS results since startup</p></div><a href="/metrics" class="text-link">Metrics →</a></div><div class="panel-body compact">
{{range $key,$v := .Data.Stats.Responses}}<div class="barline"><span class="mono upper">{{$key}}</span><div class="bar-track"><span class="bar-fill {{statusclass $key}}" style="width:0" data-count="{{$v}}" data-total="{{$.Data.Stats.QueriesTotal}}"></span></div><strong>{{int $v}}</strong></div>{{else}}<div class="empty">No response statistics available.</div>{{end}}
</div></section>
<section class="panel"><div class="panel-head"><div><h2>Zone state</h2><p>Reported by EasyDNS</p></div><a href="/zones" class="text-link">View zones →</a></div><div class="panel-body compact">
<div class="data-row"><span>Primary zones</span><strong>{{int .Data.Status.Roles.Primary}}</strong></div><div class="data-row"><span>Secondary zones</span><strong>{{int .Data.Status.Roles.Secondary}}</strong></div><div class="data-row"><span>Recursive resolver</span><strong>{{if .Data.Status.Roles.Recursive}}Enabled{{else}}Disabled{{end}}</strong></div><div class="data-row"><span>Forwarder</span><strong>{{if .Data.Status.Roles.Forwarder}}Enabled{{else}}Disabled{{end}}</strong></div><div class="data-row"><span>Expired zones</span><strong class="{{if .Data.Health.ExpiredZones}}danger{{else}}success{{end}}">{{len .Data.Health.ExpiredZones}}</strong></div>
</div></section>
<section class="panel"><div class="panel-head"><div><h2>Polling status</h2><p>UI sampling, not server-side history</p></div></div><div class="panel-body compact"><div class="data-row"><span>Samples</span><strong>{{.Data.SamplingCount}}</strong></div><div class="data-row"><span>Interval</span><strong>15 seconds</strong></div><div class="data-row"><span>Most recent</span><strong>{{if .Data.SamplingTime.IsZero}}No sample{{else}}{{.Data.SamplingTime.Format "15:04:05"}}{{end}}</strong></div><div class="notice-inline">Charts populate only after successful live polls.</div></div></section>
</div>
<section class="panel mt-panel"><div class="panel-head"><div><h2>Recent audit events</h2><p>Changes and administration activity</p></div><a class="text-link" href="/audit">Audit log →</a></div><div class="table-scroll"><table class="data-table"><thead><tr><th>TIME</th><th>ACTION</th><th>TARGET</th><th>RESULT</th><th>DETAIL</th></tr></thead><tbody>
{{range .Data.Audit}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td>{{.Action}}</td><td class="mono">{{.Target}}</td><td><span class="dot {{statusclass .Result}}"></span>{{.Result}}</td><td class="ellipsis">{{.Detail}}</td></tr>{{else}}<tr><td colspan="5" class="empty">No audit events returned by EasyDNS.</td></tr>{{end}}
</tbody></table></div></section>
{{end}}
@@ -0,0 +1,6 @@
{{define "content"}}<div class="form-layout policy-layout"><section class="panel"><div class="panel-head"><div><h2>Blocking policy</h2><p>Only allowlist and block action can be changed here.</p></div></div>
<form class="form-body" method="post" action="/policies"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label for="blockAction" class="field-label">Block action <span class="required">*</span></label><select id="blockAction" name="block_action" class="field" required>{{range blockActions}}<option value="{{.}}" {{if eq . (selectval $.Data.Form "block_action")}}selected{{end}}>{{.}}</option>{{end}}</select><small>Configured action for matching block rules; NXDOMAIN/REFUSED/NULL/ADDRESS/NODATA.</small></div>
<div class="field-row"><label class="field-label" for="allowlist">Allowlist entries</label><textarea id="allowlist" name="allowlist" class="field mono" rows="10" placeholder="good.example.org">{{selectval .Data.Form "allowlist"}}</textarea><small>One entry per line. Empty list explicitly clears the allowlist.</small></div>
<div class="form-actions"><button type="reset" class="btn-ui">Discard local edits</button><button type="submit" class="btn-ui btn-primary-ui">Save supported settings</button></div></form></section>
<aside class="panel guide"><div class="panel-head"><h2>Other policy fields</h2></div><div class="panel-body"><p>All other fields are read-only in the REST API. View them here; edit the EasyDNS configuration file outside this panel.</p>
{{range $key,$v := .Data.Policies.Policy}}{{if and (ne $key "allowlist") (ne $key "block_action")}}<div class="data-row"><span>{{$key}}</span><strong class="break-any">{{string $v}}</strong></div>{{end}}{{end}}</div></aside></div>{{end}}
@@ -0,0 +1,5 @@
{{define "content"}}<div class="notice-inline mb-3"><strong>Read-only.</strong> EasyDNS REST API does not expose create/update/delete methods for {{if eq .Data.Tab "views"}}views{{else if eq .Data.Tab "acl"}}named ACLs{{else}}DNS rate limits{{end}}.</div>
{{if eq .Data.Tab "views"}}<section class="panel"><div class="panel-head"><div><h2>Configured split-horizon views</h2><p>Active split-horizon configuration</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>VIEW</th><th>CLIENTS</th><th>RESOLUTION</th><th>RECURSION</th><th>DETAILS</th></tr></thead><tbody>{{range .Data.Policies.Views}}<tr><td class="entity">{{string (get . "name")}}</td><td class="mono">{{string (get . "clients")}}</td><td>{{string (get . "resolution")}}</td><td>{{string (get . "recursion")}}</td><td><details><summary>Show config</summary><pre class="code-block">{{asjson .}}</pre></details></td></tr>{{else}}<tr><td class="empty" colspan="5">No views returned by the API.</td></tr>{{end}}</tbody></table></div></section>
{{else if eq .Data.Tab "acl"}}<div class="dashboard-lower"><section class="panel"><div class="panel-head"><h2>Named ACLs</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>CLIENT NETWORKS / REFERENCES</th></tr></thead><tbody>{{range $key,$v:=.Data.Policies.ACLs}}<tr><td class="mono entity">{{$key}}</td><td class="mono">{{string $v}}</td></tr>{{else}}<tr><td colspan="2" class="empty">No named ACLs configured.</td></tr>{{end}}</tbody></table></div></section><section class="panel"><div class="panel-head"><h2>Allowed clients</h2></div><div class="panel-body compact"><h3>Recursion</h3>{{range .Data.Policies.RecursionAllowedClients}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No entries returned.</p>{{end}}<h3 class="mt-4">REST API</h3>{{range .Data.Policies.APIAllowedClients}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No entries returned.</p>{{end}}</div></section></div>
{{else}}<section class="panel"><div class="panel-head"><div><h2>DNS response rate limiting</h2><p>Not the TCP REST API request throttle.</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>PARAMETER</th><th>EFFECTIVE VALUE</th></tr></thead><tbody>{{range $key,$v:=.Data.Policies.RateLimit}}<tr><td class="mono">{{$key}}</td><td class="mono break-any">{{string $v}}</td></tr>{{else}}<tr><td colspan="2" class="empty">No rate limiting config returned.</td></tr>{{end}}</tbody></table></div></section><div class="metric-row mt-panel"><div class="panel metric"><span class="metric-label">RATE-LIMITED RESPONSES</span><strong>{{int .Data.Stats.RateLimited}}</strong><small>Cumulative /stats counter</small></div></div>{{end}}
{{end}}
@@ -0,0 +1,3 @@
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>DNS resolver diagnostic</h2><p>One-shot DNS query through this EasyDNS server</p></div></div><form method="get" action="/query" class="form-body"><div class="form-columns"><div class="field-row"><label for="qname" class="field-label">Domain name <span class="required">*</span></label><input id="qname" class="field mono" name="name" value="{{selectval .Data.Form "name"}}" required placeholder="example.org"></div><div class="field-row"><label for="qtype" class="field-label">Record type</label><select id="qtype" class="field" name="type">{{range recordTypes}}<option value="{{.}}" {{if eq . (selectval $.Data.Form "type")}}selected{{end}}>{{.}}</option>{{end}}</select></div></div><div class="form-actions"><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#search"/></svg>Run lookup</button></div></form>
{{if .Data.Query}}<div class="response-summary"><div class="strip-cell"><span>RESPONSE CODE</span><strong class="{{statusclass .Data.Query.RCode}}">{{.Data.Query.RCode}}</strong></div><div class="strip-cell"><span>AUTHORITATIVE</span><strong>{{if .Data.Query.AA}}Yes{{else}}No{{end}}</strong></div><div class="strip-cell"><span>TIME</span><strong>{{float .Data.Query.ElapsedMS}} ms</strong></div></div><div class="panel-head"><h2>Answer section</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>TTL</th><th>RDATA</th></tr></thead><tbody>{{range .Data.Query.Answers}}<tr><td class="mono">{{.Name}}</td><td><span class="tag green">{{.Type}}</span></td><td>{{.TTL}}</td><td class="mono">{{.Data}}</td></tr>{{else}}<tr><td class="empty" colspan="4">No answer records.</td></tr>{{end}}</tbody></table></div><div class="panel-head"><h2>Authority section</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>TTL</th><th>RDATA</th></tr></thead><tbody>{{range .Data.Query.Authority}}<tr><td class="mono">{{.Name}}</td><td><span class="tag blue">{{.Type}}</span></td><td>{{.TTL}}</td><td class="mono">{{.Data}}</td></tr>{{else}}<tr><td class="empty" colspan="4">No authority records returned.</td></tr>{{end}}</tbody></table></div>{{end}}</section>
<aside class="panel guide"><div class="panel-head"><h2>Diagnostics</h2></div><div class="panel-body"><p>The query is sent through the actual EasyDNS listener using the server API. It is not an external DNS testing service.</p><div class="data-row"><span>Query history</span><strong>Unavailable</strong></div><div class="data-row"><span>Live lookup</span><strong class="success">Supported</strong></div><div class="notice-inline mt-panel">The EasyDNS API defaults an unrecognized type to A. This UI limits the type selector to recognized values.</div></div></aside></div>{{end}}
@@ -0,0 +1,8 @@
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>{{if eq .Data.Action "edit"}}Edit existing record{{else}}New DNS record{{end}}</h2><p>Zone <span class="mono">{{.Data.Zone.Name}}</span> · serial guarded by ETag</p></div><a href="{{.Data.ZoneURL}}/records" class="btn-ui btn-small">Back to records</a></div>
{{if .Data.IsPrimary}}<form class="form-body" method="post" action="{{if eq .Data.Action "edit"}}{{.Data.ZoneURL}}/records/{{.Data.Record.ID}}{{else}}{{.Data.ZoneURL}}/records{{end}}"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="etag" value="{{.Data.ETag}}">
<div class="form-columns"><div class="field-row"><label class="field-label" for="recordName">Record name <span class="required">*</span></label><input class="field mono" id="recordName" name="name" required value="{{selectval .Data.Form "name"}}" placeholder="www or @"><small>@ for zone apex; relative names are allowed.</small></div><div class="field-row"><label class="field-label" for="recordType">Record type <span class="required">*</span></label><select class="field" name="type" id="recordType" required><option value="">Select record type</option>{{range recordTypes}}<option value="{{.}}" {{if eq (selectval $.Data.Form "type") .}}selected{{end}} {{if eq . "SOA"}}disabled{{end}}>{{.}}</option>{{end}}</select><small>SOA changes require whole-zone replacement.</small></div></div>
<div class="field-row"><label class="field-label" for="recordData">Record data (RDATA) <span class="required">*</span></label><textarea id="recordData" class="field mono" name="data" rows="4" required placeholder="192.0.2.10">{{selectval .Data.Form "data"}}</textarea><small>Use the syntax expected for the selected RR type; Rust validates exact RDATA format.</small></div>
<div class="form-columns"><div class="field-row"><label class="field-label" for="recordTTL">TTL in seconds <span class="required">*</span></label><input class="field mono" id="recordTTL" name="ttl" type="number" min="0" max="4294967295" required value="{{selectval .Data.Form "ttl"}}"><small>0–4,294,967,295. Default: 3600.</small></div><div class="field-row"><label class="field-label">Current zone serial</label><div class="field readout mono">{{.Data.Zone.SerialText}}</div><small>Changes to the serial may trigger HTTP 412.</small></div></div>
<div class="form-actions"><a href="{{.Data.ZoneURL}}/records" class="btn-ui">Cancel</a><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#save"/></svg>{{if eq .Data.Action "edit"}}Save changes{{else}}Add record{{end}}</button></div></form>{{else}}<div class="panel-body"><div class="notice-inline">This zone is secondary or unavailable. Record modifications are not allowed.</div></div>{{end}}</section>
<aside class="panel guide"><div class="panel-head"><h2>Write behavior</h2></div><div class="panel-body"><p>This form uses an existing EasyDNS operation. There is no record-details endpoint; edits are populated from the record list.</p><div class="data-row"><span>Change conflict</span><strong>412</strong></div><div class="data-row"><span>Validation error</span><strong>400 / 422</strong></div><div class="data-row"><span>Secondary zone</span><strong>409</strong></div><div class="notice-inline mt-panel">The server may assign a different record ID after changing the name, type or value.</div></div></aside>
</div>{{end}}
@@ -0,0 +1,3 @@
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>Full zone-file replacement</h2><p>{{.Data.Zone.Name}} · submit complete replacement content</p></div></div><div class="panel-body"><div class="notice danger"><strong>Destructive replacement.</strong> The EasyDNS API does not return original zone file text. Paste a complete replacement file that you already possess.</div></div>
<form class="form-body" method="post" action="{{.Data.ZoneURL}}/replace"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="etag" value="{{.Data.ETag}}"><div class="field-row"><label class="field-label" for="zoneFull">Complete zone file <span class="required">*</span></label><textarea class="field code-input mono" id="zoneFull" rows="15" spellcheck="false" name="zone_file" required placeholder="Paste the full zone file here. Nothing is preloaded.">{{selectval .Data.Form "zone_file"}}</textarea></div><div class="field-row"><label class="field-label" for="replaceConfirm">Type REPLACE to confirm <span class="required">*</span></label><input id="replaceConfirm" name="confirm" class="field mono" required pattern="REPLACE" autocomplete="off" placeholder="REPLACE"></div><div class="form-actions"><a class="btn-ui" href="{{.Data.ZoneURL}}">Cancel</a><button class="btn-ui btn-danger-ui" type="submit">Replace zone contents</button></div></form></section>
<aside class="panel guide"><div class="panel-head"><h2>Before you continue</h2></div><div class="panel-body"><p>Back up the original zone from its source outside this panel. The API validates the full replacement, calculates the diff, updates the serial and sends NOTIFY where configured.</p><div class="data-row"><span>Current serial</span><strong class="mono">{{.Data.Zone.SerialText}}</strong></div><div class="data-row"><span>Conflict</span><strong>412</strong></div><div class="data-row"><span>Invalid content</span><strong>422</strong></div></div></aside></div>{{end}}
@@ -0,0 +1,5 @@
{{define "content"}}<div class="status-strip panel compact-strip"><div class="strip-cell"><span>HEALTH</span><strong class="{{statusclass .Data.Health.Status}}">{{if .Data.Health.Status}}{{.Data.Health.Status}}{{else}}Unavailable{{end}}</strong></div><div class="strip-cell"><span>READINESS</span><strong>{{selectval .Data.Filter "ready"}}</strong></div><div class="strip-cell"><span>MODE</span><strong>{{.Data.Status.Mode}}</strong></div><div class="strip-cell"><span>UPTIME</span><strong>{{uptime .Data.Status.UptimeSeconds}}</strong></div><div class="strip-cell"><span>VERSION</span><strong>{{.Data.Status.Version}}</strong></div></div>
<div class="dashboard-lower mt-panel"><section class="panel"><div class="panel-head"><h2>DNS roles</h2></div><div class="panel-body compact"><div class="data-row"><span>Primary zones</span><strong>{{int .Data.Status.Roles.Primary}}</strong></div><div class="data-row"><span>Secondary zones</span><strong>{{int .Data.Status.Roles.Secondary}}</strong></div><div class="data-row"><span>Recursive role</span><strong>{{.Data.Status.Roles.Recursive}}</strong></div><div class="data-row"><span>Forwarder role</span><strong>{{.Data.Status.Roles.Forwarder}}</strong></div><div class="data-row"><span>Forward zones</span><strong>{{.Data.Status.Roles.ForwardZones}}</strong></div><div class="data-row"><span>Default resolution</span><strong>{{.Data.Status.Roles.DefaultResolution}}</strong></div></div></section>
<section class="panel"><div class="panel-head"><h2>Bound listeners</h2></div><div class="panel-body compact">{{range $key,$v:=.Data.Status.Listeners}}<div class="data-row"><span>{{$key}}</span><strong class="mono break-any">{{string $v}}</strong></div>{{else}}<div class="empty">No listener information.</div>{{end}}</div></section>
<section class="panel"><div class="panel-head"><h2>Health / expired zones</h2></div><div class="panel-body compact"><div class="data-row"><span>Health</span><strong class="{{statusclass .Data.Health.Status}}">{{.Data.Health.Status}}</strong></div><div class="data-row"><span>Expired zones</span><strong>{{len .Data.Health.ExpiredZones}}</strong></div>{{range .Data.Health.ExpiredZones}}<div class="data-row mono danger">{{.}}</div>{{else}}<p class="muted mt-3">No expired zones returned.</p>{{end}}</div></section></div>
<section class="panel mt-panel"><div class="panel-head"><h2>Per-zone runtime state</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>ROLE</th><th>LOADED</th><th>EXPIRED</th><th>SERIAL</th><th>RECORDS</th><th>LAST SYNC</th></tr></thead><tbody>{{range .Data.Status.Zones}}<tr><td><a class="entity mono" href="{{zoneurl .Name}}">{{.Name}}</a></td><td>{{.Kind}}</td><td>{{.Loaded}}</td><td>{{.Expired}}</td><td class="mono">{{.SerialText}}</td><td>{{.Records}}</td><td class="mono">{{.LastSync}}</td></tr>{{else}}<tr><td colspan="7" class="empty">No zones in status response.</td></tr>{{end}}</tbody></table></div></section>{{end}}
@@ -0,0 +1 @@
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>New upstream server</h2><p>EasyDNS validates the transport URI and reloads its configuration.</p></div></div><form method="post" action="/upstreams" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label class="field-label" for="address">Upstream address <span class="required">*</span></label><input class="field mono" id="address" name="address" required value="{{selectval .Data.Form "address"}}" placeholder="1.1.1.1"><small>IP address or IP:port. For encrypted transports use a protocol scheme and TLS server name.</small></div><div class="form-actions"><a class="btn-ui" href="/upstreams">Cancel</a><button class="btn-ui btn-primary-ui" type="submit">Add upstream</button></div></form></section><aside class="panel guide"><div class="panel-head"><h2>Accepted formats</h2></div><div class="panel-body"><p class="mono code-example">1.1.1.1<br>1.1.1.1:53<br>tcp://1.1.1.1<br>tls://1.1.1.1#cloudflare-dns.com<br>https://1.1.1.1/dns-query#cloudflare-dns.com</p><p>Encrypted transports require the certificate's DNS name. No server deletion endpoint exists.</p></div></aside></div>{{end}}
@@ -0,0 +1,4 @@
{{define "content"}}<section class="panel"><div class="toolbar"><div class="toolbar-title"><h2>Resolver pools</h2><p>Runtime upstream health and forwarding strategy.</p></div><a class="btn-ui btn-primary-ui" href="/upstreams/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Add upstream</a></div>
{{range .Data.Upstreams}}<div class="pool-head"><div><h3>{{.Group}}</h3><span class="subtle">Strategy: {{.Strategy}}</span></div><span class="tag blue">{{len .Servers}} servers</span></div><div class="table-scroll"><table class="data-table"><thead><tr><th>ADDRESS</th><th>HEALTH</th><th>QUERIES</th><th>FAILURES</th><th>EWMA RTT</th><th>CIRCUIT</th><th>LAST ERROR</th></tr></thead><tbody>
{{range .Servers}}<tr><td class="mono entity">{{.Address}}</td><td><span class="dot {{if .Stats.Healthy}}ok{{else}}warn{{end}}"></span>{{if .Stats.Healthy}}Healthy{{else}}Unavailable{{end}}</td><td class="mono">{{int .Stats.Queries}}</td><td class="mono">{{int .Stats.Failures}}</td><td class="mono">{{if .Stats.EWMARTTMS}}{{float .Stats.EWMARTTMS}} ms{{else}}—{{end}}</td><td class="mono">{{if .Stats.CircuitOpenForMS}}Open{{else}}Closed / unknown{{end}}</td><td class="muted">{{if .Stats.LastError}}{{.Stats.LastError}}{{else}}—{{end}}</td></tr>{{else}}<tr><td class="empty" colspan="7">No servers in this pool.</td></tr>{{end}}
</tbody></table></div>{{else}}<div class="empty">No upstream groups returned by EasyDNS.</div>{{end}}</section><div class="notice-inline mt-panel">The API supports adding an upstream address, but does not provide a REST method to edit or remove upstreams or reorder pools.</div>{{end}}
@@ -0,0 +1,9 @@
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>{{if eq .Data.Action "import"}}Import complete zone file{{else}}Create from nameservers{{end}}</h2><p>Primary zones only · validated before activation</p></div></div>
<div class="mode-tabs"><a class="tab {{if ne .Data.Action "import"}}active{{end}}" href="/zones/new">From nameservers</a><a class="tab {{if eq .Data.Action "import"}}active{{end}}" href="/zones/import">From zone file</a></div>
<form method="post" action="/zones" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="mode" value="{{.Data.Action}}">
<div class="field-row"><label class="field-label" for="zoneName">Zone name <span class="required">*</span></label><input id="zoneName" class="field" type="text" name="name" required placeholder="example.org" value="{{selectval .Data.Form "name"}}"><small>Use a full DNS zone name. Creating a secondary is not supported by this API.</small></div>
{{if eq .Data.Action "import"}}<div class="field-row"><label class="field-label" for="zoneFile">Complete zone file <span class="required">*</span></label><textarea id="zoneFile" class="field mono code-input" name="zone_file" rows="13" spellcheck="false" required placeholder="$TTL 3600&#10;@ IN SOA ns1.example.org. hostmaster.example.org. 1 3600 900 1209600 300&#10;@ IN NS ns1.example.org.">{{selectval .Data.Form "zone_file"}}</textarea><small>Paste original zone file content you own. EasyDNS does not expose zone files for download via REST.</small></div>
{{else}}<div class="field-row"><label class="field-label" for="zoneNS">Nameservers <span class="required">*</span></label><textarea id="zoneNS" class="field mono" name="ns" rows="4" placeholder="ns1.example.org.&#10;ns2.example.org." required>{{selectval .Data.Form "ns"}}</textarea><small>One FQDN per line; the API generates a minimal SOA/NS zone.</small></div><div class="field-row"><label class="field-label" for="hostmaster">SOA hostmaster</label><input id="hostmaster" class="field mono" name="hostmaster" value="{{selectval .Data.Form "hostmaster"}}" placeholder="hostmaster.example.org."></div>{{end}}
<div class="form-columns"><div class="field-row"><label class="field-label" for="transferAcl">Transfer ACL (optional)</label><textarea class="field mono" id="transferAcl" name="transfer_acl" rows="3" placeholder="192.0.2.0/24">{{selectval .Data.Form "transfer_acl"}}</textarea><small>Networks, one per line.</small></div><div class="field-row"><label class="field-label" for="notify">NOTIFY targets (optional)</label><textarea class="field mono" id="notify" name="notify" rows="3" placeholder="192.0.2.20:53">{{selectval .Data.Form "notify"}}</textarea><small>IP:port socket addresses, one per line.</small></div></div>
<div class="form-actions"><a href="/zones" class="btn-ui">Cancel</a><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Create primary zone</button></div>
</form></section><aside class="panel guide"><div class="panel-head"><h2>Creation details</h2></div><div class="panel-body"><p>This is a configuration-changing operation. EasyDNS validates the zone, persists it in the API overlay and reloads the runtime.</p><div class="data-row"><span>Already exists</span><strong>409</strong></div><div class="data-row"><span>Invalid zone file</span><strong>422</strong></div><div class="data-row"><span>Invalid request</span><strong>400</strong></div><div class="notice-inline mt-panel">The nameservers/hostmaster form does not create secondary zones.</div></div></aside></div>{{end}}
@@ -0,0 +1,44 @@
{{define "content"}}
<div class="status-strip panel zone-strip">
<div class="strip-cell"><span>ZONE STATE</span><strong><span class="dot {{statusclass .Data.Zone.StateText}}"></span>{{.Data.Zone.StateText}}</strong></div>
<div class="strip-cell"><span>SERIAL</span><strong class="mono">{{.Data.Zone.SerialText}}</strong></div>
<div class="strip-cell"><span>TYPE</span><strong>{{.Data.Zone.Kind}}</strong></div>
<div class="strip-cell"><span>RECORDS</span><strong>{{.Data.Zone.Records}}</strong></div>
<div class="strip-cell"><span>TRANSFER / SYNC</span><strong>{{if .Data.Zone.IsSecondary}}{{.Data.Zone.SyncText}}{{else}}—{{end}}</strong></div>
<div class="strip-cell"><span>LAST SYNC</span><strong class="small-text">{{.Data.Zone.LastSync}}</strong></div>
</div>
<div class="tabs" role="navigation" aria-label="Zone views">
<a {{if eq .Data.Tab "overview"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}">Overview</a>
<a {{if eq .Data.Tab "records"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/records">Records</a>
<a {{if eq .Data.Tab "transfers"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/transfers">Transfers / History</a>
<a {{if eq .Data.Tab "dnssec"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/dnssec">DNSSEC</a>
<a {{if eq .Data.Tab "operations"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/operations">Operations</a>
</div>
{{if eq .Data.Tab "overview"}}
<div class="dashboard-lower three-cards">
<section class="panel"><div class="panel-head"><div><h2>Zone status</h2><p>Live authoritative store state</p></div></div><div class="panel-body compact"><div class="data-row"><span>Zone name</span><strong class="mono">{{.Data.Zone.Name}}</strong></div><div class="data-row"><span>Loaded</span><strong>{{if .Data.Zone.Loaded}}Yes{{else}}No{{end}}</strong></div><div class="data-row"><span>Expired</span><strong class="{{if .Data.Zone.Expired}}danger{{else}}success{{end}}">{{if .Data.Zone.Expired}}Yes{{else}}No{{end}}</strong></div><div class="data-row"><span>Journal entries</span><strong>{{.Data.Zone.JournalEntries}}</strong></div><div class="data-row"><span>View associations</span><strong>{{if .Data.Zone.Views}}{{join .Data.Zone.Views ", "}}{{else}}Default{{end}}</strong></div></div></section>
<section class="panel"><div class="panel-head"><div><h2>Transfer &amp; notification</h2><p>Configured values from zone detail</p></div></div><div class="panel-body compact"><div class="data-row"><span>NOTIFY targets</span><strong>{{len .Data.Zone.Config.Notify}}</strong></div><div class="data-row"><span>Transfer ACL entries</span><strong>{{len .Data.Zone.Config.TransferACL}}</strong></div><div class="data-row"><span>Primaries</span><strong>{{len .Data.Zone.Config.Primaries}}</strong></div><div class="data-row"><span>NOTIFY sent</span><strong>{{int .Data.Zone.Status.NotifiesSent}}</strong></div><div class="data-row"><span>NOTIFY failed</span><strong>{{int .Data.Zone.Status.NotifiesFailed}}</strong></div></div></section>
<section class="panel"><div class="panel-head"><div><h2>Secondary refresh</h2><p>Only applicable to secondary zones</p></div></div><div class="panel-body compact"><div class="data-row"><span>Last successful</span><strong class="small-text">{{.Data.Zone.LastSync}}</strong></div><div class="data-row"><span>Last error</span><strong class="danger">{{if .Data.Zone.Status.LastError}}{{.Data.Zone.Status.LastError}}{{else}}—{{end}}</strong></div><div class="data-row"><span>Serial</span><strong>{{.Data.Zone.SerialText}}</strong></div></div></section>
</div>
<div class="section-actions"><a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records">View DNS records</a><a class="btn-ui" href="{{.Data.ZoneURL}}/transfers">Transfer history</a><a class="btn-ui" href="{{.Data.ZoneURL}}/operations">Zone operations</a></div>
{{else if eq .Data.Tab "records"}}
<section class="panel"><div class="toolbar"><form class="toolbar-form" method="get" action="{{.Data.ZoneURL}}/records"><input class="field field-search" name="name" placeholder="Record name begins with..." aria-label="Filter record names" value="{{selectval .Data.Filter "name"}}"><select class="field field-select" aria-label="Record type" name="type"><option value="">All types</option>{{range $type := recordTypes}}<option value="{{$type}}" {{if eq (selectval $.Data.Filter "type") $type}}selected{{end}}>{{$type}}</option>{{end}}</select><button type="submit" class="btn-ui"><svg class="ico"><use href="/static/icons.svg#search"/></svg>Filter</button></form>
<div class="toolbar-end"><span class="subtle desktop-only">{{.Data.Pagination.Total}} records</span>{{if .Data.IsPrimary}}<a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Add record</a>{{else}}<span class="tag muted-tag">Secondary · read-only</span>{{end}}</div></div>
<div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>RDATA</th><th>TTL</th>{{if .Data.IsPrimary}}<th class="right">ACTIONS</th>{{end}}</tr></thead><tbody>
{{range .Data.Records}}<tr><td class="mono entity">{{.Name}}</td><td><span class="tag green">{{.Type}}</span></td><td class="mono rdata">{{.Data}}</td><td class="mono">{{.TTL}}</td>{{if $.Data.IsPrimary}}<td class="right">{{if ne .Type "SOA"}}<div class="row-actions"><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/edit?page={{$.Data.Pagination.Page}}" class="icon-button" aria-label="Edit record {{.Name}}" title="Edit"><svg class="ico"><use href="/static/icons.svg#edit"/></svg></a><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/delete?page={{$.Data.Pagination.Page}}" class="icon-button danger-hover" aria-label="Delete record {{.Name}}" title="Delete"><svg class="ico"><use href="/static/icons.svg#trash"/></svg></a></div>{{else}}<span class="subtle" title="SOA is managed by zone replacement">Managed</span>{{end}}</td>{{end}}</tr>{{else}}<tr><td class="empty" colspan="5">No records returned for this filter.</td></tr>{{end}}
</tbody></table></div><div class="table-footer"><span>{{len .Data.Records}} / {{.Data.Pagination.Total}} records · page {{.Data.Pagination.Page}}</span><div class="pagination-ui">{{if gt .Data.Pagination.Page 1}}<a class="btn-ui btn-small" href="{{.Data.ZoneURL}}/records?page={{dec .Data.Pagination.Page}}&amp;name={{selectval .Data.Filter "name"}}&amp;type={{selectval .Data.Filter "type"}}">Previous</a>{{end}}{{if lt (multiply .Data.Pagination.Page .Data.Pagination.PerPage) .Data.Pagination.Total}}<a class="btn-ui btn-small" href="{{.Data.ZoneURL}}/records?page={{inc .Data.Pagination.Page}}&amp;name={{selectval .Data.Filter "name"}}&amp;type={{selectval .Data.Filter "type"}}">Next</a>{{end}}</div></div></section>
<div class="notice-inline mt-panel">Writes are protected with the zone serial ETag. SOA records are managed through whole-zone replacement; secondaries are read-only.</div>
{{else if eq .Data.Tab "transfers"}}
<section class="panel"><div class="panel-head"><div><h2>Zone transfer history</h2><p>Recorded inbound and outbound AXFR / IXFR events</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>TIME</th><th>DIRECTION</th><th>TYPE</th><th>PEER</th><th>SERIAL</th><th>RECORDS</th><th>DURATION</th><th>RESULT</th></tr></thead><tbody>{{range .Data.Transfers}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td>{{.Direction}}</td><td><span class="tag green">{{.Kind}}</span></td><td class="mono">{{.Peer}}</td><td class="mono">{{if .Serial}}{{.Serial}}{{else}}—{{end}}</td><td>{{.Records}}</td><td class="mono">{{.DurationMS}} ms</td><td><span class="dot {{if .OK}}ok{{else}}danger{{end}}"></span>{{if .OK}}Completed{{else}}{{if .Error}}{{.Error}}{{else}}Failed{{end}}{{end}}</td></tr>{{else}}<tr><td class="empty" colspan="8">No recorded transfers. This API provides history, not a live transfer queue.</td></tr>{{end}}</tbody></table></div></section>
{{else if eq .Data.Tab "dnssec"}}
<section class="panel"><div class="panel-head"><div><h2>DNSSEC status</h2><p>Inspection only. Key lifecycle and signing changes are not exposed through REST.</p></div></div><div class="panel-body">{{if .Data.Zone.DNSSEC}}<div class="code-block"><pre>{{asjson .Data.Zone.DNSSEC}}</pre></div>{{else}}<div class="empty">No DNSSEC status returned for this zone.</div>{{end}}</div></section>
{{else if eq .Data.Tab "operations"}}
<div class="operations-grid"><section class="panel"><div class="panel-head"><div><h2>Supported zone actions</h2><p>Available operations depend on the zone role and configuration</p></div></div><div class="panel-body">
{{if .Data.Zone.IsSecondary}}<form method="post" action="{{.Data.ZoneURL}}/sync" class="operation"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="confirm" value="yes"><div><strong>Synchronize secondary</strong><small>Request an immediate refresh from its primary.</small></div><button class="btn-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#refresh"/></svg>Sync now</button></form>{{end}}
{{if .Data.Zone.Config.Notify}}<form method="post" action="{{.Data.ZoneURL}}/notify" class="operation"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="confirm" value="yes"><div><strong>Send DNS NOTIFY</strong><small>{{len .Data.Zone.Config.Notify}} configured targets · HTTP 202 means accepted, not delivered</small></div><button class="btn-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#bell"/></svg>Send NOTIFY</button></form>{{end}}
{{if .Data.Zone.IsPrimary}}<div class="operation"><div><strong>Replace zone contents</strong><small>Submit a complete operator-provided zone file. No original file download.</small></div><a href="{{.Data.ZoneURL}}/replace" class="btn-ui">Replace zone</a></div>{{end}}
<div class="operation"><div><strong>Delete API-created zone</strong><small>Only zones created in the API overlay are deletable; others return HTTP 409.</small></div><a href="{{.Data.ZoneURL}}/delete" class="btn-ui btn-danger-ui">Delete zone</a></div>
{{if and (not .Data.Zone.IsSecondary) (not .Data.Zone.IsPrimary)}}<div class="empty">Zone operations require a loaded zone.</div>{{end}}
</div></section><section class="panel"><div class="panel-head"><div><h2>Configured transfer access</h2><p>Read-only zone configuration</p></div></div><div class="panel-body"><h3>Transfer ACL</h3>{{range .Data.Zone.Config.TransferACL}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No transfer ACL entries.</p>{{end}}<h3 class="mt-4">NOTIFY targets</h3>{{range .Data.Zone.Config.Notify}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No NOTIFY targets.</p>{{end}}<h3 class="mt-4">Primary servers</h3>{{range .Data.Zone.Config.Primaries}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No primary servers in this zone configuration.</p>{{end}}</div></section></div>
{{end}}
{{end}}
@@ -0,0 +1,11 @@
{{define "content"}}
<div class="status-strip panel compact-strip"><div class="strip-cell"><span>TOTAL ZONES (CURRENT FILTER)</span><strong>{{int .Data.Pagination.Total}}</strong></div><div class="strip-cell"><span>ITEMS PER PAGE</span><strong>{{.Data.Pagination.PerPage}}</strong></div><div class="strip-cell"><span>CURRENT PAGE</span><strong>{{.Data.Pagination.Page}}</strong></div><div class="strip-cell"><span>ZONE TYPES</span><strong>Primary · Secondary</strong></div></div>
<section class="panel mt-panel"><div class="toolbar">
<form action="/zones" method="get" class="toolbar-form"><label class="sr-only" for="searchZones">Search zones</label><input class="field field-search" id="searchZones" name="name" placeholder="Search zones by name" value="{{selectval .Data.Filter "name"}}"><select class="field field-select" name="kind" aria-label="Zone type"><option value="">All types</option><option value="primary" {{if eq (selectval .Data.Filter "kind") "primary"}}selected{{end}}>Primary</option><option value="secondary" {{if eq (selectval .Data.Filter "kind") "secondary"}}selected{{end}}>Secondary</option></select><button class="btn-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#search"/></svg> Search</button></form>
<div class="toolbar-end"><a class="btn-ui" href="/zones/import"><svg class="ico"><use href="/static/icons.svg#upload"/></svg> Import zone file</a><a class="btn-ui btn-primary-ui" href="/zones/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg> Add zone</a></div></div>
<div class="table-scroll"><table class="data-table"><thead><tr><th>ZONE NAME</th><th>TYPE</th><th>SERIAL</th><th>RECORDS</th><th>STATE</th><th>TRANSFER / SYNC</th><th>LAST SUCCESSFUL SYNC</th><th class="right">ACTION</th></tr></thead><tbody>
{{range .Data.Zones}}<tr><td><a class="entity" href="{{zoneurl .Name}}">{{.Name}}</a></td><td><span class="tag {{if .IsSecondary}}blue{{else}}green{{end}}">{{.Kind}}</span></td><td class="mono">{{.SerialText}}</td><td class="mono">{{.Records}}</td><td><span class="dot {{if .Loaded}}{{if .Expired}}danger{{else}}ok{{end}}{{else}}warn{{end}}"></span>{{.StateText}}</td><td>{{if .IsSecondary}}<span class="dot {{statusclass .SyncText}}"></span>{{.SyncText}}{{else}}<span class="subtle">—</span>{{end}}</td><td class="mono subtle">{{if .IsSecondary}}{{.LastSync}}{{else}}—{{end}}</td><td class="right"><a class="btn-ui btn-small" href="{{zoneurl .Name}}">Open <svg class="ico"><use href="/static/icons.svg#arrow-right"/></svg></a></td></tr>{{else}}<tr><td class="empty" colspan="8">No zones match the current filter, or the API is not available.</td></tr>{{end}}
</tbody></table></div>
<div class="table-footer"><span>Showing {{len .Data.Zones}} of {{int .Data.Pagination.Total}} zones · page {{.Data.Pagination.Page}}</span><div class="pagination-ui"><a class="btn-ui btn-small" href="/zones?page=1&amp;name={{selectval .Data.Filter "name"}}&amp;kind={{selectval .Data.Filter "kind"}}">First</a>{{if gt .Data.Pagination.Page 1}}<a class="btn-ui btn-small" href="/zones?page={{dec .Data.Pagination.Page}}&amp;name={{selectval .Data.Filter "name"}}&amp;kind={{selectval .Data.Filter "kind"}}">Previous</a>{{end}}{{if lt (multiply .Data.Pagination.Page .Data.Pagination.PerPage) .Data.Pagination.Total}}<a class="btn-ui btn-small" href="/zones?page={{inc .Data.Pagination.Page}}&amp;name={{selectval .Data.Filter "name"}}&amp;kind={{selectval .Data.Filter "kind"}}">Next</a>{{end}}</div></div>
</section><div class="notice-inline mt-panel">Primary zones can be created through REST. Secondary zone creation and general zone configuration editing are not exposed by EasyDNS.</div>
{{end}}