Reorganise codebase: EffectiveConfig, parsers, tests; move tooltips to Metadata

Infrastructure:
- Parsers under Serialization/Parsers: Dnsmasq, DnsmasqConfig, EffectiveConfig
- EffectiveConfig: Abstractions, Metadata (keys, views, field builder, tooltips,
  placeholders, write semantics), Rendering, Editing, Validation/Handlers, Readonly
- Helpers/Config: only DnsmasqFileEncoding; DnsmasqOptionTooltips moved to Metadata
- Remove empty Infrastructure/Parsers and Helpers/Dnsmasq

Tests:
- Mirror main project: Serialization/Parsers (Dnsmasq, DnsmasqConfig),
  Services/Dnsmasq/Config, Services/EffectiveConfig, Models, Helpers (TestDataHelper)
- Namespaces updated; usings for TestDataHelper and Metadata where needed

Docs: README codebase overview and test layout updated.
This commit is contained in:
2026-03-11 10:50:23 +10:00
parent 9809ce9f7b
commit e33402467f
150 changed files with 392 additions and 255 deletions
+2 -2
View File
@@ -506,10 +506,10 @@ Run from the repo root. Writes one `.html` file per option that appears in the m
**Codebase overview:**
- **Entry and config:** `Program.cs` wires the host; configuration (e.g. `Dnsmasq__*`) lives in `Models/Config/` (`DnsmasqOptions`, `ApplicationOptions`, `DnsmasqOptionsValidator`). Options are validated at startup.
- **Infrastructure:** Under `Infrastructure/`: **Client/** (HTTP API clients and `Abstractions/`), **Services/** and **Services/Abstractions/** (caches, config/hosts/leases services, reload, hosted services), **Parsers/** (dnsmasq config and hosts line parsers), **Helpers/Config/** and **Helpers/Http/** (option keys, encoding, tooltips, JSON options). A **managed** config file and optional managed hosts file are written by the app; the main config must include the managed file (e.g. via a final `conf-file=` line). Caches (`ConfigSetCache`, `HostsCache`) keep in-memory snapshots and refresh on file changes or staleness.
- **Infrastructure:** Under `Infrastructure/`: **Client/** (HTTP API clients and `Abstractions/`), **Serialization/Parsers/** (Dnsmasq version/compile, DnsmasqConfig conf-line and include parsers, EffectiveConfig syntax helpers), **Services/** (caches, config/hosts/leases services, reload, hosted services; EffectiveConfig has Metadata, Rendering, Editing, Validation, Readonly), **Helpers/Config/** (file encoding for config/hosts), **Helpers/Http/** (HTTP helpers). A **managed** config file and optional managed hosts file are written by the app; the main config must include the managed file (e.g. via a final `conf-file=` line). Caches (`ConfigSetCache`, `HostsCache`) keep in-memory snapshots and refresh on file changes or staleness.
- **Models:** `Models/Config/` (options, validators, `DnsmasqConfLine`); `Models/Contracts/` (snapshots and DTOs such as `ConfigSetSnapshot`, `HostsSnapshot`, `ManagedConfigContent`, `ProcessRunResult`, `ReloadResult`); `Models/Dnsmasq/` (status, `SaveWithReloadResult`, and `EffectiveConfig/` for effective config and sources); `Models/Client/`, `Models/Dhcp/`, `Models/Hosts/` (UI and API DTOs).
- **API and UI:** `Controllers/` expose API endpoints; `Components/` contains Blazor Server components for config editor, hosts, DHCP, Dnsmasq status, and app settings. Static assets in `wwwroot/`.
- **Tests:** `DnsmasqWebUI.Tests` contains unit tests for parsers, config set service, config, and related logic. Run with `dotnet test`.
- **Tests:** `DnsmasqWebUI.Tests` contains unit tests organised to mirror the main project: `Serialization/Parsers/` (Dnsmasq, DnsmasqConfig), `Services/Dnsmasq/Config/`, `Services/EffectiveConfig/`, `Models/`, and `Helpers/` (TestDataHelper). Run with `dotnet test`.
<!-- SUGGESTED SCREENSHOT: SOLUTION EXPLORER OR FOLDER TREE OF SRC/ -->
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Helpers;
/// <summary>
/// Resolves paths to testdata files. Files are copied to output (testdata/) when the project builds.
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Models;
/// <summary>
/// Tests for <see cref="ConfigValueSource"/> and <see cref="ConfigValueSource.GetReadOnlyTooltip"/>.
@@ -1,7 +1,7 @@
using DnsmasqWebUI.Infrastructure.Helpers.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.Dnsmasq;
/// <summary>
/// Tests for parsing "Compile time options: ..." from dnsmasq --version output.
@@ -1,7 +1,9 @@
using DnsmasqWebUI.Models.Dhcp;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
using DnsmasqWebUI.Tests.Helpers;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Tests for DnsmasqConfDhcpHostLineParser. Format: dhcp-host=[hwaddr][,id:...][,set:tag][,tag:tag][,ip][,hostname][,lease][,ignore]
@@ -1,7 +1,7 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Tests for DnsmasqConfDirectiveParser. Key/value parsing (TryParseKeyValue) and comment stripping (StripComment)
@@ -1,8 +1,10 @@
using DnsmasqWebUI.Models.Config;
using DnsmasqWebUI.Models.Dhcp;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
using DnsmasqWebUI.Tests.Helpers;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Tests for DnsmasqConfFileLineParser. Parses dnsmasq config file lines into Blank, Comment, AddnHosts, DhcpHost, Other.
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Parser semantics: flags (option present/absent/with value), last-wins, case-sensitive, path order.</summary>
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>DHCP advanced, TFTP/PXE, DNSSEC, enable-dbus/ubus, fast-dns-retry.</summary>
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Boolean flags: no-hosts, bogus-priv, strict-order, domain-needed, no-poll, bind-*, rebind-*, clear-on-reload, filter*, localise-queries, log-debug, dhcp-authoritative, leasefile-ro.</summary>
@@ -1,8 +1,10 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
using DnsmasqWebUI.Tests.Helpers;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Hosts (addn-hosts, hostsdir) and DHCP lease file parsing.</summary>
@@ -1,9 +1,9 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Config discovery: conf-file=, conf-dir=, GetIncludedPaths, GetFirstConfDir, GetIncludedPathsWithSource, conf-dir suffix.</summary>
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Interfaces, auth-server, DHCP/option/resolv multi-value, rebind/bogus/ignore/alias, filter-rr, cache-rr.</summary>
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Positive parser tests for added options: key wired and "option present" behaviour.
@@ -1,7 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Tests.Helpers;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Tests that the parser correctly handles the official dnsmasq example (testdata/dnsmasq.official.conf.example).
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>DNS records and local names: hostsdir, domain, cname, mx-host, srv, ptr/txt/naptr/host-record, dynamic-host, interface-name.</summary>
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Server/local, rev-server, dhcp-range, all-servers, log-queries.</summary>
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>Single-value options (last wins): local-ttl, pid-file, user, group, auth-ttl, edns-packet-max, query-port, port-limit, min/max-port, log-async, local-service, dhcp-lease-max, neg/max/min-cache-ttl, dhcp-ttl.</summary>
@@ -1,7 +1,7 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
public class DnsmasqDhcpRangeValueParserTests
{
@@ -1,7 +1,9 @@
using DnsmasqWebUI.Models.Dhcp;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
using DnsmasqWebUI.Tests.Helpers;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Tests for DnsmasqLeasesFileLineParser. Format per dnsmasq author (dnsmasq-discuss 2006): five space-separated
@@ -1,7 +1,9 @@
using DnsmasqWebUI.Models.Hosts;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
namespace DnsmasqWebUI.Tests;
using DnsmasqWebUI.Tests.Helpers;
namespace DnsmasqWebUI.Tests.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Tests for HostsFileLineParser. Format: IP_address canonical_hostname [aliases...] (hosts(5), RFC 952).
@@ -1,11 +1,11 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config;
using DnsmasqWebUI.Models.Config;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.Dnsmasq.Config;
/// <summary>
/// Tests effective-config resolution in ConfigSetCache (BuildEffectiveConfig / BuildEffectiveConfigSources).
@@ -1,11 +1,11 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config;
using DnsmasqWebUI.Models.Config;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.Dnsmasq.Config;
/// <summary>
/// Save-path tests for DnsmasqConfigService.ApplyEffectiveConfigChangesAsync.
@@ -5,7 +5,7 @@ using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.Dnsmasq.Config;
/// <summary>
/// Tests for DnsmasqConfigSetService, including GetEffectiveConfigWithSources.
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Documents and guards the Do0x20 display label rule: Default and Disabled both show "Disabled" (product choice).
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Ensures effective-config editable options list includes supported cache flags.
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Tests for option -> feature mapping and capability checks.
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Tests that field descriptors get IsCapabilityDisabled set when the status indicates the option is not supported by the dnsmasq build.
@@ -1,9 +1,11 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Wiring tests that ensure special-option semantics actually feed parser and registry behavior.
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Tests for EffectiveDnsmasqConfig, including GetLogsPath (log-facility as file path).
@@ -1,8 +1,10 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Tests;
namespace DnsmasqWebUI.Tests.Services.EffectiveConfig;
/// <summary>
/// Tests for the central semantic validator (handler dispatch and generic kind validation).
@@ -45,7 +47,7 @@ public class OptionSemanticValidatorTests
new PxeServiceSemanticHandler(),
new DhcpCircuitidSemanticHandler(),
new DhcpRemoteidSemanticHandler(),
new DhcpSubscridSemanticHandler(),
new DhcpSubscrIdSemanticHandler(),
new FilterRrSemanticHandler(),
new CacheRrSemanticHandler(),
new InterfaceNameSemanticHandler(),
@@ -55,7 +57,7 @@ public class OptionSemanticValidatorTests
new PtrRecordSemanticHandler(),
new InterfaceNameRecordSemanticHandler(),
new CaaRecordSemanticHandler(),
new SrvHostSemanticHandler(),
new SrvSemanticHandler(),
new NaptrRecordSemanticHandler(),
new DnsRrSemanticHandler(),
new DynamicHostSemanticHandler(),
@@ -1,7 +1,6 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@inject IEffectiveConfigRenderFragmentRegistry RenderFragmentRegistry
<div class="ec-sections small">
@@ -1,7 +1,6 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation
@inject IEffectiveConfigEditSession Session
@@ -1,5 +1,4 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig.CustomDisplays
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Models.Dnsmasq
@inherits EffectiveConfigValueDisplayBase
@@ -2,7 +2,6 @@
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using DnsmasqWebUI.Models.Config
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.UI.Notifications.Abstractions
@inject IEffectiveConfigRenderFragmentRegistry RenderFragmentRegistry
@@ -1,5 +1,4 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using Microsoft.AspNetCore.Components.Web
@@ -1,5 +1,4 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@@ -2,7 +2,6 @@
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions
@using DnsmasqWebUI.Infrastructure.Helpers.Config
<div class="modal fade show" style="display: block;" tabindex="-1" role="dialog" aria-labelledby="ec-save-modal-title" aria-modal="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
@@ -1,6 +1,5 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@if (Source is { IsReadOnly: true })
{
@@ -1,6 +1,5 @@
@namespace DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Extensions
@using Microsoft.AspNetCore.Components
@using Microsoft.JSInterop
+5 -1
View File
@@ -18,6 +18,11 @@
@using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Leases.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Reload.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata
@using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Readonly
@using DnsmasqWebUI.Infrastructure.Services.Logs.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.UI.Settings.Abstractions
@using DnsmasqWebUI.Infrastructure.Services.Updates.Abstractions
@@ -31,7 +36,6 @@
@using DnsmasqWebUI.Components.EffectiveConfig
@using DnsmasqWebUI.Components.Hosts
@using DnsmasqWebUI.Infrastructure
@using DnsmasqWebUI.Infrastructure.Helpers.Config
@using DnsmasqWebUI.Models
@using DnsmasqWebUI.Models.Dnsmasq
@using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig
@@ -1,7 +1,7 @@
using System.Text.RegularExpressions;
using DnsmasqWebUI.Models.Dnsmasq;
namespace DnsmasqWebUI.Infrastructure.Helpers.Dnsmasq;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.Dnsmasq;
/// <summary>
/// Parses "Compile time options: ..." line from dnsmasq --version output
@@ -1,6 +1,6 @@
using System.Text.RegularExpressions;
namespace DnsmasqWebUI.Infrastructure.Helpers.Dnsmasq;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.Dnsmasq;
/// <summary>Parses dnsmasq version from command output (e.g. "dnsmasq --version" stdout/stderr).</summary>
public static class DnsmasqVersionParser
@@ -2,7 +2,7 @@ using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Shared Superpower text-parser helpers used by .conf and related parsers.
@@ -3,7 +3,7 @@ using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Parses a single <c>dhcp-host=</c> line from a dnsmasq .conf file. Same format as long option without <c>--</c>.
@@ -2,7 +2,7 @@ using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Key/value parsing for dnsmasq .conf lines. Used by <see cref="DnsmasqConfIncludeParser"/> to build effective config.
@@ -4,7 +4,7 @@ using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Parses a dnsmasq .conf file line-by-line into <see cref="DnsmasqConfLine"/> variants (BlankLine, CommentLine, DhcpHostLine, OtherLine).
@@ -1,11 +1,12 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Parses the main dnsmasq .conf file only for <c>conf-file=</c> and <c>conf-dir=</c> directives
@@ -3,7 +3,7 @@ using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Parses a single line of the dnsmasq DHCPv4 lease file (e.g. /var/lib/misc/dnsmasq.leases).
@@ -3,7 +3,7 @@ using Superpower;
using Superpower.Model;
using Superpower.Parsers;
namespace DnsmasqWebUI.Infrastructure.Parsers;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
/// <summary>
/// Parses a single line of an /etc/hosts-style file. Format: IP_address canonical_hostname [aliases...]
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared token parsing helpers for DHCP option-style values such as <c>dhcp-option</c>,
@@ -1,6 +1,6 @@
using System.Net;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared structural parser for <c>dhcp-range</c> option values.
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared helpers for DHCP option families that use <c>set:</c>, <c>tag:</c>,
@@ -1,6 +1,6 @@
using System.Net;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared helpers for option values that are an IP literal with an optional prefix length.
@@ -1,6 +1,6 @@
using System.Net;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared parsing helpers for relay/proxy style values that work primarily with
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared helpers for DNS RR-type values used by <c>filter-rr</c> and <c>cache-rr</c>.
@@ -1,6 +1,6 @@
using System.Text.RegularExpressions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
/// <summary>
/// Shared parsing/validation helpers for dnsmasq option values that use the
@@ -1,10 +1,11 @@
using DnsmasqWebUI.Models.Config;
using DnsmasqWebUI.Models.Contracts;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dhcp;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using Microsoft.Extensions.Options;
@@ -1,6 +1,7 @@
using System.Text;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using DnsmasqWebUI.Models.Config;
using DnsmasqWebUI.Models.Contracts;
@@ -1,7 +1,8 @@
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Models.Contracts;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config;
@@ -1,6 +1,7 @@
using System.Text;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Registration.Abstractions;
using DnsmasqWebUI.Models.Config;
@@ -2,7 +2,7 @@ using System.Text;
using DnsmasqWebUI.Models.Config;
using DnsmasqWebUI.Models.Contracts;
using DnsmasqWebUI.Models.Hosts;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Hosts.Abstractions;
using Microsoft.Extensions.Options;
@@ -1,5 +1,6 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Hosts.Abstractions;
using DnsmasqWebUI.Models.Hosts;
@@ -1,6 +1,6 @@
using System.Text;
using DnsmasqWebUI.Models.Dhcp;
using DnsmasqWebUI.Infrastructure.Parsers;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.DnsmasqConfig;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Leases.Abstractions;
@@ -1,4 +1,4 @@
using DnsmasqWebUI.Infrastructure.Helpers.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.Dnsmasq;
using DnsmasqWebUI.Infrastructure.Services.Common.Process.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Version.Abstractions;
using DnsmasqWebUI.Models.Config;
@@ -1,7 +1,7 @@
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.Registration.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
/// <summary>
/// Validates pending effective-config changes against option semantics before write.
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing.Abstractions;
/// <summary>
/// Option-specific behavior for the multi-value list editor: duplicate policy and normalization.
@@ -1,4 +1,6 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing;
/// <summary>
/// Default behavior for multi-value list editor: allow duplicates and trim normalization.
@@ -1,4 +1,6 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing;
/// <summary>
/// Generic edit behavior for multi-value options that should reject duplicate items
@@ -1,5 +1,5 @@
using System.Linq;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Config.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Reload.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.Dnsmasq.Validation.Abstractions;
@@ -1,6 +1,8 @@
using System.Collections.Generic;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig;
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Literal dnsmasq .conf option names (config keys). Use these everywhere we reference option names
@@ -1,6 +1,6 @@
using System.Collections.Frozen;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Placeholder values shown in effective-config editors before the user enters a value.
@@ -1,6 +1,6 @@
using System.Collections.Frozen;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Short explainer tooltips for dnsmasq option names. Shown on hover over the field label.
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Models.Dnsmasq;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>Dnsmasq compile-time feature required for certain options.</summary>
public enum DnsmasqFeature
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering.Abstractions;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Builds field descriptors for viewing and editing. Mapping is done once here via delegates passed to each descriptor.
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering.Abstractions;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Extension methods for building lists of effective-config field descriptors. Keeps the field builder readable.
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Whether an effective-config option has a single value (or flag) or multiple values.
@@ -1,6 +1,6 @@
using System.Collections.Frozen;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Single source of truth: which effective-config sections exist, their display order and titles,
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Single source of truth for options with special parse/write/validation semantics.
@@ -1,8 +1,8 @@
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering.Abstractions;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Defines which sections and (optionally) which fields are visible per EffectiveConfigContext.
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// How to serialize an option when writing the managed config file.
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
/// <summary>
/// Shared validation kinds for effective-config options.
@@ -1,6 +1,7 @@
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Helpers.Config;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Readonly;
/// <summary>
/// Generates copyable commands or hints for readonly effective-config values:
@@ -4,7 +4,7 @@ using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Infrastructure.Services.Registration.Abstractions;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering.Abstractions;
/// <summary>
/// Lookup for custom display fragments per effective-config field (section + option).
@@ -1,13 +1,16 @@
using Microsoft.AspNetCore.Components;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Editing.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig.Abstractions;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Abstractions;
using DnsmasqWebUI.Components.EffectiveConfig.CustomDisplays;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Rendering;
/// <summary>
/// Maps (sectionId, optionName) to custom effective-config value display component types and descriptor factories.
@@ -1,4 +1,4 @@
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
/// <summary>
/// Option-specific validation for a single item in a multi-value list.
@@ -1,6 +1,6 @@
using DnsmasqWebUI.Infrastructure.Services.Registration.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
/// <summary>
/// Option-specific semantic handler for cases that generic validation kinds cannot express clearly.
@@ -1,7 +1,7 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.Registration.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
/// <summary>
/// Central validator for effective-config option values driven by <see cref="OptionValidationSemantics"/>.
@@ -1,3 +1,5 @@
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
/// <summary>
@@ -1,4 +1,4 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Models.Dnsmasq;
using DnsmasqWebUI.Models.Dnsmasq.EffectiveConfig;
@@ -1,7 +1,9 @@
using System.Net;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Specialized semantic behavior for <c>address</c> values.
@@ -1,7 +1,8 @@
using System.Net;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Specialized semantic behavior for <c>alias</c> values.
@@ -1,7 +1,8 @@
using System.Net;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>auth-peer</c> values: &lt;ip-address&gt;[,&lt;ip-address&gt;...].
@@ -1,6 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>auth-sec-servers</c> values: &lt;domain&gt;[,&lt;domain&gt;...].
@@ -1,7 +1,9 @@
using System.Net;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>auth-server</c> values: &lt;domain&gt;,[&lt;interface&gt;|&lt;ip-address&gt;...].
@@ -1,7 +1,9 @@
using System.Globalization;
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>auth-soa</c> values: &lt;serial&gt;[,&lt;hostmaster&gt;[,&lt;refresh&gt;[,&lt;retry&gt;[,&lt;expiry&gt;]]]].
@@ -1,6 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>auth-zone</c> values: &lt;domain&gt;[,&lt;subnet&gt;[/prefix]...][,exclude:&lt;subnet&gt;...].
@@ -1,6 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>bogus-nxdomain</c> values.
@@ -1,6 +1,8 @@
using DnsmasqWebUI.Infrastructure.Helpers.Config;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Metadata;
using DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Abstractions;
using DnsmasqWebUI.Infrastructure.Serialization.Parsers.EffectiveConfig;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation;
namespace DnsmasqWebUI.Infrastructure.Services.EffectiveConfig.Validation.Handlers;
/// <summary>
/// Semantic validation for <c>bridge-interface</c> values.

Some files were not shown because too many files have changed in this diff Show More