mirror of
https://github.com/alexhopeoconnor/dnsmasq-webui.git
synced 2026-10-21 19:32:35 +10:00
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.
This commit is contained in:
@@ -62,6 +62,8 @@ public class StatusController : ControllerBase
|
||||
var status = new DnsmasqServiceStatus(
|
||||
SystemHostsPath: string.IsNullOrEmpty(systemHostsPath) ? null : systemHostsPath,
|
||||
SystemHostsPathExists: !string.IsNullOrEmpty(systemHostsPath) && System.IO.File.Exists(systemHostsPath),
|
||||
ManagedHostsFilePath: set.ManagedHostsFilePath,
|
||||
ManagedHostsPathExists: !string.IsNullOrEmpty(set.ManagedHostsFilePath) && System.IO.File.Exists(set.ManagedHostsFilePath),
|
||||
NoHosts: effectiveConfig.NoHosts,
|
||||
AddnHostsPaths: effectiveConfig.AddnHostsPaths,
|
||||
EffectiveConfig: effectiveConfig,
|
||||
|
||||
Reference in New Issue
Block a user