1 parent
8c4d463f1e
commit
de13d851a8
75 files changed
+4656
-442
No files matched your search
+103
-53
@@ -1,71 +1,121 @@
|
||||
# UI-STRUCTURE — nawigacja i przepływy
|
||||
# EasyDNS Web UI structure
|
||||
|
||||
## Menu (spójne na każdej stronie)
|
||||
## Navigation: default single-server mode
|
||||
|
||||
```text
|
||||
EasyDNS
|
||||
DNS
|
||||
Overview /
|
||||
Zones /zones
|
||||
Create primary zone /zones/new
|
||||
Import zone file /zones/import
|
||||
Zone details /zones/{zone}
|
||||
Records /zones/{zone}/records
|
||||
Add /zones/{zone}/records/new
|
||||
Edit /zones/{zone}/records/{id}/edit
|
||||
Delete /zones/{zone}/records/{id}/delete
|
||||
Transfers / History /zones/{zone}/transfers
|
||||
DNSSEC /zones/{zone}/dnssec (read only)
|
||||
Operations /zones/{zone}/operations
|
||||
Replace zone file /zones/{zone}/replace
|
||||
Delete zone /zones/{zone}/delete
|
||||
DNS lookup /query?name=&type=
|
||||
Overview /
|
||||
Zones /zones
|
||||
Create Primary zone /zones/new
|
||||
Import full zone file /zones/import
|
||||
Zone details /zones/{zone}
|
||||
Records /zones/{zone}/records
|
||||
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 /views (read only)
|
||||
ACL /acl (read only)
|
||||
Rate limiting /rate-limiting (read only)
|
||||
Blocklists /blocklists
|
||||
Add block rule /blocklists/new
|
||||
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
|
||||
Cache /cache
|
||||
Metrics /metrics
|
||||
Audit log /audit
|
||||
Server status /status
|
||||
Configuration /configuration
|
||||
Multi-server panel option /configuration/multi-server (POST)
|
||||
```
|
||||
|
||||
Menu nie ma Query Log, restartu usługi ani mechanizmów, których EasyDNS API nie obsługuje. Aktywna sekcja podkreślona zielonym paskiem zgodnym z referencją OLED. W podstronach strefy zamiast nowych pozycji sidebar stosowane są zakładki. Wąskie ekrany mają wysuwany sidebar.
|
||||
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.
|
||||
|
||||
## Formularze i operacje
|
||||
## Navigation: when optional multi-server mode is enabled
|
||||
|
||||
- Logowanie: lokalne hasło panelu i sesja HMAC. Bearer EasyDNS pozostaje w Go. Każdy mutujący formularz ma `POST` i CSRF. Panel przekłada formularz na dokładnie znaną metodę REST EasyDNS.
|
||||
- Create Zone: wymagane `name` oraz `ns[]` lub pełny `zone_file`, opcjonalnie `hostmaster`, `transfer_acl`, `notify`; niezależne zakładki „From nameservers” i „From zone file”. API tworzy tylko primary.
|
||||
- Add Record: wymagane `name`, `type`, `ttl`, `data`. `SOA` niedostępne. Go pobiera aktualny `ETag`, wysyła `If-Match`, wykrywa HTTP 412.
|
||||
- Edit Record: brak osobnego API GET record; Go wyszukuje rekord po identyfikatorze w liście i wypełnia formularz. Dane wpisane użytkownika przechodzą walidację form i serwera EasyDNS.
|
||||
- Delete Record: osobny ekran z dokładną nazwą i typem, potwierdzenie `DELETE`, `If-Match`. Przy konflikcie nie ma wymuszonego zapisu; użytkownik wraca do listy.
|
||||
- Replace Zone: użytkownik wprowadza cały nowy zone file; oryginał **nie** jest pobierany, potwierdzenie `REPLACE` i `If-Match`. Gdy treść nie przejdzie walidacji Rust, wyświetlany jest komunikat 422.
|
||||
- Delete Zone: wpisanie dokładnej nazwy. API może odmówić 409 dla stref spoza overlay; panel nie udaje, że można je skasować.
|
||||
- NOTIFY / Sync: widoczne w kontekście strefy, zgodnie z rolą i `notify[]`. Stan wyniku i ewentualne błędy pochodzą z API.
|
||||
- DNS lookup: formularz GET; `rcode`, `aa`, `answers[]`, `authority[]`, `elapsed_ms` z jednorazowej odpowiedzi. Brak „history log”.
|
||||
- Upstream Add: wymagane `address`, backend autoryzuje `POST /upstreams`. Brak opcji edit/delete.
|
||||
- Policies Save: tylko `allowlist` i `block_action`; komunikaty walidacji i odrzucenia z API. Views/ACL/Rate Limiting nie mają formularzy edycji.
|
||||
- Block rule: pojedynczy `rule`, walidacja pustej linii, błędy 400/422.
|
||||
- Cache: flush domeny po wpisaniu `domain`, albo flush całej pamięci po wpisaniu `FLUSH ALL`.
|
||||
- Configuration: `POST /config/reload` po wpisaniu `RELOAD`. Brak edytora pełnego pliku.
|
||||
The original navigation remains, with two additions:
|
||||
|
||||
## Metryki i odświeżanie
|
||||
```text
|
||||
FLEET
|
||||
Servers /servers
|
||||
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)
|
||||
```
|
||||
|
||||
Go wykonuje 1 żądanie GET `/stats` co 15 sekund niezależnie od liczby podłączonych operatorów. Przechowuje maksymalnie 1440 próbek (do 6 godzin) w RAM. Frontend odczytuje `GET /ui/telemetry` panelu, wymagające sesji. Wykresy zaczynają się dopiero po drugiej poprawnej próbce; spadki liczników po restarcie EasyDNS nie powodują fałszywych ujemnych wartości.
|
||||
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.
|
||||
|
||||
Serwer nie udostępnia per-zone QPS, transfer progress ani pełnych historycznych wykresów. W design references dane te są koncepcyjne. Produkcyjny UI nie podaje ich jako rzeczywistych.
|
||||
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.
|
||||
|
||||
## Błędy / bezpieczeństwo / responsywność
|
||||
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.
|
||||
|
||||
Formularze pokazują zwrócone przez EasyDNS `error.message`, bez wypisywania bearer tokenu. Konflikt 412 ma dedykowaną stronę. Potwierdzenia destrukcyjnych operacji wymagają jawnego wpisania właściwej frazy. Domyślnie dostępny jest tylko loopback; publikacja wymaga TLS reverse proxy lub tunelu SSH. Breakpointy UI: `1570`, `1130`, `820`, `540` px. CSS bez gradientów i animacji; przewidziano `prefers-reduced-motion`.
|
||||
## Enable/disable flow
|
||||
|
||||
## Różnica design-reference a działające widoki
|
||||
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.
|
||||
|
||||
Pięć referencyjnych makiet PNG (Overview, Zones, Zone Details, Records, Metrics) to akceptacja kierunku **estetycznego**, nie specyfikacja istniejących endpointów. Implementacja zachowuje wygląd OLED, paletę, strukturę nawigacji, gęste tabele, sposób rysowania wykresów i typologię przycisków; usuwa dane, których EasyDNS nie ma. `design/screenshots/*-demo.png` przedstawiają dokładnie wyrenderowane HTML z fixture, oznaczone jako DEMO.
|
||||
Reference in new issue
Block a user