alex
a8ddcdec4e
Dnsmasq/Hosts UI tweaks, test harness: down before redeploy, exclude leases from mount
...
- Dnsmasq page: Config (Main config, Managed file, Config set) under Service configuration; remove Paths/Leases (in Effective config DHCP); EffectiveConfigSection collapsible groups; StatusSection flex-wrap
- Hosts: HostsFileSection always shows table; 'No host entries' in tbody when empty
- Models: reorganize into sub-namespaces (Config, EffectiveConfig, Hosts, Dhcp, Status); move EffectiveConfig/Status/Logs components under Dnsmasq
- Test harness: prepare-test-mount.sh runs 'docker compose down' before mount+up so all containers (including DHCP clients) restart; exclude testdata/leases from sync (unit tests only); testdata/README
2026-02-03 01:35:26 +10:00
alex
a0863a663e
Hosts: managed file, read-only system/addn-hosts, HostsFileSection UI
...
- Managed hosts file (zz-dnsmasq-webui.hosts): app reads/writes only this;
addn-hosts in managed config loads it. SystemHostsPath is read-only display.
- Hosts page: editable managed file; then 'Other hosts (read-only)' (system
hosts when configured and !no-hosts, plus addn-hosts excluding managed).
- GET api/hosts/readonly for read-only files; no-hosts hides system hosts.
- HostsFileSection.razor component; fix space before read-only badge.
- Test harness: show container /etc/hosts (default SystemHostsPath).
- Config parsing/sources, tests and client updates for new hosts model.
2026-02-02 23:56:20 +10:00
alex
d0391ef058
Effective config, hosts/addn-hosts logic, test harness status & logs
...
- EffectiveDnsmasqConfig: overridable single-value options (no-hosts, addn-hosts,
flags, dhcp-leasefile, cache-size, port, etc.) from dnsmasq source/docs.
- Hosts UI: allow editing when no-hosts but SystemHostsPath is in addn-hosts;
HostsController and Hosts.razor check pathInAddnHosts.
- Config comments: managed file ensures one addn-hosts line in our file only;
DnsmasqOptions/validator docs for SystemHostsPath and addn-hosts.
- Test harness: dnsmasq logs to /data/dnsmasq.log (log-facility + log-queries in
dnsmasq-test.conf); entrypoint touches log file for write access.
- dnsmasq-status.sh: simulates systemctl status output in container (ps/pgrep);
Dockerfile copies and chmod +x; StatusShowCommand/LogsCommand use script and
tail /data/dnsmasq.log.
- Project: Models/Config namespace, typed HTTP clients, combined DHCP+Leases
page, ProcessRunner, shared models (PascalCase).
2026-02-01 01:17:32 +10:00
alex
40fbf14327
Refactor parsers to Superpower; config set; EnsureManagedConfig; options doc
...
- Parsers: Superpower for all (Directive, FileLine, Include, DhcpHost, Leases, Hosts)
- Shared ConfParserHelpers (Token, OptionalCommentPrefix)
- DnsmasqConfOptionRegistry + DnsmasqOptionKind: typed options (ConfFile, ConfDir,
Domain, DhcpRange, Server, Local, Address, DhcpOption, DhcpHost, Path, Flag, etc.)
- EnsureManagedConfigHostedService: append conf-dir= to main config if missing,
then create managed file; DnsmasqOptions + Dockerfile comments for permissions
- Renames: ConfigLine->DnsmasqConfLine, ConfigSet->DnsmasqConfigSet, etc.
- Test harness: entrypoint in scripts/, prepare-test-mount improvements
- Status/Reload API and UI: stdout+stderr, exit code
2026-01-31 19:28:10 +10:00