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
This commit is contained in:
2026-02-03 01:35:26 +10:00
parent a0863a663e
commit a8ddcdec4e
70 changed files with 542 additions and 303 deletions
+6 -1
View File
@@ -168,6 +168,10 @@ if [ ! -d "$SOURCE_DIR" ]; then
exit 1
fi
# Take the harness down so all containers (including one-shot DHCP clients) are recreated on up.
echo "Stopping test harness: docker compose -f $COMPOSE_FILE down"
docker compose -f "$COMPOSE_FILE" down
mkdir -p "$MOUNT_DIR"
if [ "$NO_CLEAR" = false ]; then
@@ -176,9 +180,10 @@ if [ "$NO_CLEAR" = false ]; then
fi
if command -v rsync >/dev/null 2>&1; then
rsync -a "$SOURCE_DIR/" "$MOUNT_DIR/"
rsync -a --exclude='leases' "$SOURCE_DIR/" "$MOUNT_DIR/"
else
cp -r "$SOURCE_DIR/." "$MOUNT_DIR/"
rm -f "$MOUNT_DIR/leases"
fi
# Remove any leftover managed config from previous runs so dnsmasq starts clean (app will create zz-dnsmasq-webui.conf on startup).