Files
EasyDNS-Web/UI-STRUCTURE.md
T
Mateusz Gruszczyński a28362b82c
Go quality gates / test (push) Waiting to run
v0.1.2
2026-12-01 00:16:15 +01:00

11 KiB

EasyDNS Web UI structure

Navigation: default single-server mode

EasyDNS
DNS
  Overview                      /
  Zones                         /zones
    Create Primary zone         /zones/new
    Import full zone file       /zones/import
    Zone details                /zones/{zone}
      Records                   /zones/{zone}/records
        Hide DNSSEC records     ?hide_dnssec=1 (UI-only filter, before pagination)
        Add record              /zones/{zone}/records/new
        Edit record             /zones/{zone}/records/{id}/edit
        Delete record           /zones/{zone}/records/{id}/delete
      Transfers / History       /zones/{zone}/transfers
      DNSSEC (read only)        /zones/{zone}/dnssec
      Operations                /zones/{zone}/operations
        Replace whole zone      /zones/{zone}/replace
        Delete zone             /zones/{zone}/delete
  DNS lookup                    /query?name=&type=
RESOLUTION & POLICY
  Upstreams                     /upstreams
    Add upstream                /upstreams/new
  Policies                      /policies
  Views (read only)             /views
  ACL (read only)               /acl
  Rate limiting (read only)     /rate-limiting
  Blocklists                    /blocklists
    Add rule                    /blocklists/new
MONITORING & SYSTEM
  Cache                         /cache
  Metrics                       /metrics
  Audit log                     /audit
  Server status                 /status
  Configuration                 /configuration
    Multi-server panel option   /configuration/multi-server (POST)

There is no Query Log, built-in server restart, or arbitrary DNS config editor. Zone-specific functions are tabs and operations within Zone Details rather than separate sidebar items. The menu collapses to a mobile drawer on narrow screens.

Navigation: when optional multi-server mode is enabled

The original navigation remains, with two additions:

FLEET
  Servers                       /servers
    Server inventory            /servers#server-inventory
    Specific inventory row      /servers#server-{id}
    Add server                  /servers/new
    Compare zone serials        /servers/compare?zone=example.com.
    Edit display role           /servers/{id}/role (POST)
    Remove connection           /servers/{id}/remove
TOP BAR
  Active EasyDNS server         /servers/select (POST, CSRF-protected)

Every standard page, including Overview, Zones, DNS lookup, Metrics and Server status, then reads from the currently selected EasyDNS installation. The selected node is shown in the eyebrow and sidebar footer. The special Fleet page always summarizes all registered servers, not just the active one.

The initial local node uses the original API endpoint and generated token/socket. The default label is Primary, but an operator may change it to Secondary or Unassigned. Remote nodes are added explicitly with a separate HTTPS or loopback URL and their own generated EasyDNS control tokens.

Only one panel label can be Primary at a time. This label is not an EasyDNS DNS-role setter. Actual primary and secondary zone counts are read from each node's /api/v1/status; a node can report a mixture of both. When offline, values are shown as unavailable rather than invented.

Enable/disable flow

  1. Enable Multi-server by setting [multiserver] enabled = true in Debian TOML or EASYDNS_UI_MULTISERVER=true in Compose .env, then restart. When no explicit flag exists, the Configuration page offers an authenticated toggle instead.
  2. The Servers page and automatic active-server selector appear once the mode is enabled.
  3. Use Add server for UI-managed remote installations; fields are name, role, url and token. Alternatively, configure fixed remote slots in TOML or .env with separate tokens.
  4. In Servers, select an installation or compare zone serials. The inventory uses LOCAL / REMOTE badges. Roles of configuration-managed nodes are read-only; panel-added remote roles can be changed. A local role configured explicitly is also read-only.
  5. Disable the mode through the same source that enabled it. For UI-managed settings, disabling retains saved remotes and suspends polling; explicitly Remove a UI-managed remote to delete its stored token.

An explicit TOML enabled flag or EASYDNS_UI_MULTISERVER overrides an older saved web preference. While either is present, the panel hides the toggle and rejects writes to its old endpoint. Configuration remains accessible regardless of mode.

Form and operation behavior

  • Admin sign-in: the panel has its own password and HMAC session. The Rust EasyDNS bearer token stays entirely on the Go backend. Every state-changing HTML action requires POST and a session CSRF token.
  • Create zone: name and either one or more ns[] values or the complete zone_file are required. Optional hostmaster, transfer_acl[], notify[] are passed only in the supported create payload. Creates Primary only.
  • Add record: name, type, ttl and data are required. SOA record CRUD is intentionally disabled. The panel sends the current If-Match serial and handles 412 conflicts.
  • Edit record: the API lacks GET-by-ID; the panel finds the record within the paginated list, then displays form values. Invalid or stale values receive validation feedback.
  • Delete record: displays record identity and requires confirmation; sends If-Match to avoid silent conflict.
  • Replace zone: the operator supplies a complete new zone file. No prefilled original content is fabricated. Explicit REPLACE confirmation, with 412/422 error handling.
  • Delete zone: the operator enters the exact zone name; native API may return 409 for config-file zones.
  • NOTIFY / Sync: appear only where the selected zone actually supports them. They use native per-zone POST operations and do not imply guaranteed delivery/replication.
  • DNS lookup: GET query for a name/type; returns rcode, answers, authority and timing. Not a DNS query-history service.
  • Upstreams: add address only; the API does not expose update/delete.
  • Policies: only allowlist and block_action writable; Views, ACL and Rate limiting are read-only.
  • Blocklists: add a single rule; source state and totals are read-only.
  • Cache: targeted domain invalidation or full flush after typing FLUSH ALL.
  • Configuration reload: requires RELOAD, calls the native hot-reload endpoint.
  • Server connection removal: requires exact display name and only removes the panel's metadata and saved token. It never deletes the actual EasyDNS installation.
  • Server role change: changes only the panel label; no Rust API write.
  • Serial comparison: reads each node's /api/v1/zones/{zone} and compares serial to the node labeled Primary if available; no automated sync or transfer-failure assumptions.

Errors, telemetry and responsiveness

The panel reports EasyDNS error.message without exposing bearer tokens. ETag conflicts show a dedicated 412 state. Destructive actions use dedicated confirmation pages or explicit phrases. Unavailable servers show degraded/offline probes and do not block other nodes.

The Go service samples /api/v1/stats every 15 seconds for each enabled node, keeping at most 1,440 samples per server (up to six hours in RAM). The authenticated internal GET /ui/telemetry serves the selected node in Single mode or multiple per-node histories / aligned aggregate rates in Split and Aggregate modes (?mode=split|aggregate). Graphs do not fabricate values when a server is unavailable. Resetting native counters after a server restart is handled without negative QPS.

OLED design uses compact tables, small outline buttons, fine separators and no gradients. Responsive breakpoints: 1570, 1130, 820 and 540 px; fleet topology stacks vertically at narrower widths. Server status shows Health, Readiness, Mode, Uptime and Version together on one desktop row.

Reference images vs production data

The accepted images under design/reference/ define the visual direction, not backend capabilities. Production HTML retains the RustProxy-inspired density, typography, charts and controls but removes fictitious cluster members, per-zone query charts, imaginary transfer progress and unsupported CRUD actions. design/screenshots/*-demo.png are browser renders against demo fixtures only.

Active-server context and switch behavior

When optional Multi-server management is enabled, the top toolbar includes a server selector with automatic change submission (external JS, CSP-compatible) and no redundant manual Switch button. The selector uses POST /servers/select with CSRF protection, then redirects to a safe page. Zone details and editing forms return to /zones during a switch so a stale record or ETag is never reused on another installation.

The ACTIVE SERVER strip on normal DNS pages and Single Metrics states the selected server name and API base URL. Aggregate/Split Metrics instead show FLEET METRICS and use all configured nodes. The current browser selection is stored in a protected HTTP-only cookie; every server-side API read/write and the telemetry endpoint resolve the correct client and per-server sample history. When a selected node has been removed, further writes fail with HTTP 409 instead of silently falling back to the local node. Choosing Local EasyDNS explicitly restores the local view. Disabling Multi-server restores the original single-server experience.

Fleet Metrics navigation and data boundaries

  • Multi-server off: /metrics is unchanged; only the local instance is shown.
  • Multi-server on with at least two configured nodes: Metrics shows a three-way Aggregate | Split | Single selector. Aggregate is the default until a mode is saved in the browser cookie. Direct mode links are /metrics?mode=aggregate, /metrics?mode=split, /metrics?mode=single.
  • Aggregate: totals of additive counters from available nodes, and time-aligned sums of per-node QPS when all configured nodes have fresh samples; weighted cache hit ratio; each server's p95 separately. A warning identifies any partially available fleet.
  • Split: one plotted line per node on common time axes (QPS, NOERROR, NXDOMAIN, cache hit rate, blocked queries, p95), a real per-node metrics table and sample freshness information.
  • Single: original live charts and counters from only the active node; choosing a server in the top selector changes this page and all standard DNS management pages.
  • Aggregate uses null for missing/old/reset readings; Split leaves individual gaps. No counter history is fabricated, and the maximum history is six hours in RAM. Aggregated cumulative counters are explicitly described as sums of each node's since-start counters, not shared time windows.
  • The Go panel-only GET /ui/telemetry?mode=aggregate|split supplies chart data derived from per-node /api/v1/stats polling; no native EasyDNS endpoints are added.