From 2f12aa7ca6160a68cc9d0acffffd034da1be3d11 Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 11:08:16 +0100 Subject: [PATCH 01/10] bumped packages --- AGENTS.md | 373 ++++++++++++++---- RackPeek.Domain/RackPeek.Domain.csproj | 8 +- .../RackPeek.Web.Viewer.csproj | 8 +- RackPeek/RackPeek.csproj | 22 +- .../AccessPoints/AccessPointAddCommand.cs | 2 +- .../AccessPoints/AccessPointDeleteCommand.cs | 2 +- .../AccessPointDescribeCommand.cs | 2 +- .../AccessPointGetByNameCommand.cs | 2 +- .../AccessPoints/AccessPointGetCommand.cs | 2 +- .../AccessPoints/AccessPointReportCommand.cs | 2 +- .../AccessPoints/AccessPointSetCommand.cs | 2 +- .../Labels/AccessPointLabelAddCommand.cs | 2 +- .../Labels/AccessPointLabelRemoveCommand.cs | 2 +- .../Rename/AccessPointRenameCommand.cs | 2 +- .../Connections/ConnectionAddCommand.cs | 2 +- .../Connections/ConnectionRemoveCommand.cs | 2 +- .../Desktops/Cpus/DesktopCpuAddCommand.cs | 2 +- .../Desktops/Cpus/DesktopCpuRemoveCommand.cs | 2 +- .../Desktops/Cpus/DesktopCpuSetCommand.cs | 2 +- .../Commands/Desktops/DesktopAddCommand.cs | 2 +- .../Commands/Desktops/DesktopDeleteCommand.cs | 2 +- .../Desktops/DesktopDescribeCommand.cs | 2 +- .../Desktops/DesktopGetByNameCommand.cs | 2 +- .../Commands/Desktops/DesktopGetCommand.cs | 2 +- .../Commands/Desktops/DesktopReportCommand.cs | 2 +- .../Commands/Desktops/DesktopSetCommand.cs | 2 +- .../Commands/Desktops/DesktopTreeCommand.cs | 2 +- .../Desktops/Drive/DesktopDriveAddCommand.cs | 2 +- .../Drive/DesktopDriveRemoveCommand.cs | 2 +- .../Desktops/Drive/DesktopDriveSetCommand.cs | 2 +- .../Desktops/Gpus/DesktopGpuAddCommand.cs | 2 +- .../Desktops/Gpus/DesktopGpuRemoveCommand.cs | 2 +- .../Desktops/Gpus/DesktopGpuSetCommand.cs | 2 +- .../Desktops/Labels/DesktopLabelAddCommand.cs | 2 +- .../Labels/DesktopLabelRemoveCommand.cs | 2 +- .../Desktops/Nics/DesktopNicAddCommand.cs | 2 +- .../Desktops/Nics/DesktopNicRemoveCommand.cs | 2 +- .../Desktops/Nics/DesktopNicSetCommand.cs | 2 +- .../Desktops/Rename/DesktopRenameCommand.cs | 2 +- .../GenerateAnsibleInventoryCommand.cs | 2 +- .../Exporters/GenerateHostsFileCommand.cs | 2 +- .../Exporters/GenerateSshConfigCommand.cs | 2 +- .../Commands/Firewalls/FirewallAddCommand.cs | 2 +- .../Firewalls/FirewallDeleteCommand.cs | 2 +- .../Firewalls/FirewallDescribeCommand.cs | 2 +- .../Firewalls/FirewallGetByNameCommand.cs | 2 +- .../Commands/Firewalls/FirewallGetCommand.cs | 2 +- .../Firewalls/FirewallReportCommand.cs | 2 +- .../Commands/Firewalls/FirewallSetCommand.cs | 2 +- .../Labels/FirewallLabelAddCommand.cs | 2 +- .../Labels/FirewallLabelRemoveCommand.cs | 2 +- .../Firewalls/Ports/FirewallPortAddCommand.cs | 2 +- .../Ports/FirewallPortRemoveCommand.cs | 2 +- .../Ports/FirewallPortUpdateCommand.cs | 2 +- .../Firewalls/Rename/FirewallRenameCommand.cs | 2 +- Shared.Rcl/Commands/GetTotalSummaryCommand.cs | 2 +- .../Laptops/Cpus/LaptopCpuAddCommand.cs | 2 +- .../Laptops/Cpus/LaptopCpuRemoveCommand.cs | 2 +- .../Laptops/Cpus/LaptopCpuSetCommand.cs | 2 +- .../Laptops/Drive/LaptopDriveAddCommand.cs | 2 +- .../Laptops/Drive/LaptopDriveRemoveCommand.cs | 2 +- .../Laptops/Drive/LaptopDriveSetCommand.cs | 2 +- .../Laptops/Gpus/LaptopGpuAddCommand.cs | 2 +- .../Laptops/Gpus/LaptopGpuRemoveCommand.cs | 2 +- .../Laptops/Gpus/LaptopGpuSetCommand.cs | 2 +- .../Laptops/Labels/LaptopLabelAddCommand.cs | 2 +- .../Labels/LaptopLabelRemoveCommand.cs | 2 +- .../Commands/Laptops/LaptopAddCommand.cs | 2 +- .../Commands/Laptops/LaptopDeleteCommand.cs | 2 +- .../Commands/Laptops/LaptopDescribeCommand.cs | 2 +- .../Laptops/LaptopGetByNameCommand.cs | 2 +- .../Commands/Laptops/LaptopGetCommand.cs | 2 +- .../Commands/Laptops/LaptopReportCommand.cs | 2 +- .../Commands/Laptops/LaptopSetCommand.cs | 2 +- .../Commands/Laptops/LaptopTreeCommand.cs | 2 +- .../Laptops/Rename/LaptopRenameCommand.cs | 2 +- .../Routers/Labels/RouterLabelAddCommand.cs | 2 +- .../Labels/RouterLabelRemoveCommand.cs | 2 +- .../Routers/Ports/RouterPortAddCommand.cs | 2 +- .../Routers/Ports/RouterPortRemoveCommand.cs | 2 +- .../Routers/Ports/RouterPortUpdateCommand.cs | 2 +- .../Routers/Rename/RouterRenameCommand.cs | 2 +- .../Commands/Routers/RouterAddCommand.cs | 2 +- .../Commands/Routers/RouterDeleteCommand.cs | 2 +- .../Commands/Routers/RouterDescribeCommand.cs | 2 +- .../Routers/RouterGetByNameCommand.cs | 2 +- .../Commands/Routers/RouterGetCommand.cs | 2 +- .../Commands/Routers/RouterReportCommand.cs | 2 +- .../Commands/Routers/RouterSetCommand.cs | 2 +- .../Servers/Cpus/ServerCpuAddCommand.cs | 2 +- .../Servers/Cpus/ServerCpuRemoveCommand.cs | 2 +- .../Servers/Cpus/ServerCpuSetCommand.cs | 2 +- .../Servers/Drives/ServerDriveAddCommand.cs | 2 +- .../Drives/ServerDriveRemoveCommand.cs | 2 +- .../Drives/ServerDriveUpdateCommand.cs | 2 +- .../Servers/Gpus/AddGpuUseCaseCommand.cs | 2 +- .../Servers/Gpus/RemoveGpuUseCaseCommand.cs | 2 +- .../Servers/Gpus/UpdateGpuUseCaseCommand.cs | 2 +- .../Servers/Labels/ServerLabelAddCommand.cs | 2 +- .../Labels/ServerLabelRemoveCommand.cs | 2 +- .../Servers/Nics/ServerNicAddCommand.cs | 2 +- .../Servers/Nics/ServerNicRemoveCommand.cs | 2 +- .../Servers/Nics/ServerNicUpdateCommand.cs | 2 +- .../Servers/Rename/ServerRenameCommand.cs | 2 +- .../Commands/Servers/ServerAddCommand.cs | 2 +- .../Commands/Servers/ServerDeleteCommand.cs | 2 +- .../Commands/Servers/ServerDescribeCommand.cs | 2 +- .../Servers/ServerGetByNameCommand.cs | 2 +- .../Commands/Servers/ServerGetCommand.cs | 2 +- .../Commands/Servers/ServerReportCommand.cs | 2 +- .../Commands/Servers/ServerSetCommand.cs | 2 +- .../Commands/Servers/ServerTreeCommand.cs | 2 +- .../Services/Labels/ServiceLabelAddCommand.cs | 2 +- .../Labels/ServiceLabelRemoveCommand.cs | 2 +- .../Services/Rename/ServiceRenameCommand.cs | 2 +- .../Commands/Services/ServiceAddCommand.cs | 2 +- .../Commands/Services/ServiceDeleteCommand.cs | 2 +- .../Services/ServiceDescribeCommand.cs | 2 +- .../Services/ServiceGetByNameCommand.cs | 2 +- .../Commands/Services/ServiceGetCommand.cs | 2 +- .../Commands/Services/ServiceReportCommand.cs | 2 +- .../Commands/Services/ServiceSetCommand.cs | 2 +- .../Services/ServiceSubnetsCommand.cs | 2 +- .../Switches/Labels/SwitchLabelAddCommand.cs | 2 +- .../Labels/SwitchLabelRemoveCommand.cs | 2 +- .../Switches/Ports/SwitchPortAddCommand.cs | 2 +- .../Switches/Ports/SwitchPortRemoveCommand.cs | 2 +- .../Switches/Ports/SwitchPortUpdateCommand.cs | 2 +- .../Switches/Rename/SwitchRenameCommand.cs | 2 +- .../Commands/Switches/SwitchAddCommand.cs | 2 +- .../Commands/Switches/SwitchDeleteCommand.cs | 2 +- .../Switches/SwitchDescribeCommand.cs | 2 +- .../Switches/SwitchGetByNameCommand.cs | 2 +- .../Commands/Switches/SwitchGetCommand.cs | 2 +- .../Commands/Switches/SwitchReportCommand.cs | 2 +- .../Commands/Switches/SwitchSetCommand.cs | 2 +- .../Systems/Drives/SystemDriveAddCommand.cs | 2 +- .../Drives/SystemDriveRemoveCommand.cs | 2 +- .../Drives/SystemDriveUpdateCommand.cs | 2 +- .../Systems/Labels/SystemLabelAddCommand.cs | 2 +- .../Labels/SystemLabelRemoveCommand.cs | 2 +- .../Systems/Rename/SystemRenameCommand.cs | 2 +- .../Commands/Systems/SystemAddCommand.cs | 2 +- .../Commands/Systems/SystemDeleteCommand.cs | 2 +- .../Commands/Systems/SystemDescribeCommand.cs | 2 +- .../Systems/SystemGetByNameCommand.cs | 2 +- .../Commands/Systems/SystemGetCommand.cs | 2 +- .../Commands/Systems/SystemReportCommand.cs | 2 +- .../Commands/Systems/SystemSetCommand.cs | 2 +- .../Commands/Systems/SystemTreeCommand.cs | 2 +- .../Commands/Ups/Labels/UpsLabelAddCommand.cs | 2 +- .../Ups/Labels/UpsLabelRemoveCommand.cs | 2 +- .../Commands/Ups/Rename/UpsRenameCommand.cs | 2 +- Shared.Rcl/Commands/Ups/UpsAddCommand.cs | 2 +- Shared.Rcl/Commands/Ups/UpsDeleteCommand.cs | 2 +- Shared.Rcl/Commands/Ups/UpsDescribeCommand.cs | 2 +- .../Commands/Ups/UpsGetByNameCommand.cs | 2 +- Shared.Rcl/Commands/Ups/UpsGetCommand.cs | 2 +- Shared.Rcl/Commands/Ups/UpsReportCommand.cs | 2 +- Shared.Rcl/Commands/Ups/UpsSetCommand.cs | 2 +- Shared.Rcl/Shared.Rcl.csproj | 8 +- Tests.E2e/Tests.E2e.csproj | 12 +- Tests/Tests.csproj | 16 +- 163 files changed, 493 insertions(+), 266 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 518e0ebc..f4f71e05 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,90 +1,317 @@ -# RackPeek — Agent Quick Reference +# RackPeek — Agent Guide -## Commands +This document is the entry point for AI agents (Claude Code, OpenCode, etc.) working in this repo. It captures everything needed to understand the codebase, make a focused change, validate it, and open a PR without re-reading the whole tree. + +--- + +## 1. What RackPeek is + +RackPeek is a **CLI + Web UI for documenting and managing home-lab / small-scale IT infrastructure** (servers, switches, routers, firewalls, access points, UPS units, desktops, laptops, systems, and services). + +- All state is persisted to a **single YAML file** (`config/config.yaml`) — no database. +- Same domain code powers the CLI binary (`rpk`) and the Blazor Server Web UI. +- Distributed as a Docker image (`aptacode/rackpeek`) and a self-contained CLI binary. +- Live demo: · Docs: + +### Core values (these shape design decisions) + +- **Simplicity** — narrow scope, no enterprise CMDB features. +- **Openness** — open YAML format, user owns their data. +- **Privacy** — no telemetry, no tracking. +- **Dogfooding** — features must be useful to real home-labs. +- **Opinionated** — built for home labs, not corporate documentation. + +If a proposed change conflicts with these values, push back before implementing. + +--- + +## 2. Tech stack + +| Layer | Tech | +|---|---| +| Language | C# (.NET **10.0**, `net10.0` TFM) | +| CLI | [Spectre.Console.Cli](https://spectreconsole.net/) | +| Web UI | Blazor Server (`Microsoft.NET.Sdk.Web`) + a WASM viewer (`RackPeek.Web.Viewer`) for the live demo | +| Persistence | YAML (`YamlDotNet`, `DocMigrator.Yaml`) — single file | +| Git integration | `LibGit2Sharp` (optional, used when `GIT_TOKEN` is set) | +| CLI tests | xUnit + `Spectre.Console.Testing` + `JsonSchema.Net` | +| E2E tests | xUnit + `Microsoft.Playwright` + `Testcontainers` (spins up the real Docker image) | +| Build runner | [`just`](https://github.com/casey/just) | +| Container | `mcr.microsoft.com/dotnet/aspnet:10.0` — exposes port 8080 | +| Code style | `dotnet format` (CI gate) + `.editorconfig` | +| Analysis | `TreatWarningsAsErrors=true`, `EnforceCodeStyleInBuild=true`, latest analyzers (see `Directory.Build.props`) | + +**.NET 10 is required.** If `dotnet --version` shows < 10, see `docs/development/dev-setup.md`. A devcontainer is included (`.devcontainer/`). + +--- + +## 3. Solution layout + +``` +RackPeek.sln +├── RackPeek/ CLI entry point (Spectre.Console.Cli) → produces `rpk` +├── RackPeek.Domain/ Core domain: resources, use-cases, persistence, git +│ ├── Resources/ Resource models (Server, Switch, System, Service, …) +│ ├── UseCases/ Generic use-cases (Add, Delete, Rename, Cpus, Drives, Gpus, Ports, Labels, Tags, Ansible, SSH, Hosts) +│ ├── Persistence/ IResourceCollection, Yaml repositories, migrations +│ │ └── Yaml/ YamlResourceCollection, RackPeekConfigMigrationDeserializer, ResourceYamlMigrationService +│ ├── Git/ Optional LibGit2Sharp integration (NullGitRepository when disabled) +│ ├── Api/ InventoryRequest/Response + UpsertInventoryUseCase (used by Web API) +│ └── ServiceCollectionExtensions.cs DI: AddUseCases / AddYamlRepos / AddGitServices +├── Shared.Rcl/ Razor Class Library: Blazor components AND CLI command wiring shared between Web + CLI +│ ├── Commands/ Spectre.Console.Cli command classes (one folder per resource kind) +│ ├── Components/ Shared Razor components +│ ├── Modals/, Layout/, Services/, Console/ +│ ├── CliBootstrap.cs Registers all CLI commands + DI internals (single source of truth for the `rpk` command tree) +│ └── ConsoleRunner.cs Lets the Web UI execute CLI commands in-process +├── RackPeek.Web/ Blazor Server host (Dockerfile lives here) +├── RackPeek.Web.Viewer/ Blazor WebAssembly viewer (powers the github-pages demo) +├── Tests/ CLI integration tests (xUnit) — fast, no Docker +│ ├── EndToEnd/ Per-resource workflow tests using the real CLI +│ ├── Api/ Web API endpoint tests (Microsoft.AspNetCore.Mvc.Testing) +│ ├── TestConfigs/v1,v2,v3/ Fixture YAML files for migration tests +│ └── schemas/ JSON schemas validated against output +└── Tests.E2e/ Playwright + Testcontainers — spins up the Docker image and drives the Web UI + ├── PageObjectModels/ One POM per page/component (required pattern) + └── Infra/PlaywrightFixture.cs Container + browser lifecycle +``` + +### Where to put new code + +| You're adding… | Goes in… | +|---|---| +| A new CLI subcommand | `Shared.Rcl/Commands//…` + register it in `Shared.Rcl/CliBootstrap.cs` | +| A new resource kind | `RackPeek.Domain/Resources//` model, register in `Resource.cs` maps, add YAML migration, wire repos in `ServiceCollectionExtensions.cs`, add Razor pages under `Shared.Rcl//`, add Web routing | +| A new use-case | `RackPeek.Domain/UseCases/` — implement `IUseCase` (auto-registered by reflection in `AddUseCases`) or the generic `IResourceUseCase` | +| A new Razor component used by CLI+Web | `Shared.Rcl/Components/` | +| A new Web page only | `RackPeek.Web/Components/` | +| A YAML schema change | Bump schema version under `schemas/vN/` + add migration in `RackPeek.Domain/Persistence/Yaml/` + add migration test in `Tests/TestConfigs/vN/` | + +--- + +## 4. Build, test, run + +All workflow commands go through `justfile`. Prefer `just ` over running `dotnet` directly so behaviour stays consistent with CI. + +### Build -**Build & Test** ```bash -just build # dotnet build RackPeek.sln -just test-all # CLI + E2E tests (rebuilds Web image) -just ci # alias for test-all (matches CI checklist) -just test-cli # dotnet test Tests/Tests.csproj -just test-e2e # requires just build-web first +just build # dotnet build RackPeek.sln (Debug) +just build-release # Release +just build-cli # publish self-contained single-file binary (default linux-x64) +just build-cli linux-arm64 # cross-target +just build-web # docker build -t rackpeek:ci -f RackPeek.Web/Dockerfile . ``` -**Run Locally** +### Test + ```bash -just run-docker # builds and starts Docker container on :8080 -just rpk [args] # run CLI directly from debug build +just test-cli # fast CLI tests, no Docker required +just e2e-setup # ONCE: installs Playwright CLI + browsers +just test-e2e # implies build-web; runs Playwright suite +just test-all # = build-web + e2e-setup + test-cli + test-e2e +just ci # alias for test-all — matches the pre-PR checklist ``` -**E2E Setup** (first time only) +CI order (`.github/workflows/test.yml`): + +1. **`format`** → `dotnet format --verify-no-changes` (runs on `ubuntu-latest`) +2. **`cli-tests`** → `dotnet test Tests` (runs on `ubuntu-latest`, depends on format) +3. **`webui-tests`** → builds the docker image then runs `dotnet test Tests.E2e` (runs on `ubuntu-24.04`, depends on cli-tests) + +Always run `dotnet format` before commit — formatting breaks CI first. + +### Run + ```bash -just e2e-setup # installs Playwright CLI + browsers +just run-docker # build + run container on http://localhost:8080 +just rpk [args] # run CLI directly from Debug build +just clean # dotnet clean ``` -**Demo** +### Release + ```bash -just build-cli-demo # VHS CLI demo (needs: vhs, imagemagick, chrome) -just build-web-demo # Web UI demo (needs: Chrome, ImageMagick) +just docker-push 1.3.2 # multi-arch (linux/amd64, linux/arm64) push to aptacode/rackpeek ``` -**Release** +CLI binary version is bumped in `RackPeek/RackPeek.csproj` (``). + +### Demos (rarely needed by agents) + ```bash -just docker-push # multi-arch Docker push (e.g., just docker-push 1.3.0) +just build-cli-demo # VHS recording — needs vhs, imagemagick, chrome +just build-web-demo # GIF capture — needs Chrome, ImageMagick ``` -## Workflow - -1. **CI order**: `format → cli-tests → webui-tests` -2. **PR checklist**: - - Linked GitHub issue - - Approach validated with maintainers - - Small, focused PR - - CLI tests passing locally - - E2E tests passing locally - - YAML migration defined if persisting changes - -3. **Draft PR** until: - - All tests pass locally - - Scope complete - - Debug code removed - -## Architecture - -**Solution structure**: -- `RackPeek/` — CLI application -- `RackPeek.Domain/` — shared domain models -- `RackPeek.Web/` — Web UI (Blazor) -- `RackPeek.Web.Viewer/` — Web UI viewer -- `Shared.Rcl/` — shared Blazor components -- `Tests/` — CLI unit tests -- `Tests.E2e/` — Playwright E2E tests - -**Key files**: -- `justfile` — developer workflow commands -- `.github/workflows/test.yml` — CI pipeline -- `RackPeek.sln` — solution root -- `docs/development/` — dev guides (dev-cheat-sheet.md, testing-guidelines.md) - -## Gotchas - -- **E2E tests require Docker image**: run `just build-web` before `just test-e2e` -- **Playwright browsers** installed via `just e2e-setup` (first time) -- **CI runs on `ubuntu-latest`** (CLI tests) and `ubuntu-24.04` (WebUI) -- **Docker image tag**: `rackpeek:ci` used locally, `aptacode/rackpeek` on registry -- **Format check**: `dotnet format --verify-no-changes` (CI step 1) -- **Debugging E2E**: Set `Headless = false, SlowMo = 500` in `PlaywrightFixture.cs`, revert before commit -- **YAML changes**: Always define migration if modifying persisted schema - -## Testing - -- **CLI tests**: `dotnet test Tests/Tests.csproj` (fast, no Docker) -- **E2E tests**: `dotnet test Tests.E2e` (requires Docker image, Playwright browsers) -- **Full suite**: `just ci` or `just test-all` - -## Docs References - -- `docs/development/contribution-guidelines.md` — PR process -- `docs/development/dev-cheat-sheet.md` — build/release details -- `docs/development/testing-guidelines.md` — testing principles -- `README.md` — overview and Docker usage +--- + +## 5. Code style + +Enforced by CI via `dotnet format --verify-no-changes`. From `.editorconfig` + `Directory.Build.props`: + +- 4-space indent, LF line endings, final newline, UTF-8. +- `var` for built-in types and when the type is apparent; explicit type otherwise. +- Expression-bodied members only when on a single line. +- Private fields are `_camelCase` (underscore prefix, error severity). +- Open braces on a new line (Allman) — `csharp_new_line_before_open_brace = all:error`. +- **Warnings are errors** repo-wide. Don't introduce nullable warnings or analyzer warnings. +- Nullable reference types enabled in every project (`enable`). + +Default to writing no comments. The project favours readable names + tests-as-documentation. + +--- + +## 6. Persistence model (important) + +There is **one YAML file**: `config/config.yaml` (or the path given by `RPK_YAML_DIR` env var; the Docker image sets it to `/app/config`). + +Top-level shape: + +```yaml +resources: + - kind: Server | Switch | Firewall | Router | Accesspoint | Desktop | Laptop | Ups | System | Service + name: + tags: [...] + labels: { key: value } + notes: | + free-form markdown + runsOn: [, ...] # only meaningful for System / Service + # kind-specific fields follow (e.g. ports[], cpus[], drives[], gpus[], nics[], network, ram, …) +``` + +Key invariants (see `RackPeek.Domain/Resources/Resource.cs`): + +- `name` is the identity within a `kind`. Don't introduce numeric IDs. +- `runsOn` relationships are validated by `Resource.CanRunOn`: + - `Service` may run on a `System`. + - `System` may run on hardware (`Server`, `Switch`, `Firewall`, `Router`, `Accesspoint`, `Desktop`, `Laptop`, `Ups`) or on another `System`. +- "Hardware" is the umbrella term for the eight physical kinds above (`Resource.IsHardware`). +- Anything that mutates the YAML must go through an `IResourceUseCase` → `IResourceCollection` → repository, never direct file writes. + +### YAML migrations + +Schemas are versioned under `schemas/v1`, `schemas/v2`, `schemas/v3`. Migration code lives in `RackPeek.Domain/Persistence/Yaml/`: + +- `RackPeekConfigMigrationDeserializer.cs` — deserialisation entry point +- `ResourceYamlMigrationService.cs` — applies the version chain + +When you change persisted YAML shape, the PR **must** include: + +1. A new `schemas/vN+1/schema.vN+1.json`. +2. A forward migration that reads vN and emits vN+1. +3. Test fixtures under `Tests/TestConfigs/vN+1/` (note the explicit `` entries in `Tests/Tests.csproj` if you add new files). +4. Backwards compatibility for at least vN, OR a clearly documented breaking change. + +--- + +## 7. CLI surface + +The full command tree is documented in `docs/Commands.md` and `docs/CommandIndex.md` (auto-generated by `generate-docs.sh`). At a glance: + +``` +rpk [name] [flags] + +kinds: summary, servers, switches, routers, firewalls, systems, + accesspoints, ups, desktops, laptops, services +verbs: summary, add, list, get, describe, set, del, tree +sub: cpu, drive, gpu, nic, port, subnets, labels, tags, rename, … +``` + +When adding/altering commands, regenerate the docs (`./generate-docs.sh`) so the published reference stays in sync. + +--- + +## 8. Environment variables + +| Var | Default | Purpose | +|---|---|---| +| `RPK_YAML_DIR` | `config` (CLI) / `/app/config` (Docker) | Directory containing `config.yaml` | +| `GIT_TOKEN` | unset | If set, enables `LibGit2GitRepository` for the config dir | +| `GIT_USERNAME` | `git` | Username paired with `GIT_TOKEN` | +| `ASPNETCORE_URLS` | `http://+:8080` (Docker) | Web UI bind | + +--- + +## 9. Testing principles + +Read `docs/development/testing-guidelines.md` in full before touching tests. Highlights: + +- **Test at the edges.** Black-box integration tests over micro-mocked unit tests. If a refactor breaks a test without changing observable behaviour, the test was too coupled. +- **CLI tests** (`Tests/`) drive the real `CommandApp`, assert exact stdout, and inspect the YAML written to disk. Use the `ExecuteAsync(...)` helper pattern. +- **E2E tests** (`Tests.E2e/`) use Testcontainers to run the real Docker image then drive the Web UI via Playwright. Every page has a Page Object Model (POM) in `Tests.E2e/PageObjectModels/`. Tests should read like workflows, not browser scripts. +- E2E tests must be **independent, idempotent, and self-cleaning** — generate unique names with `Guid.NewGuid()` and delete what you create. +- Treat every bug as a missing test: reproduce with a failing test, then fix. +- Fix flakiness immediately; don't retry. + +### Adding a feature checklist + +- [ ] CLI test covering happy + at least one unhappy path (output + YAML side-effect) +- [ ] E2E test for the corresponding Web UI flow (if there is one) +- [ ] YAML migration + migration test (if persisted shape changed) +- [ ] `dotnet format` clean +- [ ] `just ci` green locally + +--- + +## 10. Pull-request workflow + +From `docs/development/contribution-guidelines.md`: + +1. **Find / open a GitHub issue first.** Validate approach with maintainers before coding (issues > Discord for design discussion). +2. Keep PRs **small and focused** — one concern per PR. +3. Open as **Draft**; move to Ready only when: + - All tests pass locally (`just ci`) + - Scope is complete + - No debug code left in (especially `Headless = false` in `PlaywrightFixture.cs`) +4. Pre-PR checklist (mirror in PR body): + - [ ] Linked GitHub issue + - [ ] Approach validated + - [ ] Small, focused PR + - [ ] CLI tests passing locally + - [ ] E2E tests passing locally + - [ ] Behaviour covered by tests + - [ ] YAML migration defined (if persisted shape changed) + +Default branches: feature work targets `staging`; releases flow `staging → main`. + +--- + +## 11. Gotchas + +- **E2E tests require the Docker image.** `just test-e2e` rebuilds it via `just build-web`. If you change anything in `RackPeek.Web`, `RackPeek.Domain`, or `Shared.Rcl`, the image must be rebuilt before E2E runs. +- **Playwright browsers** are installed once via `just e2e-setup`. In CI they're cached under `~/.cache/ms-playwright`. +- **Docker image tag** is `rackpeek:ci` locally (referenced by `Tests.E2e/Infra/PlaywrightFixture.cs:9`); the registry tag is `aptacode/rackpeek`. +- **Debugging E2E**: temporarily set `Headless = false, SlowMo = 1500` in `Tests.E2e/Infra/PlaywrightFixture.cs`. **Always revert before commit** — CI requires headless. +- **TreatWarningsAsErrors** — a stray `unused-variable` warning fails the whole build. Don't add `#pragma warning disable` to push through; fix the warning. +- **Git integration** is optional and silently no-ops when `GIT_TOKEN` is absent (`NullGitRepository`). Don't assume git is wired up. +- **Single YAML file**: concurrent writes from CLI + Web are not coordinated beyond file replacement. Treat the Web UI as the source of truth while it's running. +- The `RackPeek.Web/config copy/` directory looks like cruft but is checked-in — leave it alone unless cleaning up is the explicit goal. +- The Web Docker image bundles **both** the Web app and the CLI binary (`rpk` is placed in `/usr/local/bin`). You can `docker exec rackpeek rpk ...` against a running container. + +--- + +## 12. Reference + +| Path | What | +|---|---| +| `justfile` | Single source of truth for developer commands | +| `RackPeek.sln` | Solution root | +| `Directory.Build.props` | Repo-wide MSBuild props (analyzers, warnings-as-errors) | +| `.editorconfig` | Formatting + naming rules | +| `.github/workflows/test.yml` | CI pipeline (format → cli-tests → webui-tests) | +| `.github/workflows/publish-*.yml` | Release pipelines | +| `RackPeek.Web/Dockerfile` | Multi-stage build for the runtime image | +| `RackPeek/Program.cs` | CLI entry point | +| `RackPeek.Web/Program.cs` | Web entry point + DI wiring | +| `Shared.Rcl/CliBootstrap.cs` | Master CLI command registration | +| `RackPeek.Domain/ServiceCollectionExtensions.cs` | Domain DI registration | +| `RackPeek.Domain/Resources/Resource.cs` | Resource base + kind/relationship rules | +| `docs/development/contribution-guidelines.md` | PR process | +| `docs/development/dev-cheat-sheet.md` | Build / release / Docker / Playwright details | +| `docs/development/dev-setup.md` | First-time environment setup | +| `docs/development/testing-guidelines.md` | Testing philosophy + examples | +| `docs/Commands.md` / `docs/CommandIndex.md` | Auto-generated CLI reference | +| `schemas/v1,v2,v3/` | Versioned YAML schemas | +| `README.md` | User-facing overview, Docker install, links | +| `LICENSE` | License terms | diff --git a/RackPeek.Domain/RackPeek.Domain.csproj b/RackPeek.Domain/RackPeek.Domain.csproj index feabdadc..42ad5bf0 100644 --- a/RackPeek.Domain/RackPeek.Domain.csproj +++ b/RackPeek.Domain/RackPeek.Domain.csproj @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/RackPeek.Web.Viewer/RackPeek.Web.Viewer.csproj b/RackPeek.Web.Viewer/RackPeek.Web.Viewer.csproj index 2ad83252..3e1006d7 100644 --- a/RackPeek.Web.Viewer/RackPeek.Web.Viewer.csproj +++ b/RackPeek.Web.Viewer/RackPeek.Web.Viewer.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/RackPeek/RackPeek.csproj b/RackPeek/RackPeek.csproj index 14c28d8e..58be043e 100644 --- a/RackPeek/RackPeek.csproj +++ b/RackPeek/RackPeek.csproj @@ -9,17 +9,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointAddCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointAddCommand.cs index 67ad845e..1bd3a33d 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointAddCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointAddCommand.cs @@ -16,7 +16,7 @@ public class AccessPointAddSettings : CommandSettings { public class AccessPointAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, AccessPointAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointDeleteCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointDeleteCommand.cs index cf7b0368..9ce2a55a 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointDeleteCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.AccessPoints; public class AccessPointDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, AccessPointNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointDescribeCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointDescribeCommand.cs index d58ee201..d590235c 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointDescribeCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointDescribeCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.AccessPoints; public class AccessPointDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, AccessPointNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointGetByNameCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointGetByNameCommand.cs index a72a45a4..985c35a2 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointGetByNameCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointGetByNameCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.AccessPoints; public class AccessPointGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, AccessPointNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointGetCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointGetCommand.cs index a1c258da..bbd5f4e6 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointGetCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.AccessPoints; public class AccessPointGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointReportCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointReportCommand.cs index 3d447da9..c713be22 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointReportCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointReportCommand.cs @@ -13,7 +13,7 @@ IServiceProvider serviceProvider ) : AsyncCommand { private readonly ILogger _logger = logger; - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); AccessPointHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/AccessPoints/AccessPointSetCommand.cs b/Shared.Rcl/Commands/AccessPoints/AccessPointSetCommand.cs index 02bc83a5..d09fe782 100644 --- a/Shared.Rcl/Commands/AccessPoints/AccessPointSetCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/AccessPointSetCommand.cs @@ -20,7 +20,7 @@ public class AccessPointSetSettings : ServerNameSettings { public class AccessPointSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, AccessPointSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelAddCommand.cs b/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelAddCommand.cs index 69210a77..c6000935 100644 --- a/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelAddCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelAddCommand.cs @@ -12,7 +12,7 @@ public class AccessPointLabelAddSettings : AccessPointNameSettings { } public class AccessPointLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, AccessPointLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, AccessPointLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = diff --git a/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelRemoveCommand.cs b/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelRemoveCommand.cs index c0df00d5..da97e69f 100644 --- a/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/Labels/AccessPointLabelRemoveCommand.cs @@ -12,7 +12,7 @@ public class AccessPointLabelRemoveSettings : AccessPointNameSettings { public class AccessPointLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, AccessPointLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, AccessPointLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = diff --git a/Shared.Rcl/Commands/AccessPoints/Rename/AccessPointRenameCommand.cs b/Shared.Rcl/Commands/AccessPoints/Rename/AccessPointRenameCommand.cs index ef878a20..a7e6f4b3 100644 --- a/Shared.Rcl/Commands/AccessPoints/Rename/AccessPointRenameCommand.cs +++ b/Shared.Rcl/Commands/AccessPoints/Rename/AccessPointRenameCommand.cs @@ -14,7 +14,7 @@ public class AccessPointRenameSettings : AccessPointNameSettings { public class AccessPointRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, AccessPointRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Connections/ConnectionAddCommand.cs b/Shared.Rcl/Commands/Connections/ConnectionAddCommand.cs index 023b3f35..caad095f 100644 --- a/Shared.Rcl/Commands/Connections/ConnectionAddCommand.cs +++ b/Shared.Rcl/Commands/Connections/ConnectionAddCommand.cs @@ -43,7 +43,7 @@ public class ConnectionAddSettings : CommandSettings { public class ConnectionAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ConnectionAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Connections/ConnectionRemoveCommand.cs b/Shared.Rcl/Commands/Connections/ConnectionRemoveCommand.cs index 1306568b..6d0dbe26 100644 --- a/Shared.Rcl/Commands/Connections/ConnectionRemoveCommand.cs +++ b/Shared.Rcl/Commands/Connections/ConnectionRemoveCommand.cs @@ -23,7 +23,7 @@ public class ConnectionRemoveSettings : CommandSettings { public class ConnectionRemoveCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ConnectionRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuAddCommand.cs b/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuAddCommand.cs index f7f378fc..c453a11b 100644 --- a/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuAddCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuAddCommand.cs @@ -27,7 +27,7 @@ public class DesktopCpuAddSettings : CommandSettings { public class DesktopCpuAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopCpuAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuRemoveCommand.cs b/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuRemoveCommand.cs index c94f07d8..76fedc85 100644 --- a/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuRemoveCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuRemoveCommand.cs @@ -19,7 +19,7 @@ public class DesktopCpuRemoveSettings : CommandSettings { public class DesktopCpuRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopCpuRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuSetCommand.cs b/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuSetCommand.cs index f0ab5b25..f35df869 100644 --- a/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuSetCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Cpus/DesktopCpuSetCommand.cs @@ -30,7 +30,7 @@ public class DesktopCpuSetSettings : CommandSettings { } public class DesktopCpuSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, DesktopCpuSetSettings settings, + protected override async Task ExecuteAsync(CommandContext context, DesktopCpuSetSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = provider.CreateScope(); IUpdateCpuUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Desktops/DesktopAddCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopAddCommand.cs index 3f608658..847d323c 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopAddCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopAddCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Desktops; public class DesktopAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/DesktopDeleteCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopDeleteCommand.cs index 4421a0f4..98bb6667 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopDeleteCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopDeleteCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Desktops; public class DesktopDeleteCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/DesktopDescribeCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopDescribeCommand.cs index def3ecb2..7cd28858 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopDescribeCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopDescribeCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Desktops; public class DesktopDescribeCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/DesktopGetByNameCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopGetByNameCommand.cs index 858690c7..fc981b31 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Desktops; public class DesktopGetByNameCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/DesktopGetCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopGetCommand.cs index a108f70d..9f47c9eb 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopGetCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Desktops; public class DesktopGetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = provider.CreateScope(); diff --git a/Shared.Rcl/Commands/Desktops/DesktopReportCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopReportCommand.cs index 64ba0868..7799b6a5 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopReportCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopReportCommand.cs @@ -13,7 +13,7 @@ IServiceProvider serviceProvider ) : AsyncCommand { private readonly ILogger _logger = logger; - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); DesktopHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Desktops/DesktopSetCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopSetCommand.cs index 3fa44349..de529602 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopSetCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopSetCommand.cs @@ -11,7 +11,7 @@ public class DesktopSetSettings : DesktopNameSettings { public class DesktopSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/DesktopTreeCommand.cs b/Shared.Rcl/Commands/Desktops/DesktopTreeCommand.cs index 3dd3d27c..c2a3bd90 100644 --- a/Shared.Rcl/Commands/Desktops/DesktopTreeCommand.cs +++ b/Shared.Rcl/Commands/Desktops/DesktopTreeCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Desktops; public sealed class DesktopTreeCommand(GetHardwareSystemTreeUseCase useCase) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveAddCommand.cs b/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveAddCommand.cs index 142560b6..50b6106f 100644 --- a/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveAddCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveAddCommand.cs @@ -23,7 +23,7 @@ public class DesktopDriveAddSettings : CommandSettings { public class DesktopDriveAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopDriveAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveRemoveCommand.cs b/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveRemoveCommand.cs index 31b0c698..b93b490a 100644 --- a/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveRemoveCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveRemoveCommand.cs @@ -19,7 +19,7 @@ public class DesktopDriveRemoveSettings : CommandSettings { public class DesktopDriveRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopDriveRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveSetCommand.cs b/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveSetCommand.cs index 78fd6491..16c4a35d 100644 --- a/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveSetCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Drive/DesktopDriveSetCommand.cs @@ -27,7 +27,7 @@ public class DesktopDriveSetSettings : CommandSettings { public class DesktopDriveSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopDriveSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuAddCommand.cs b/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuAddCommand.cs index 5aaf16d2..823b5e20 100644 --- a/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuAddCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuAddCommand.cs @@ -23,7 +23,7 @@ public class DesktopGpuAddSettings : CommandSettings { public class DesktopGpuAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopGpuAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuRemoveCommand.cs b/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuRemoveCommand.cs index cf763d97..af2cb45e 100644 --- a/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuRemoveCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuRemoveCommand.cs @@ -19,7 +19,7 @@ public class DesktopGpuRemoveSettings : CommandSettings { public class DesktopGpuRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopGpuRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuSetCommand.cs b/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuSetCommand.cs index 3e781469..47992fa8 100644 --- a/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuSetCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Gpus/DesktopGpuSetCommand.cs @@ -27,7 +27,7 @@ public class DesktopGpuSetSettings : CommandSettings { public class DesktopGpuSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopGpuSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelAddCommand.cs b/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelAddCommand.cs index 8b687865..152b27c6 100644 --- a/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelAddCommand.cs @@ -12,7 +12,7 @@ public class DesktopLabelAddSettings : DesktopNameSettings { } public class DesktopLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, DesktopLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, DesktopLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelRemoveCommand.cs b/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelRemoveCommand.cs index 1b9ddc1e..d8a14e98 100644 --- a/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Labels/DesktopLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class DesktopLabelRemoveSettings : DesktopNameSettings { } public class DesktopLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, DesktopLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, DesktopLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Desktops/Nics/DesktopNicAddCommand.cs b/Shared.Rcl/Commands/Desktops/Nics/DesktopNicAddCommand.cs index 023e8f00..8e085947 100644 --- a/Shared.Rcl/Commands/Desktops/Nics/DesktopNicAddCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Nics/DesktopNicAddCommand.cs @@ -27,7 +27,7 @@ public class DesktopNicAddSettings : CommandSettings { public class DesktopNicAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNicAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Nics/DesktopNicRemoveCommand.cs b/Shared.Rcl/Commands/Desktops/Nics/DesktopNicRemoveCommand.cs index 114afa8b..cd7d6c38 100644 --- a/Shared.Rcl/Commands/Desktops/Nics/DesktopNicRemoveCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Nics/DesktopNicRemoveCommand.cs @@ -19,7 +19,7 @@ public class DesktopNicRemoveSettings : CommandSettings { public class DesktopNicRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNicRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Nics/DesktopNicSetCommand.cs b/Shared.Rcl/Commands/Desktops/Nics/DesktopNicSetCommand.cs index 85be8d24..18fa2b25 100644 --- a/Shared.Rcl/Commands/Desktops/Nics/DesktopNicSetCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Nics/DesktopNicSetCommand.cs @@ -31,7 +31,7 @@ public class DesktopNicSetSettings : CommandSettings { public class DesktopNicSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopNicSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Desktops/Rename/DesktopRenameCommand.cs b/Shared.Rcl/Commands/Desktops/Rename/DesktopRenameCommand.cs index 58faab8a..36d0851c 100644 --- a/Shared.Rcl/Commands/Desktops/Rename/DesktopRenameCommand.cs +++ b/Shared.Rcl/Commands/Desktops/Rename/DesktopRenameCommand.cs @@ -14,7 +14,7 @@ public class DesktopRenameSettings : DesktopNameSettings { public class DesktopRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, DesktopRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Exporters/GenerateAnsibleInventoryCommand.cs b/Shared.Rcl/Commands/Exporters/GenerateAnsibleInventoryCommand.cs index 43158cd9..c2c65578 100644 --- a/Shared.Rcl/Commands/Exporters/GenerateAnsibleInventoryCommand.cs +++ b/Shared.Rcl/Commands/Exporters/GenerateAnsibleInventoryCommand.cs @@ -31,7 +31,7 @@ public sealed class GenerateAnsibleInventorySettings : CommandSettings { public sealed class GenerateAnsibleInventoryCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, GenerateAnsibleInventorySettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Exporters/GenerateHostsFileCommand.cs b/Shared.Rcl/Commands/Exporters/GenerateHostsFileCommand.cs index 954a90b9..3851f946 100644 --- a/Shared.Rcl/Commands/Exporters/GenerateHostsFileCommand.cs +++ b/Shared.Rcl/Commands/Exporters/GenerateHostsFileCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Exporters; public sealed class GenerateHostsFileCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, GenerateHostsFileSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Exporters/GenerateSshConfigCommand.cs b/Shared.Rcl/Commands/Exporters/GenerateSshConfigCommand.cs index 8b4cdd5d..2adb8a58 100644 --- a/Shared.Rcl/Commands/Exporters/GenerateSshConfigCommand.cs +++ b/Shared.Rcl/Commands/Exporters/GenerateSshConfigCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Exporters; public sealed class GenerateSshConfigCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, GenerateSshConfigSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Firewalls/FirewallAddCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallAddCommand.cs index bfcaf335..a43f1a3a 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallAddCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallAddCommand.cs @@ -13,7 +13,7 @@ public class FirewallAddSettings : CommandSettings { public class FirewallAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, FirewallAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Firewalls/FirewallDeleteCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallDeleteCommand.cs index 79e3e090..87f004f5 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallDeleteCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Firewalls; public class FirewallDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, FirewallNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Firewalls/FirewallDescribeCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallDescribeCommand.cs index 981261df..e1e36fb6 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallDescribeCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallDescribeCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Firewalls; public class FirewallDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, FirewallNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Firewalls/FirewallGetByNameCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallGetByNameCommand.cs index 0927be91..0c645b8e 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Firewalls; public class FirewallGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, FirewallNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Firewalls/FirewallGetCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallGetCommand.cs index 00dc98fa..d5345822 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallGetCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Firewalls; public class FirewallGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/Firewalls/FirewallReportCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallReportCommand.cs index ecc59fc0..d198ba97 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallReportCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallReportCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Firewalls; public class FirewallReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); FirewallHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Firewalls/FirewallSetCommand.cs b/Shared.Rcl/Commands/Firewalls/FirewallSetCommand.cs index af3f1a63..f09e9a31 100644 --- a/Shared.Rcl/Commands/Firewalls/FirewallSetCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/FirewallSetCommand.cs @@ -17,7 +17,7 @@ public class FirewallSetSettings : ServerNameSettings { public class FirewallSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, FirewallSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelAddCommand.cs b/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelAddCommand.cs index 77a31c03..3fccbd94 100644 --- a/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelAddCommand.cs @@ -12,7 +12,7 @@ public class FirewallLabelAddSettings : FirewallNameSettings { } public class FirewallLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, FirewallLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, FirewallLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelRemoveCommand.cs b/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelRemoveCommand.cs index a92985ec..bf9597ef 100644 --- a/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/Labels/FirewallLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class FirewallLabelRemoveSettings : FirewallNameSettings { } public class FirewallLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, FirewallLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, FirewallLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = diff --git a/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortAddCommand.cs b/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortAddCommand.cs index bf7cdf26..4b7b9a09 100644 --- a/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortAddCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortAddCommand.cs @@ -14,7 +14,7 @@ public class FirewallPortAddSettings : FirewallNameSettings { public class FirewallPortAddCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, FirewallPortAddSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, FirewallPortAddSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IAddPortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortRemoveCommand.cs b/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortRemoveCommand.cs index 943437e3..d1bbd23d 100644 --- a/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortRemoveCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortRemoveCommand.cs @@ -12,7 +12,7 @@ public class FirewallPortRemoveSettings : FirewallNameSettings { public class FirewallPortRemoveCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, FirewallPortRemoveSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, FirewallPortRemoveSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IRemovePortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortUpdateCommand.cs b/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortUpdateCommand.cs index d76f331e..58eff7b1 100644 --- a/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortUpdateCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/Ports/FirewallPortUpdateCommand.cs @@ -15,7 +15,7 @@ public class FirewallPortUpdateSettings : FirewallNameSettings { public class FirewallPortUpdateCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, FirewallPortUpdateSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, FirewallPortUpdateSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IUpdatePortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Firewalls/Rename/FirewallRenameCommand.cs b/Shared.Rcl/Commands/Firewalls/Rename/FirewallRenameCommand.cs index d743f48c..91ac80fe 100644 --- a/Shared.Rcl/Commands/Firewalls/Rename/FirewallRenameCommand.cs +++ b/Shared.Rcl/Commands/Firewalls/Rename/FirewallRenameCommand.cs @@ -14,7 +14,7 @@ public class FirewallRenameSettings : FirewallNameSettings { public class FirewallRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, FirewallRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/GetTotalSummaryCommand.cs b/Shared.Rcl/Commands/GetTotalSummaryCommand.cs index 9c68bcd5..cfb8077b 100644 --- a/Shared.Rcl/Commands/GetTotalSummaryCommand.cs +++ b/Shared.Rcl/Commands/GetTotalSummaryCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands; public class GetTotalSummaryCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = provider.CreateScope(); diff --git a/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuAddCommand.cs b/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuAddCommand.cs index e4d30243..52865b6c 100644 --- a/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuAddCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuAddCommand.cs @@ -27,7 +27,7 @@ public class LaptopCpuAddSettings : CommandSettings { public class LaptopCpuAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopCpuAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuRemoveCommand.cs b/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuRemoveCommand.cs index 55c97ae2..26902439 100644 --- a/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuRemoveCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuRemoveCommand.cs @@ -19,7 +19,7 @@ public class LaptopCpuRemoveSettings : CommandSettings { public class LaptopCpuRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopCpuRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuSetCommand.cs b/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuSetCommand.cs index 0c6c568d..8f33535e 100644 --- a/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuSetCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Cpus/LaptopCpuSetCommand.cs @@ -31,7 +31,7 @@ public class LaptopCpuSetSettings : CommandSettings { public class LaptopCpuSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopCpuSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveAddCommand.cs b/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveAddCommand.cs index 3f232d0a..d1c62535 100644 --- a/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveAddCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveAddCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops.Drive; public class LaptopDriveAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopDriveAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveRemoveCommand.cs b/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveRemoveCommand.cs index a3907b14..09eab375 100644 --- a/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveRemoveCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveRemoveCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops.Drive; public class LaptopDriveRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopDriveRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveSetCommand.cs b/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveSetCommand.cs index b73eee6d..41e43adb 100644 --- a/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveSetCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Drive/LaptopDriveSetCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops.Drive; public class LaptopDriveSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopDriveSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuAddCommand.cs b/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuAddCommand.cs index 1a1aee58..72401339 100644 --- a/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuAddCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuAddCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops.Gpus; public class LaptopGpuAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopGpuAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuRemoveCommand.cs b/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuRemoveCommand.cs index 4604b910..b95b31a4 100644 --- a/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuRemoveCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuRemoveCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops.Gpus; public class LaptopGpuRemoveCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopGpuRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuSetCommand.cs b/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuSetCommand.cs index 25f0c744..0030be0a 100644 --- a/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuSetCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Gpus/LaptopGpuSetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Laptops.Gpus; public class LaptopGpuSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopGpuSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelAddCommand.cs b/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelAddCommand.cs index 76d60f1d..1bdd8932 100644 --- a/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelAddCommand.cs @@ -12,7 +12,7 @@ public class LaptopLabelAddSettings : LaptopNameSettings { } public class LaptopLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, LaptopLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, LaptopLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelRemoveCommand.cs b/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelRemoveCommand.cs index 9480417d..c90743ea 100644 --- a/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Labels/LaptopLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class LaptopLabelRemoveSettings : LaptopNameSettings { } public class LaptopLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, LaptopLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, LaptopLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Laptops/LaptopAddCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopAddCommand.cs index 802a4807..30e40725 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopAddCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopAddCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops; public class LaptopAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/LaptopDeleteCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopDeleteCommand.cs index 1ff5ef05..0c1db5bb 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopDeleteCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopDeleteCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops; public class LaptopDeleteCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/LaptopDescribeCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopDescribeCommand.cs index d4194c81..2e313f72 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopDescribeCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopDescribeCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Laptops; public class LaptopDescribeCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/LaptopGetByNameCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopGetByNameCommand.cs index f311c924..2d83d1c1 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Laptops; public class LaptopGetByNameCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/LaptopGetCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopGetCommand.cs index b40ec086..f9e397aa 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopGetCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Laptops; public class LaptopGetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = provider.CreateScope(); diff --git a/Shared.Rcl/Commands/Laptops/LaptopReportCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopReportCommand.cs index 16090048..ad51f357 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopReportCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopReportCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Laptops; public class LaptopReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); LaptopHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Laptops/LaptopSetCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopSetCommand.cs index a01edf5d..6888ec6b 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopSetCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopSetCommand.cs @@ -11,7 +11,7 @@ public class LaptopSetSettings : LaptopNameSettings { public class LaptopSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/LaptopTreeCommand.cs b/Shared.Rcl/Commands/Laptops/LaptopTreeCommand.cs index 9d05b28e..57e35a9e 100644 --- a/Shared.Rcl/Commands/Laptops/LaptopTreeCommand.cs +++ b/Shared.Rcl/Commands/Laptops/LaptopTreeCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Laptops; public sealed class LaptopTreeCommand(GetHardwareSystemTreeUseCase useCase) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Laptops/Rename/LaptopRenameCommand.cs b/Shared.Rcl/Commands/Laptops/Rename/LaptopRenameCommand.cs index ae79f377..4d586f21 100644 --- a/Shared.Rcl/Commands/Laptops/Rename/LaptopRenameCommand.cs +++ b/Shared.Rcl/Commands/Laptops/Rename/LaptopRenameCommand.cs @@ -14,7 +14,7 @@ public class LaptopRenameSettings : LaptopNameSettings { public class LaptopRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, LaptopRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Routers/Labels/RouterLabelAddCommand.cs b/Shared.Rcl/Commands/Routers/Labels/RouterLabelAddCommand.cs index cf5766e2..39ce74f6 100644 --- a/Shared.Rcl/Commands/Routers/Labels/RouterLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Routers/Labels/RouterLabelAddCommand.cs @@ -12,7 +12,7 @@ public class RouterLabelAddSettings : RouterNameSettings { } public class RouterLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, RouterLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, RouterLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Routers/Labels/RouterLabelRemoveCommand.cs b/Shared.Rcl/Commands/Routers/Labels/RouterLabelRemoveCommand.cs index 4fa5c69c..6545fe97 100644 --- a/Shared.Rcl/Commands/Routers/Labels/RouterLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Routers/Labels/RouterLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class RouterLabelRemoveSettings : RouterNameSettings { } public class RouterLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, RouterLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, RouterLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Routers/Ports/RouterPortAddCommand.cs b/Shared.Rcl/Commands/Routers/Ports/RouterPortAddCommand.cs index ff790b1f..7c0c1fd2 100644 --- a/Shared.Rcl/Commands/Routers/Ports/RouterPortAddCommand.cs +++ b/Shared.Rcl/Commands/Routers/Ports/RouterPortAddCommand.cs @@ -14,7 +14,7 @@ public class RouterPortAddSettings : RouterNameSettings { public class RouterPortAddCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, RouterPortAddSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, RouterPortAddSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IAddPortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Routers/Ports/RouterPortRemoveCommand.cs b/Shared.Rcl/Commands/Routers/Ports/RouterPortRemoveCommand.cs index 41fed3e3..b7eeaaff 100644 --- a/Shared.Rcl/Commands/Routers/Ports/RouterPortRemoveCommand.cs +++ b/Shared.Rcl/Commands/Routers/Ports/RouterPortRemoveCommand.cs @@ -12,7 +12,7 @@ public class RouterPortRemoveSettings : RouterNameSettings { public class RouterPortRemoveCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, RouterPortRemoveSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, RouterPortRemoveSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IRemovePortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Routers/Ports/RouterPortUpdateCommand.cs b/Shared.Rcl/Commands/Routers/Ports/RouterPortUpdateCommand.cs index 87b57770..b479367c 100644 --- a/Shared.Rcl/Commands/Routers/Ports/RouterPortUpdateCommand.cs +++ b/Shared.Rcl/Commands/Routers/Ports/RouterPortUpdateCommand.cs @@ -15,7 +15,7 @@ public class RouterPortUpdateSettings : RouterNameSettings { public class RouterPortUpdateCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, RouterPortUpdateSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, RouterPortUpdateSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IUpdatePortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Routers/Rename/RouterRenameCommand.cs b/Shared.Rcl/Commands/Routers/Rename/RouterRenameCommand.cs index f414b6bc..ef8f1416 100644 --- a/Shared.Rcl/Commands/Routers/Rename/RouterRenameCommand.cs +++ b/Shared.Rcl/Commands/Routers/Rename/RouterRenameCommand.cs @@ -14,7 +14,7 @@ public class RouterRenameSettings : RouterNameSettings { public class RouterRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, RouterRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Routers/RouterAddCommand.cs b/Shared.Rcl/Commands/Routers/RouterAddCommand.cs index a3c4da3f..9fb05c15 100644 --- a/Shared.Rcl/Commands/Routers/RouterAddCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterAddCommand.cs @@ -13,7 +13,7 @@ public class RouterAddSettings : CommandSettings { public class RouterAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, RouterAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Routers/RouterDeleteCommand.cs b/Shared.Rcl/Commands/Routers/RouterDeleteCommand.cs index fd7aeef2..02cb78fe 100644 --- a/Shared.Rcl/Commands/Routers/RouterDeleteCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Routers; public class RouterDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, RouterNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Routers/RouterDescribeCommand.cs b/Shared.Rcl/Commands/Routers/RouterDescribeCommand.cs index edb9a740..cd34bdcd 100644 --- a/Shared.Rcl/Commands/Routers/RouterDescribeCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterDescribeCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Routers; public class RouterDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, RouterNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Routers/RouterGetByNameCommand.cs b/Shared.Rcl/Commands/Routers/RouterGetByNameCommand.cs index 4b94c201..427cb966 100644 --- a/Shared.Rcl/Commands/Routers/RouterGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Routers; public class RouterGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, RouterNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Routers/RouterGetCommand.cs b/Shared.Rcl/Commands/Routers/RouterGetCommand.cs index a14834e0..94d317a2 100644 --- a/Shared.Rcl/Commands/Routers/RouterGetCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Routers; public class RouterGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/Routers/RouterReportCommand.cs b/Shared.Rcl/Commands/Routers/RouterReportCommand.cs index 3e6100be..abf707ec 100644 --- a/Shared.Rcl/Commands/Routers/RouterReportCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterReportCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Routers; public class RouterReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); RouterHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Routers/RouterSetCommand.cs b/Shared.Rcl/Commands/Routers/RouterSetCommand.cs index cdb85408..14e25c29 100644 --- a/Shared.Rcl/Commands/Routers/RouterSetCommand.cs +++ b/Shared.Rcl/Commands/Routers/RouterSetCommand.cs @@ -17,7 +17,7 @@ public class RouterSetSettings : ServerNameSettings { public class RouterSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, RouterSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Cpus/ServerCpuAddCommand.cs b/Shared.Rcl/Commands/Servers/Cpus/ServerCpuAddCommand.cs index 43ce61e5..fa2ce7ee 100644 --- a/Shared.Rcl/Commands/Servers/Cpus/ServerCpuAddCommand.cs +++ b/Shared.Rcl/Commands/Servers/Cpus/ServerCpuAddCommand.cs @@ -17,7 +17,7 @@ public class ServerCpuAddSettings : ServerNameSettings { public class ServerCpuAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerCpuAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Cpus/ServerCpuRemoveCommand.cs b/Shared.Rcl/Commands/Servers/Cpus/ServerCpuRemoveCommand.cs index 396e17a5..92a9a0db 100644 --- a/Shared.Rcl/Commands/Servers/Cpus/ServerCpuRemoveCommand.cs +++ b/Shared.Rcl/Commands/Servers/Cpus/ServerCpuRemoveCommand.cs @@ -11,7 +11,7 @@ public class ServerCpuRemoveSettings : ServerNameSettings { } public class ServerCpuRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerCpuRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Cpus/ServerCpuSetCommand.cs b/Shared.Rcl/Commands/Servers/Cpus/ServerCpuSetCommand.cs index c9b6380c..b827bcda 100644 --- a/Shared.Rcl/Commands/Servers/Cpus/ServerCpuSetCommand.cs +++ b/Shared.Rcl/Commands/Servers/Cpus/ServerCpuSetCommand.cs @@ -17,7 +17,7 @@ public class ServerCpuSetSettings : ServerNameSettings { } public class ServerCpuSetCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerCpuSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Drives/ServerDriveAddCommand.cs b/Shared.Rcl/Commands/Servers/Drives/ServerDriveAddCommand.cs index 6b0786b1..7aa95670 100644 --- a/Shared.Rcl/Commands/Servers/Drives/ServerDriveAddCommand.cs +++ b/Shared.Rcl/Commands/Servers/Drives/ServerDriveAddCommand.cs @@ -19,7 +19,7 @@ public class ServerDriveAddSettings : ServerNameSettings { public class ServerDriveAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerDriveAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Drives/ServerDriveRemoveCommand.cs b/Shared.Rcl/Commands/Servers/Drives/ServerDriveRemoveCommand.cs index 6d819b51..02159464 100644 --- a/Shared.Rcl/Commands/Servers/Drives/ServerDriveRemoveCommand.cs +++ b/Shared.Rcl/Commands/Servers/Drives/ServerDriveRemoveCommand.cs @@ -12,7 +12,7 @@ public class ServerDriveRemoveSettings : ServerNameSettings { public class ServerDriveRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerDriveRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Drives/ServerDriveUpdateCommand.cs b/Shared.Rcl/Commands/Servers/Drives/ServerDriveUpdateCommand.cs index 906491d7..52f24a12 100644 --- a/Shared.Rcl/Commands/Servers/Drives/ServerDriveUpdateCommand.cs +++ b/Shared.Rcl/Commands/Servers/Drives/ServerDriveUpdateCommand.cs @@ -16,7 +16,7 @@ public class ServerDriveUpdateSettings : ServerNameSettings { public class ServerDriveUpdateCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerDriveUpdateSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Gpus/AddGpuUseCaseCommand.cs b/Shared.Rcl/Commands/Servers/Gpus/AddGpuUseCaseCommand.cs index 28acc543..13e1884e 100644 --- a/Shared.Rcl/Commands/Servers/Gpus/AddGpuUseCaseCommand.cs +++ b/Shared.Rcl/Commands/Servers/Gpus/AddGpuUseCaseCommand.cs @@ -14,7 +14,7 @@ public class ServerGpuAddSettings : ServerNameSettings { public class ServerGpuAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerGpuAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Gpus/RemoveGpuUseCaseCommand.cs b/Shared.Rcl/Commands/Servers/Gpus/RemoveGpuUseCaseCommand.cs index 6d254320..76a45988 100644 --- a/Shared.Rcl/Commands/Servers/Gpus/RemoveGpuUseCaseCommand.cs +++ b/Shared.Rcl/Commands/Servers/Gpus/RemoveGpuUseCaseCommand.cs @@ -12,7 +12,7 @@ public class ServerGpuRemoveSettings : ServerNameSettings { public class ServerGpuRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerGpuRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Gpus/UpdateGpuUseCaseCommand.cs b/Shared.Rcl/Commands/Servers/Gpus/UpdateGpuUseCaseCommand.cs index ecf369b0..51cfdea1 100644 --- a/Shared.Rcl/Commands/Servers/Gpus/UpdateGpuUseCaseCommand.cs +++ b/Shared.Rcl/Commands/Servers/Gpus/UpdateGpuUseCaseCommand.cs @@ -16,7 +16,7 @@ public class ServerGpuUpdateSettings : ServerNameSettings { public class ServerGpuUpdateCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerGpuUpdateSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Labels/ServerLabelAddCommand.cs b/Shared.Rcl/Commands/Servers/Labels/ServerLabelAddCommand.cs index b0827fae..8c24f136 100644 --- a/Shared.Rcl/Commands/Servers/Labels/ServerLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Servers/Labels/ServerLabelAddCommand.cs @@ -14,7 +14,7 @@ public class ServerLabelAddSettings : ServerNameSettings { public class ServerLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerLabelAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Labels/ServerLabelRemoveCommand.cs b/Shared.Rcl/Commands/Servers/Labels/ServerLabelRemoveCommand.cs index b41fea9f..7ce7c41b 100644 --- a/Shared.Rcl/Commands/Servers/Labels/ServerLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Servers/Labels/ServerLabelRemoveCommand.cs @@ -12,7 +12,7 @@ public class ServerLabelRemoveSettings : ServerNameSettings { public class ServerLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerLabelRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Nics/ServerNicAddCommand.cs b/Shared.Rcl/Commands/Servers/Nics/ServerNicAddCommand.cs index b01ffd1e..647d050b 100644 --- a/Shared.Rcl/Commands/Servers/Nics/ServerNicAddCommand.cs +++ b/Shared.Rcl/Commands/Servers/Nics/ServerNicAddCommand.cs @@ -16,7 +16,7 @@ public class ServerNicAddSettings : ServerNameSettings { public class ServerNicAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNicAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Nics/ServerNicRemoveCommand.cs b/Shared.Rcl/Commands/Servers/Nics/ServerNicRemoveCommand.cs index c517de80..75114f7c 100644 --- a/Shared.Rcl/Commands/Servers/Nics/ServerNicRemoveCommand.cs +++ b/Shared.Rcl/Commands/Servers/Nics/ServerNicRemoveCommand.cs @@ -12,7 +12,7 @@ public class ServerNicRemoveSettings : ServerNameSettings { public class ServerNicRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNicRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Nics/ServerNicUpdateCommand.cs b/Shared.Rcl/Commands/Servers/Nics/ServerNicUpdateCommand.cs index 48b11ea9..0bce14cb 100644 --- a/Shared.Rcl/Commands/Servers/Nics/ServerNicUpdateCommand.cs +++ b/Shared.Rcl/Commands/Servers/Nics/ServerNicUpdateCommand.cs @@ -18,7 +18,7 @@ public class ServerNicUpdateSettings : ServerNameSettings { public class ServerNicUpdateCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNicUpdateSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/Rename/ServerRenameCommand.cs b/Shared.Rcl/Commands/Servers/Rename/ServerRenameCommand.cs index 6e1d5c83..ded89457 100644 --- a/Shared.Rcl/Commands/Servers/Rename/ServerRenameCommand.cs +++ b/Shared.Rcl/Commands/Servers/Rename/ServerRenameCommand.cs @@ -14,7 +14,7 @@ public class ServerRenameSettings : ServerNameSettings { public class ServerRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/ServerAddCommand.cs b/Shared.Rcl/Commands/Servers/ServerAddCommand.cs index 021ed973..0ead8a4e 100644 --- a/Shared.Rcl/Commands/Servers/ServerAddCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerAddCommand.cs @@ -13,7 +13,7 @@ public class ServerAddSettings : CommandSettings { public class ServerAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/ServerDeleteCommand.cs b/Shared.Rcl/Commands/Servers/ServerDeleteCommand.cs index 202f22f3..8d1f9f59 100644 --- a/Shared.Rcl/Commands/Servers/ServerDeleteCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Servers; public class ServerDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/ServerDescribeCommand.cs b/Shared.Rcl/Commands/Servers/ServerDescribeCommand.cs index a2bb5485..f6841c60 100644 --- a/Shared.Rcl/Commands/Servers/ServerDescribeCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerDescribeCommand.cs @@ -11,7 +11,7 @@ namespace Shared.Rcl.Commands.Servers; public class ServerDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/ServerGetByNameCommand.cs b/Shared.Rcl/Commands/Servers/ServerGetByNameCommand.cs index c1299d28..70cb3c33 100644 --- a/Shared.Rcl/Commands/Servers/ServerGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerGetByNameCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Servers; public class ServerGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/ServerGetCommand.cs b/Shared.Rcl/Commands/Servers/ServerGetCommand.cs index bfd3e741..39ccc280 100644 --- a/Shared.Rcl/Commands/Servers/ServerGetCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Servers; public class ServerGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/Servers/ServerReportCommand.cs b/Shared.Rcl/Commands/Servers/ServerReportCommand.cs index 2ccde792..440ff9bb 100644 --- a/Shared.Rcl/Commands/Servers/ServerReportCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerReportCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Servers; public class ServerReportCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); ServerHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Servers/ServerSetCommand.cs b/Shared.Rcl/Commands/Servers/ServerSetCommand.cs index 82f7e012..6a080e9a 100644 --- a/Shared.Rcl/Commands/Servers/ServerSetCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerSetCommand.cs @@ -15,7 +15,7 @@ public class ServerSetSettings : ServerNameSettings { public class ServerSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Servers/ServerTreeCommand.cs b/Shared.Rcl/Commands/Servers/ServerTreeCommand.cs index 0fff1817..04747d5a 100644 --- a/Shared.Rcl/Commands/Servers/ServerTreeCommand.cs +++ b/Shared.Rcl/Commands/Servers/ServerTreeCommand.cs @@ -6,7 +6,7 @@ namespace Shared.Rcl.Commands.Servers; public sealed class ServerTreeCommand(GetHardwareSystemTreeUseCase useCase) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServerNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/Labels/ServiceLabelAddCommand.cs b/Shared.Rcl/Commands/Services/Labels/ServiceLabelAddCommand.cs index 4118e585..659d4079 100644 --- a/Shared.Rcl/Commands/Services/Labels/ServiceLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Services/Labels/ServiceLabelAddCommand.cs @@ -12,7 +12,7 @@ public class ServiceLabelAddSettings : ServiceNameSettings { } public class ServiceLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, ServiceLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, ServiceLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Services/Labels/ServiceLabelRemoveCommand.cs b/Shared.Rcl/Commands/Services/Labels/ServiceLabelRemoveCommand.cs index 9883f6f1..4c5ac10f 100644 --- a/Shared.Rcl/Commands/Services/Labels/ServiceLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Services/Labels/ServiceLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class ServiceLabelRemoveSettings : ServiceNameSettings { } public class ServiceLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, ServiceLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, ServiceLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Services/Rename/ServiceRenameCommand.cs b/Shared.Rcl/Commands/Services/Rename/ServiceRenameCommand.cs index e583dd51..475e5821 100644 --- a/Shared.Rcl/Commands/Services/Rename/ServiceRenameCommand.cs +++ b/Shared.Rcl/Commands/Services/Rename/ServiceRenameCommand.cs @@ -14,7 +14,7 @@ public class ServiceRenameSettings : ServiceNameSettings { public class ServiceRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServiceRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/ServiceAddCommand.cs b/Shared.Rcl/Commands/Services/ServiceAddCommand.cs index 8debde17..a08f1342 100644 --- a/Shared.Rcl/Commands/Services/ServiceAddCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceAddCommand.cs @@ -16,7 +16,7 @@ public class ServiceAddSettings : CommandSettings { public class ServiceAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServiceAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/ServiceDeleteCommand.cs b/Shared.Rcl/Commands/Services/ServiceDeleteCommand.cs index ff43d2a3..0f1863c1 100644 --- a/Shared.Rcl/Commands/Services/ServiceDeleteCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Services; public class ServiceDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServiceNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/ServiceDescribeCommand.cs b/Shared.Rcl/Commands/Services/ServiceDescribeCommand.cs index a3a1e06c..13243095 100644 --- a/Shared.Rcl/Commands/Services/ServiceDescribeCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceDescribeCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Services; public class ServiceDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServiceNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/ServiceGetByNameCommand.cs b/Shared.Rcl/Commands/Services/ServiceGetByNameCommand.cs index 02844551..c79028ef 100644 --- a/Shared.Rcl/Commands/Services/ServiceGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Services; public class ServiceGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServiceNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/ServiceGetCommand.cs b/Shared.Rcl/Commands/Services/ServiceGetCommand.cs index 8a6a8dcf..95986de0 100644 --- a/Shared.Rcl/Commands/Services/ServiceGetCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Services; public class ServiceGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/Services/ServiceReportCommand.cs b/Shared.Rcl/Commands/Services/ServiceReportCommand.cs index d4cd4e3a..d15868df 100644 --- a/Shared.Rcl/Commands/Services/ServiceReportCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceReportCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Services; public class ServiceReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); ServiceReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Services/ServiceSetCommand.cs b/Shared.Rcl/Commands/Services/ServiceSetCommand.cs index 93d4bed1..1534597a 100644 --- a/Shared.Rcl/Commands/Services/ServiceSetCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceSetCommand.cs @@ -32,7 +32,7 @@ public class ServiceSetSettings : ServerNameSettings { public class ServiceSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, ServiceSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Services/ServiceSubnetsCommand.cs b/Shared.Rcl/Commands/Services/ServiceSubnetsCommand.cs index 2e9d2caf..ab287366 100644 --- a/Shared.Rcl/Commands/Services/ServiceSubnetsCommand.cs +++ b/Shared.Rcl/Commands/Services/ServiceSubnetsCommand.cs @@ -35,7 +35,7 @@ private static uint IpToUInt32(string ip) { } - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, Settings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Switches/Labels/SwitchLabelAddCommand.cs b/Shared.Rcl/Commands/Switches/Labels/SwitchLabelAddCommand.cs index ba44d8b2..ca565d71 100644 --- a/Shared.Rcl/Commands/Switches/Labels/SwitchLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Switches/Labels/SwitchLabelAddCommand.cs @@ -12,7 +12,7 @@ public class SwitchLabelAddSettings : SwitchNameSettings { } public class SwitchLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, SwitchLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, SwitchLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Switches/Labels/SwitchLabelRemoveCommand.cs b/Shared.Rcl/Commands/Switches/Labels/SwitchLabelRemoveCommand.cs index 7d32d8bb..d25c9f54 100644 --- a/Shared.Rcl/Commands/Switches/Labels/SwitchLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Switches/Labels/SwitchLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class SwitchLabelRemoveSettings : SwitchNameSettings { } public class SwitchLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, SwitchLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, SwitchLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Switches/Ports/SwitchPortAddCommand.cs b/Shared.Rcl/Commands/Switches/Ports/SwitchPortAddCommand.cs index 0cf096f7..2a8c37f2 100644 --- a/Shared.Rcl/Commands/Switches/Ports/SwitchPortAddCommand.cs +++ b/Shared.Rcl/Commands/Switches/Ports/SwitchPortAddCommand.cs @@ -23,7 +23,7 @@ public class SwitchPortAddSettings : SwitchNameSettings { public class SwitchPortAddCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, SwitchPortAddSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, SwitchPortAddSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IAddPortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Switches/Ports/SwitchPortRemoveCommand.cs b/Shared.Rcl/Commands/Switches/Ports/SwitchPortRemoveCommand.cs index a5c5c38d..86caa13e 100644 --- a/Shared.Rcl/Commands/Switches/Ports/SwitchPortRemoveCommand.cs +++ b/Shared.Rcl/Commands/Switches/Ports/SwitchPortRemoveCommand.cs @@ -12,7 +12,7 @@ public class SwitchPortRemoveSettings : SwitchNameSettings { public class SwitchPortRemoveCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, SwitchPortRemoveSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, SwitchPortRemoveSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IRemovePortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Switches/Ports/SwitchPortUpdateCommand.cs b/Shared.Rcl/Commands/Switches/Ports/SwitchPortUpdateCommand.cs index 72392300..2b508b8a 100644 --- a/Shared.Rcl/Commands/Switches/Ports/SwitchPortUpdateCommand.cs +++ b/Shared.Rcl/Commands/Switches/Ports/SwitchPortUpdateCommand.cs @@ -18,7 +18,7 @@ public class SwitchPortUpdateSettings : SwitchNameSettings { public class SwitchPortUpdateCommand(IServiceProvider sp) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext ctx, SwitchPortUpdateSettings s, CancellationToken ct) { + protected override async Task ExecuteAsync(CommandContext ctx, SwitchPortUpdateSettings s, CancellationToken ct) { using IServiceScope scope = sp.CreateScope(); IUpdatePortUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Switches/Rename/SwitchRenameCommand.cs b/Shared.Rcl/Commands/Switches/Rename/SwitchRenameCommand.cs index 0e06fd17..cdae8964 100644 --- a/Shared.Rcl/Commands/Switches/Rename/SwitchRenameCommand.cs +++ b/Shared.Rcl/Commands/Switches/Rename/SwitchRenameCommand.cs @@ -14,7 +14,7 @@ public class SwitchRenameSettings : SwitchNameSettings { public class SwitchRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SwitchRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Switches/SwitchAddCommand.cs b/Shared.Rcl/Commands/Switches/SwitchAddCommand.cs index 86079286..10beeafc 100644 --- a/Shared.Rcl/Commands/Switches/SwitchAddCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchAddCommand.cs @@ -13,7 +13,7 @@ public class SwitchAddSettings : CommandSettings { public class SwitchAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SwitchAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Switches/SwitchDeleteCommand.cs b/Shared.Rcl/Commands/Switches/SwitchDeleteCommand.cs index ef06085d..0a6bd69f 100644 --- a/Shared.Rcl/Commands/Switches/SwitchDeleteCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Switches; public class SwitchDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SwitchNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Switches/SwitchDescribeCommand.cs b/Shared.Rcl/Commands/Switches/SwitchDescribeCommand.cs index f8b5a943..14f90a5a 100644 --- a/Shared.Rcl/Commands/Switches/SwitchDescribeCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchDescribeCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Switches; public class SwitchDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SwitchNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Switches/SwitchGetByNameCommand.cs b/Shared.Rcl/Commands/Switches/SwitchGetByNameCommand.cs index 6203a51b..b5bd66fb 100644 --- a/Shared.Rcl/Commands/Switches/SwitchGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Switches; public class SwitchGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SwitchNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Switches/SwitchGetCommand.cs b/Shared.Rcl/Commands/Switches/SwitchGetCommand.cs index d9b1c27e..43312348 100644 --- a/Shared.Rcl/Commands/Switches/SwitchGetCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Switches; public class SwitchGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/Switches/SwitchReportCommand.cs b/Shared.Rcl/Commands/Switches/SwitchReportCommand.cs index db87115a..c2571c48 100644 --- a/Shared.Rcl/Commands/Switches/SwitchReportCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchReportCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Switches; public class SwitchReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); SwitchHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Switches/SwitchSetCommand.cs b/Shared.Rcl/Commands/Switches/SwitchSetCommand.cs index aef11392..0515b2c8 100644 --- a/Shared.Rcl/Commands/Switches/SwitchSetCommand.cs +++ b/Shared.Rcl/Commands/Switches/SwitchSetCommand.cs @@ -17,7 +17,7 @@ public class SwitchSetSettings : ServerNameSettings { public class SwitchSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SwitchSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/Drives/SystemDriveAddCommand.cs b/Shared.Rcl/Commands/Systems/Drives/SystemDriveAddCommand.cs index 7c0187e2..18574256 100644 --- a/Shared.Rcl/Commands/Systems/Drives/SystemDriveAddCommand.cs +++ b/Shared.Rcl/Commands/Systems/Drives/SystemDriveAddCommand.cs @@ -14,7 +14,7 @@ public class SystemDriveAddSettings : SystemNameSettings { public class SystemDriveAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemDriveAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/Drives/SystemDriveRemoveCommand.cs b/Shared.Rcl/Commands/Systems/Drives/SystemDriveRemoveCommand.cs index 017f0dec..f66fb7c8 100644 --- a/Shared.Rcl/Commands/Systems/Drives/SystemDriveRemoveCommand.cs +++ b/Shared.Rcl/Commands/Systems/Drives/SystemDriveRemoveCommand.cs @@ -12,7 +12,7 @@ public class SystemDriveRemoveSettings : SystemNameSettings { public class SystemDriveRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemDriveRemoveSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/Drives/SystemDriveUpdateCommand.cs b/Shared.Rcl/Commands/Systems/Drives/SystemDriveUpdateCommand.cs index 61920104..62687b55 100644 --- a/Shared.Rcl/Commands/Systems/Drives/SystemDriveUpdateCommand.cs +++ b/Shared.Rcl/Commands/Systems/Drives/SystemDriveUpdateCommand.cs @@ -16,7 +16,7 @@ public class SystemDriveUpdateSettings : SystemNameSettings { public class SystemDriveUpdateCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemDriveUpdateSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/Labels/SystemLabelAddCommand.cs b/Shared.Rcl/Commands/Systems/Labels/SystemLabelAddCommand.cs index dea48f4d..c4d749bf 100644 --- a/Shared.Rcl/Commands/Systems/Labels/SystemLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Systems/Labels/SystemLabelAddCommand.cs @@ -12,7 +12,7 @@ public class SystemLabelAddSettings : SystemNameSettings { } public class SystemLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, SystemLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, SystemLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = diff --git a/Shared.Rcl/Commands/Systems/Labels/SystemLabelRemoveCommand.cs b/Shared.Rcl/Commands/Systems/Labels/SystemLabelRemoveCommand.cs index 3478f263..b2042240 100644 --- a/Shared.Rcl/Commands/Systems/Labels/SystemLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Systems/Labels/SystemLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class SystemLabelRemoveSettings : SystemNameSettings { } public class SystemLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, SystemLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, SystemLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = diff --git a/Shared.Rcl/Commands/Systems/Rename/SystemRenameCommand.cs b/Shared.Rcl/Commands/Systems/Rename/SystemRenameCommand.cs index e541d27c..27e0c48c 100644 --- a/Shared.Rcl/Commands/Systems/Rename/SystemRenameCommand.cs +++ b/Shared.Rcl/Commands/Systems/Rename/SystemRenameCommand.cs @@ -14,7 +14,7 @@ public class SystemRenameSettings : SystemNameSettings { public class SystemRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/SystemAddCommand.cs b/Shared.Rcl/Commands/Systems/SystemAddCommand.cs index 96d2b520..74d97aa1 100644 --- a/Shared.Rcl/Commands/Systems/SystemAddCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemAddCommand.cs @@ -13,7 +13,7 @@ public class SystemAddSettings : CommandSettings { public class SystemAddCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/SystemDeleteCommand.cs b/Shared.Rcl/Commands/Systems/SystemDeleteCommand.cs index a80f1c27..179882cf 100644 --- a/Shared.Rcl/Commands/Systems/SystemDeleteCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemDeleteCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Systems; public class SystemDeleteCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/SystemDescribeCommand.cs b/Shared.Rcl/Commands/Systems/SystemDescribeCommand.cs index d7fe8d5a..84afc77a 100644 --- a/Shared.Rcl/Commands/Systems/SystemDescribeCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemDescribeCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Systems; public class SystemDescribeCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/SystemGetByNameCommand.cs b/Shared.Rcl/Commands/Systems/SystemGetByNameCommand.cs index d54d1bd0..94daa46e 100644 --- a/Shared.Rcl/Commands/Systems/SystemGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemGetByNameCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Systems; public class SystemGetByNameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/SystemGetCommand.cs b/Shared.Rcl/Commands/Systems/SystemGetCommand.cs index b4bb15e0..6c2267fe 100644 --- a/Shared.Rcl/Commands/Systems/SystemGetCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemGetCommand.cs @@ -9,7 +9,7 @@ namespace Shared.Rcl.Commands.Systems; public class SystemGetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); diff --git a/Shared.Rcl/Commands/Systems/SystemReportCommand.cs b/Shared.Rcl/Commands/Systems/SystemReportCommand.cs index 26006320..084c0e13 100644 --- a/Shared.Rcl/Commands/Systems/SystemReportCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemReportCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Systems; public class SystemReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); SystemReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Systems/SystemSetCommand.cs b/Shared.Rcl/Commands/Systems/SystemSetCommand.cs index 1a7a5356..77d7adce 100644 --- a/Shared.Rcl/Commands/Systems/SystemSetCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemSetCommand.cs @@ -28,7 +28,7 @@ public class SystemSetSettings : ServerNameSettings { public class SystemSetCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Systems/SystemTreeCommand.cs b/Shared.Rcl/Commands/Systems/SystemTreeCommand.cs index cf7c403b..036e0b99 100644 --- a/Shared.Rcl/Commands/Systems/SystemTreeCommand.cs +++ b/Shared.Rcl/Commands/Systems/SystemTreeCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Systems; public sealed class SystemTreeCommand(GetSystemServiceTreeUseCase useCase) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, SystemNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Ups/Labels/UpsLabelAddCommand.cs b/Shared.Rcl/Commands/Ups/Labels/UpsLabelAddCommand.cs index af2078ea..c1855db0 100644 --- a/Shared.Rcl/Commands/Ups/Labels/UpsLabelAddCommand.cs +++ b/Shared.Rcl/Commands/Ups/Labels/UpsLabelAddCommand.cs @@ -12,7 +12,7 @@ public class UpsLabelAddSettings : UpsNameSettings { } public class UpsLabelAddCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, UpsLabelAddSettings settings, + protected override async Task ExecuteAsync(CommandContext context, UpsLabelAddSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IAddLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Ups/Labels/UpsLabelRemoveCommand.cs b/Shared.Rcl/Commands/Ups/Labels/UpsLabelRemoveCommand.cs index 460b6229..d95129c1 100644 --- a/Shared.Rcl/Commands/Ups/Labels/UpsLabelRemoveCommand.cs +++ b/Shared.Rcl/Commands/Ups/Labels/UpsLabelRemoveCommand.cs @@ -11,7 +11,7 @@ public class UpsLabelRemoveSettings : UpsNameSettings { } public class UpsLabelRemoveCommand(IServiceProvider serviceProvider) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, UpsLabelRemoveSettings settings, + protected override async Task ExecuteAsync(CommandContext context, UpsLabelRemoveSettings settings, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); IRemoveLabelUseCase useCase = scope.ServiceProvider.GetRequiredService>(); diff --git a/Shared.Rcl/Commands/Ups/Rename/UpsRenameCommand.cs b/Shared.Rcl/Commands/Ups/Rename/UpsRenameCommand.cs index d420a637..539defb7 100644 --- a/Shared.Rcl/Commands/Ups/Rename/UpsRenameCommand.cs +++ b/Shared.Rcl/Commands/Ups/Rename/UpsRenameCommand.cs @@ -15,7 +15,7 @@ public class UpsRenameSettings : UpsNameSettings { public class UpsRenameCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, UpsRenameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Ups/UpsAddCommand.cs b/Shared.Rcl/Commands/Ups/UpsAddCommand.cs index 8b437e27..f416d3dc 100644 --- a/Shared.Rcl/Commands/Ups/UpsAddCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsAddCommand.cs @@ -11,7 +11,7 @@ public class UpsAddSettings : CommandSettings { public class UpsAddCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, UpsAddSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Ups/UpsDeleteCommand.cs b/Shared.Rcl/Commands/Ups/UpsDeleteCommand.cs index badc86ae..dbd10f40 100644 --- a/Shared.Rcl/Commands/Ups/UpsDeleteCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsDeleteCommand.cs @@ -11,7 +11,7 @@ public class UpsNameSettings : CommandSettings { public class UpsDeleteCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, UpsNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Ups/UpsDescribeCommand.cs b/Shared.Rcl/Commands/Ups/UpsDescribeCommand.cs index b2380617..4ba841e8 100644 --- a/Shared.Rcl/Commands/Ups/UpsDescribeCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsDescribeCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Ups; public class UpsDescribeCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, UpsNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Ups/UpsGetByNameCommand.cs b/Shared.Rcl/Commands/Ups/UpsGetByNameCommand.cs index 04f9398c..46668980 100644 --- a/Shared.Rcl/Commands/Ups/UpsGetByNameCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsGetByNameCommand.cs @@ -7,7 +7,7 @@ namespace Shared.Rcl.Commands.Ups; public class UpsGetByNameCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, UpsNameSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Commands/Ups/UpsGetCommand.cs b/Shared.Rcl/Commands/Ups/UpsGetCommand.cs index bf49e33c..dbc72927 100644 --- a/Shared.Rcl/Commands/Ups/UpsGetCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsGetCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Ups; public class UpsGetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = provider.CreateScope(); diff --git a/Shared.Rcl/Commands/Ups/UpsReportCommand.cs b/Shared.Rcl/Commands/Ups/UpsReportCommand.cs index 581fb73b..02afabc9 100644 --- a/Shared.Rcl/Commands/Ups/UpsReportCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsReportCommand.cs @@ -8,7 +8,7 @@ namespace Shared.Rcl.Commands.Ups; public class UpsReportCommand( IServiceProvider serviceProvider ) : AsyncCommand { - public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + protected override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { using IServiceScope scope = serviceProvider.CreateScope(); UpsHardwareReportUseCase useCase = scope.ServiceProvider.GetRequiredService(); diff --git a/Shared.Rcl/Commands/Ups/UpsSetCommand.cs b/Shared.Rcl/Commands/Ups/UpsSetCommand.cs index a776bd94..947051f3 100644 --- a/Shared.Rcl/Commands/Ups/UpsSetCommand.cs +++ b/Shared.Rcl/Commands/Ups/UpsSetCommand.cs @@ -13,7 +13,7 @@ public class UpsSetSettings : ServerNameSettings { public class UpsSetCommand(IServiceProvider provider) : AsyncCommand { - public override async Task ExecuteAsync( + protected override async Task ExecuteAsync( CommandContext context, UpsSetSettings settings, CancellationToken cancellationToken) { diff --git a/Shared.Rcl/Shared.Rcl.csproj b/Shared.Rcl/Shared.Rcl.csproj index 7a6291ca..aacd7a7b 100644 --- a/Shared.Rcl/Shared.Rcl.csproj +++ b/Shared.Rcl/Shared.Rcl.csproj @@ -14,10 +14,10 @@ - - - - + + + + diff --git a/Tests.E2e/Tests.E2e.csproj b/Tests.E2e/Tests.E2e.csproj index 59cbcb28..deb09612 100644 --- a/Tests.E2e/Tests.E2e.csproj +++ b/Tests.E2e/Tests.E2e.csproj @@ -8,15 +8,15 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index c54fe150..d8ea79a1 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -8,16 +8,16 @@ - - - + + + - - - - - + + + + + From d8128c7a0f879a9cfbdba95ddb19735905898877 Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 11:18:48 +0100 Subject: [PATCH 02/10] remove stale config artefacts --- RackPeek.Web/config copy/Services.yaml | 636 --------------------- RackPeek.Web/config copy/Systems.yaml | 208 ------- RackPeek.Web/config copy/accesspoints.yaml | 36 -- RackPeek.Web/config copy/desktops.yaml | 22 - RackPeek.Web/config copy/firewalls.yaml | 14 - RackPeek.Web/config copy/laptops.yaml | 17 - RackPeek.Web/config copy/routers.yaml | 14 - RackPeek.Web/config copy/servers.yaml | 421 -------------- RackPeek.Web/config copy/switches.yaml | 1 - RackPeek.Web/config copy/ups.yaml | 6 - config/config.yaml | 29 - 11 files changed, 1404 deletions(-) delete mode 100644 RackPeek.Web/config copy/Services.yaml delete mode 100644 RackPeek.Web/config copy/Systems.yaml delete mode 100644 RackPeek.Web/config copy/accesspoints.yaml delete mode 100644 RackPeek.Web/config copy/desktops.yaml delete mode 100644 RackPeek.Web/config copy/firewalls.yaml delete mode 100644 RackPeek.Web/config copy/laptops.yaml delete mode 100644 RackPeek.Web/config copy/routers.yaml delete mode 100644 RackPeek.Web/config copy/servers.yaml delete mode 100644 RackPeek.Web/config copy/switches.yaml delete mode 100644 RackPeek.Web/config copy/ups.yaml delete mode 100644 config/config.yaml diff --git a/RackPeek.Web/config copy/Services.yaml b/RackPeek.Web/config copy/Services.yaml deleted file mode 100644 index 0b2b9f7b..00000000 --- a/RackPeek.Web/config copy/Services.yaml +++ /dev/null @@ -1,636 +0,0 @@ -resources: - - kind: Service - network: - ip: 192.168.0.10 - port: 8096 - protocol: TCP - url: http://jellyfin.lan:8096 - runsOn: docker-host - name: jellyfin - tags: - - kind: Service - network: - ip: 192.168.0.11 - port: 32400 - protocol: TCP - url: http://plex.lan:32400 - runsOn: proxmox-host - name: plex - tags: - - kind: Service - network: - ip: 192.168.1.20 - port: 8123 - protocol: TCP - url: http://ha.lan:8123 - runsOn: k8s-node-1 - name: home-assistant - tags: - - kind: Service - network: - ip: 192.168.1.2 - port: 53 - protocol: UDP - url: http://pihole.lan/admin - runsOn: baremetal-rpi4 - name: pihole - tags: - - kind: Service - network: - ip: 192.168.1.5 - port: 8443 - protocol: TCP - url: https://unifi.lan:8443 - runsOn: vm-cluster-1 - name: unifi-controller - tags: - - kind: Service - network: - ip: 10.0.0.15 - port: 8384 - protocol: TCP - url: http://sync.internal:8384 - runsOn: docker-host - name: syncthing - tags: - - kind: Service - network: - ip: 10.0.0.20 - port: 3000 - protocol: TCP - url: http://grafana.internal:3000 - runsOn: monitoring-node - name: grafana - tags: - - kind: Service - network: - ip: 10.0.0.21 - port: 9090 - protocol: TCP - url: http://prometheus.internal:9090 - runsOn: monitoring-node - name: prometheus - tags: - - kind: Service - network: - ip: 10.0.0.22 - port: 3100 - protocol: TCP - url: http://loki.internal:3100 - runsOn: monitoring-node - name: loki - tags: - - kind: Service - network: - ip: 172.16.0.10 - port: 9000 - protocol: TCP - url: http://minio.storage:9000 - runsOn: storage-node-1 - name: minio - tags: - - kind: Service - network: - ip: 172.16.0.11 - port: 443 - protocol: TCP - url: https://nextcloud.storage - runsOn: storage-node-2 - name: nextcloud - tags: - - kind: Service - network: - ip: 192.168.0.30 - port: 8081 - protocol: TCP - url: http://vault.lan:8081 - runsOn: docker-host - name: vaultwarden - tags: - - kind: Service - network: - ip: 192.168.0.2 - port: 80 - protocol: TCP - url: http://traefik.lan - runsOn: k8s-node-1 - name: traefik - tags: - - kind: Service - network: - ip: 192.168.0.3 - port: 443 - protocol: TCP - url: https://proxy.lan - runsOn: docker-host - name: nginx-reverse-proxy - tags: - - kind: Service - network: - ip: 192.168.0.40 - port: 8080 - protocol: TCP - url: http://torrent.lan:8080 - runsOn: proxmox-host - name: qbittorrent - tags: - - kind: Service - network: - ip: 192.168.0.41 - port: 7878 - protocol: TCP - url: http://radarr.lan:7878 - runsOn: docker-host - name: radarr - tags: - - kind: Service - network: - ip: 192.168.0.43 - port: 9696 - protocol: TCP - url: http://prowlarr.lan:9696 - runsOn: docker-host - name: prowlarr - tags: - - kind: Service - network: - ip: 192.168.0.43 - port: 9696 - protocol: TCP - url: http://prowlarr.lan:9696 - runsOn: docker-host - name: prowlarr - tags: - - kind: Service - network: - ip: 192.168.0.44 - port: 8085 - protocol: TCP - url: http://sabnzbd.lan:8085 - runsOn: docker-host - name: sabnzbd - tags: - - kind: Service - network: - ip: 192.168.1.31 - port: 1883 - protocol: TCP - url: mqtt://mqtt.lan:1883 - runsOn: docker-host - name: mosquitto-mqtt - tags: - - kind: Service - network: - ip: 192.168.1.32 - port: 8080 - protocol: TCP - url: http://z2m.lan:8080 - runsOn: docker-host - name: zigbee2mqtt - tags: - - kind: Service - network: - ip: 10.0.1.10 - port: 5432 - protocol: TCP - url: postgres://db.internal:5432 - runsOn: db-node-1 - name: postgres-main - tags: - - kind: Service - network: - ip: 10.0.1.11 - port: 3306 - protocol: TCP - url: mysql://mariadb.internal:3306 - runsOn: db-node-2 - name: mariadb - tags: - - kind: Service - network: - ip: 10.0.1.12 - port: 6379 - protocol: TCP - url: redis://redis.internal:6379 - runsOn: cache-node - name: redis-cache - tags: - - kind: Service - network: - ip: 10.0.2.10 - port: 9200 - protocol: TCP - url: http://es.internal:9200 - runsOn: search-node - name: elasticsearch - tags: - - kind: Service - network: - ip: 10.0.2.11 - port: 5601 - protocol: TCP - url: http://kibana.internal:5601 - runsOn: search-node - name: kibana - tags: - - kind: Service - network: - ip: 192.168.0.50 - port: 3001 - protocol: TCP - url: http://uptime.lan:3001 - runsOn: docker-host - name: uptime-kuma - tags: - - kind: Service - network: - ip: 192.168.1.100 - port: 51820 - protocol: UDP - url: wg://vpn.lan - runsOn: baremetal-rpi4 - name: wireguard-vpn - tags: - - kind: Service - network: - ip: 192.168.1.101 - port: 1194 - protocol: UDP - url: ovpn://openvpn.lan - runsOn: vm-cluster-2 - name: openvpn - tags: - - kind: Service - network: - ip: 10.0.3.10 - port: 443 - protocol: TCP - url: https://gitlab.internal - runsOn: dev-node-1 - name: gitlab - tags: - - kind: Service - network: - ip: 10.0.3.11 - port: 3000 - protocol: TCP - url: http://gitea.internal:3000 - runsOn: dev-node-2 - name: gitea - tags: - - kind: Service - network: - ip: 10.0.3.12 - port: 8080 - protocol: TCP - url: http://drone.internal:8080 - runsOn: dev-node-2 - name: drone-ci - tags: - - kind: Service - network: - ip: 10.0.3.13 - port: 5000 - protocol: TCP - url: http://harbor.internal:5000 - runsOn: dev-node-3 - name: harbor-registry - tags: - - kind: Service - network: - ip: 10.0.4.1 - port: 6443 - protocol: TCP - url: https://k8s-api.internal:6443 - runsOn: k8s-control-plane - name: kubernetes-api - tags: - - kind: Service - network: - ip: 10.0.4.20 - port: 9500 - protocol: TCP - url: http://longhorn.internal:9500 - runsOn: k8s-node-3 - name: longhorn-ui - tags: - - kind: Service - network: - ip: 10.0.4.21 - port: 8443 - protocol: TCP - url: https://ceph.internal:8443 - runsOn: k8s-node-3 - name: rook-ceph-dashboard - tags: - - kind: Service - network: - ip: 192.168.0.60 - port: 445 - protocol: TCP - url: smb://fileserver.lan - runsOn: storage-node-1 - name: samba-fileserver - tags: - - kind: Service - network: - ip: 192.168.0.61 - port: 2049 - protocol: TCP - url: nfs://nfs.lan - runsOn: dell-c6400-node01 - name: nfs-server - tags: - - kind: Service - network: - ip: 172.16.1.10 - port: 3260 - protocol: TCP - url: iscsi://iscsi.storage - runsOn: storage-node-3 - name: iscsi-target - tags: - - kind: Service - network: - ip: 192.168.0.70 - port: 8083 - protocol: TCP - url: http://books.lan:8083 - runsOn: docker-host - name: calibre-web - tags: - - kind: Service - network: - ip: 192.168.0.71 - port: 8000 - protocol: TCP - url: http://docs.lan:8000 - runsOn: dell-c6400-node01 - name: paperless-ngx - tags: - - kind: Service - network: - ip: 10.0.5.10 - port: 389 - protocol: TCP - url: ldap://ldap.internal:389 - runsOn: dell-c6400-node01 - name: openldap - tags: - - kind: Service - network: - ip: 10.0.5.10 - port: 389 - protocol: TCP - url: ldap://ldap.internal:389 - runsOn: dell-c6400-node01 - name: openldap - tags: - - kind: Service - network: - ip: 192.168.1.50 - port: 123 - protocol: UDP - url: ntp://ntp.lan - runsOn: baremetal-rpi3 - name: ntp-server - tags: - - kind: Service - network: - ip: 10.0.6.10 - port: 514 - protocol: UDP - url: syslog://syslog.internal - runsOn: monitoring-node - name: syslog-server - tags: - - kind: Service - network: - ip: 192.168.1.1 - port: 67 - protocol: UDP - url: dhcp://dhcp.lan - runsOn: router-appliance - name: dhcp-server - tags: - - kind: Service - network: - ip: 10.0.7.10 - port: 53 - protocol: UDP - url: dns://dns.internal - runsOn: infra-node - name: bind-dns - tags: - - kind: Service - network: - ip: 10.0.7.11 - port: 8200 - protocol: TCP - url: http://vault.internal:8200 - runsOn: infra-node - name: vault - tags: - - kind: Service - network: - ip: 10.0.7.12 - port: 8500 - protocol: TCP - url: http://consul.internal:8500 - runsOn: infra-node - name: consul - tags: - - kind: Service - network: - ip: 10.0.7.13 - port: 4646 - protocol: TCP - url: http://nomad.internal:4646 - runsOn: infra-node - name: nomad - tags: - - kind: Service - network: - ip: 192.168.1.40 - port: 8080 - protocol: TCP - url: http://openhab.lan:8080 - runsOn: k8s-node-2 - name: openhab - tags: - - kind: Service - network: - ip: 192.168.1.41 - port: 4000 - protocol: TCP - url: http://mqtt-explorer.lan:4000 - runsOn: docker-host - name: mqtt-explorer - tags: - - kind: Service - network: - ip: 10.0.8.10 - port: 8086 - protocol: TCP - url: http://influx.internal:8086 - runsOn: monitoring-node - name: influxdb - tags: - - kind: Service - network: - ip: 10.0.8.11 - port: 8125 - protocol: UDP - url: statsd://telegraf.internal - runsOn: monitoring-node - name: telegraf - tags: - - kind: Service - network: - ip: 192.168.0.80 - port: 8080 - protocol: TCP - url: http://speedtest.lan:8080 - runsOn: docker-host - name: speedtest-tracker - tags: - - kind: Service - network: - ip: 192.168.0.81 - port: 4533 - protocol: TCP - url: http://music.lan:4533 - runsOn: docker-host - name: navidrome - tags: - - kind: Service - network: - ip: 192.168.0.82 - port: 2342 - protocol: TCP - url: http://photos.lan:2342 - runsOn: docker-host - name: photoprism - tags: - - kind: Service - network: - ip: 10.0.9.10 - port: 53 - protocol: UDP - url: dns://dnsdist.internal - runsOn: infra-node - name: dnsdist - tags: - - kind: Service - network: - ip: 10.0.9.11 - port: 8081 - protocol: TCP - url: http://pdns.internal:8081 - runsOn: infra-node - name: powerdns - tags: - - kind: Service - network: - ip: 10.0.10.10 - port: 8080 - protocol: TCP - url: http://openproject.internal:8080 - runsOn: dev-node-3 - name: openproject - tags: - - kind: Service - network: - ip: 10.0.10.11 - port: 8065 - protocol: TCP - url: http://chat.internal:8065 - runsOn: dev-node-3 - name: mattermost - tags: - - kind: Service - network: - ip: 10.0.10.12 - port: 3000 - protocol: TCP - url: http://rocket.internal:3000 - runsOn: dev-node-3 - name: rocket-chat - tags: - - kind: Service - network: - ip: 192.168.0.4 - port: 80801 - protocol: TCP - url: http://immich.lan:8080 - runsOn: proxmox-host - name: immich - tags: - - kind: Service - network: - ip: 192.168.1.3 - port: 3002 - protocol: TCP - url: http://adguard.lan:3002 - runsOn: docker-host - name: adguard-home - tags: - - kind: Server - cpus: - ram: - drives: - nics: - gpus: - ipmi: - name: test - tags: - - kind: Server - cpus: - ram: - drives: - nics: - gpus: - ipmi: - name: mr-server - tags: - - kind: Server - cpus: - ram: - drives: - nics: - gpus: - ipmi: - name: new server - tags: - - kind: Server - cpus: - ram: - drives: - nics: - gpus: - ipmi: - name: new server - tags: - - kind: System - type: - os: - cores: - ram: - drives: - runsOn: - name: new-system - tags: - - kind: System - type: - os: - cores: - ram: - drives: - runsOn: - name: new-system - tags: - - kind: Service - network: - runsOn: - name: new-service - tags: diff --git a/RackPeek.Web/config copy/Systems.yaml b/RackPeek.Web/config copy/Systems.yaml deleted file mode 100644 index ee540931..00000000 --- a/RackPeek.Web/config copy/Systems.yaml +++ /dev/null @@ -1,208 +0,0 @@ -resources: - - kind: System - type: KubernetesNode - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: k8s-node-1 - tags: - - kind: System - type: KubernetesNode - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: k8s-node-2 - tags: - - kind: System - type: KubernetesNode - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: k8s-node-3 - tags: - - kind: System - type: KubernetesControlPlane - os: ubuntu - cores: 4 - ram: 16 - drives: - runsOn: dell-c6400-node01 - name: k8s-control-plane - tags: - - kind: System - type: Monitoring - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: monitoring-node - tags: - - kind: System - type: Storage - os: truenas - cores: 8 - ram: 64 - drives: - runsOn: dell-c6400-node01 - name: storage-node-1 - tags: - - kind: System - type: Storage - os: truenas - cores: 8 - ram: 64 - drives: - runsOn: dell-c6400-node01 - name: storage-node-2 - tags: - - kind: System - type: Storage - os: truenas - cores: 8 - ram: 64 - drives: - runsOn: dell-c6400-node01 - name: storage-node-3 - tags: - - kind: System - type: Database - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: db-node-1 - tags: - - kind: System - type: Database - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: db-node-2 - tags: - - kind: System - type: Cache - os: ubuntu - cores: 4 - ram: 16 - drives: - runsOn: dell-c6400-node01 - name: cache-node - tags: - - kind: System - type: Search - os: ubuntu - cores: 8 - ram: 32 - drives: - runsOn: dell-c6400-node01 - name: search-node - tags: - - kind: System - type: Development - os: ubuntu - cores: 4 - ram: 16 - drives: - runsOn: dell-c6400-node01 - name: dev-node-1 - tags: - - kind: System - type: Development - os: ubuntu - cores: 4 - ram: 16 - drives: - runsOn: dell-c6400-node01 - name: dev-node-2 - tags: - - kind: System - type: Development - os: ubuntu - cores: 6 - ram: 24 - drives: - runsOn: dell-c6400-node01 - name: dev-node-3 - tags: - - kind: System - type: VirtualMachineCluster - os: proxmox - cores: 12 - ram: 48 - drives: - runsOn: dell-c6400-node01 - name: vm-cluster-1 - tags: - - kind: System - type: BareMetal - os: raspbian - cores: 4 - ram: 8 - drives: - runsOn: rack-edge - name: baremetal-rpi4 - tags: - - kind: System - type: BareMetal - os: raspbian - cores: 4 - ram: 4 - drives: - runsOn: rack-edge - name: baremetal-rpi3 - tags: - - kind: System - type: Infrastructure - os: ubuntu - cores: 4 - ram: 16 - drives: - runsOn: dell-c6400-node01 - name: infra-node - tags: - - kind: System - type: NetworkAppliance - os: openwrt - cores: 2 - ram: 2 - drives: - runsOn: network-rack - name: router-appliance - tags: - - kind: System - type: Hypervisor - os: proxmox - cores: 16 - ram: 61 - drives: - runsOn: dell-c6400-node01 - name: proxmox-host - tags: - - kind: System - type: ContainerHost - os: ubuntu - cores: 12 - ram: 26 - drives: - runsOn: dell-c6400-node01 - name: docker-host - tags: - - kind: System - type: VirtualMachineCluster - os: proxmox - cores: 13 - ram: 44 - drives: - runsOn: dell-c6400-node01 - name: vm-cluster-2 - tags: diff --git a/RackPeek.Web/config copy/accesspoints.yaml b/RackPeek.Web/config copy/accesspoints.yaml deleted file mode 100644 index 391f80d1..00000000 --- a/RackPeek.Web/config copy/accesspoints.yaml +++ /dev/null @@ -1,36 +0,0 @@ -resources: - - kind: AccessPoint - model: Unifi-Ap-Pro-7 - speed: 1 - name: lounge-ap - tags: - - kind: AccessPoint - model: Unifi-Ap-Pro-7 - speed: 1 - name: lounge-ap - tags: - - kind: AccessPoint - model: Unifi-U6-Lite - speed: 1 - name: office-ap - tags: - - kind: AccessPoint - model: TP-Link-EAP245 - speed: 1 - name: garage-ap - tags: - - kind: AccessPoint - model: Aruba-AP-515 - speed: 2.5 - name: upstairs-ap - tags: - - kind: AccessPoint - model: Unifi-U6-Mesh - speed: 1 - name: guest-ap - tags: - - kind: AccessPoint - model: Cisco-Aironet-1832i - speed: 1 - name: warehouse-ap - tags: diff --git a/RackPeek.Web/config copy/desktops.yaml b/RackPeek.Web/config copy/desktops.yaml deleted file mode 100644 index e7e4ffb8..00000000 --- a/RackPeek.Web/config copy/desktops.yaml +++ /dev/null @@ -1,22 +0,0 @@ -resources: - - kind: Desktop - cpus: - - model: Intel(R) Core(TM) i5-9500 - cores: 6 - threads: 6 - ram: - size: 16 - mts: 2666 - drives: - - type: ssd - size: 512 - nics: - - type: rj45 - speed: 1 - ports: 1 - gpus: - - model: RTX 3080 - vram: 12 - model: - name: dell-optiplex - tags: diff --git a/RackPeek.Web/config copy/firewalls.yaml b/RackPeek.Web/config copy/firewalls.yaml deleted file mode 100644 index 10c7ee88..00000000 --- a/RackPeek.Web/config copy/firewalls.yaml +++ /dev/null @@ -1,14 +0,0 @@ -resources: - - kind: Firewall - model: pfSense-1100 - managed: true - poe: true - ports: - - type: rj45 - speed: 1 - count: 8 - - type: sfp - speed: 10 - count: 2 - name: pfsense - tags: diff --git a/RackPeek.Web/config copy/laptops.yaml b/RackPeek.Web/config copy/laptops.yaml deleted file mode 100644 index 7242dac6..00000000 --- a/RackPeek.Web/config copy/laptops.yaml +++ /dev/null @@ -1,17 +0,0 @@ -resources: - - kind: Laptop - cpus: - - model: Intel(R) Core(TM) i7-10510U - cores: 4 - threads: 8 - ram: - size: 16 - mts: 2666 - drives: - - type: ssd - size: 1024 - gpus: - - model: RTX 3080 - vram: 12 - name: thinkpad-x1 - tags: diff --git a/RackPeek.Web/config copy/routers.yaml b/RackPeek.Web/config copy/routers.yaml deleted file mode 100644 index 731a9155..00000000 --- a/RackPeek.Web/config copy/routers.yaml +++ /dev/null @@ -1,14 +0,0 @@ -resources: - - kind: Router - model: ER-4 - managed: true - poe: true - ports: - - type: rj45 - speed: 1 - count: 8 - - type: sfp - speed: 10 - count: 2 - name: ubiquiti-edge-router - tags: diff --git a/RackPeek.Web/config copy/servers.yaml b/RackPeek.Web/config copy/servers.yaml deleted file mode 100644 index e3622bfe..00000000 --- a/RackPeek.Web/config copy/servers.yaml +++ /dev/null @@ -1,421 +0,0 @@ -resources: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4110 - cores: 8 - threads: 16 - ram: - size: 64 - mts: 2400 - drives: - - type: ssd - size: 480 - - type: ssd - size: 480 - nics: - - type: rj45 - speed: 1 - ports: 2 - - type: sfp+ - speed: 10 - ports: 2 - gpus: - ipmi: true - name: dell-c6400-node01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4110 - cores: 8 - threads: 16 - ram: - size: 64 - mts: 2400 - drives: - - type: ssd - size: 480 - - type: ssd - size: 480 - nics: - - type: rj45 - speed: 1 - ports: 2 - - type: sfp+ - speed: 10 - ports: 2 - gpus: - ipmi: true - name: dell-c6400-node01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4110 - cores: 8 - threads: 16 - ram: - size: 128 - mts: 2400 - drives: - - type: ssd - size: 960 - nics: - - type: rj45 - speed: 1 - ports: 2 - - type: sfp+ - speed: 10 - ports: 2 - gpus: - ipmi: true - name: dell-c6400-node02 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4110 - cores: 8 - threads: 16 - ram: - size: 64 - mts: 2400 - drives: - - type: ssd - size: 480 - - type: ssd - size: 480 - nics: - - type: rj45 - speed: 1 - ports: 2 - - type: sfp+ - speed: 10 - ports: 2 - gpus: - ipmi: true - name: dell-c6400-node03 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4110 - cores: 8 - threads: 16 - ram: - size: 128 - mts: 2400 - drives: - - type: ssd - size: 960 - nics: - - type: rj45 - speed: 1 - ports: 2 - - type: sfp+ - speed: 10 - ports: 2 - gpus: - ipmi: true - name: dell-c6400-node04 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E5-2620 v4 - cores: 8 - threads: 16 - ram: - size: 64 - mts: 2133 - drives: - - type: hdd - size: 8192 - - type: hdd - size: 8192 - - type: hdd - size: 8192 - - type: hdd - size: 8192 - - type: ssd - size: 120 - nics: - - type: rj45 - speed: 1 - ports: 1 - - type: sfp+ - speed: 10 - ports: 1 - gpus: - ipmi: true - name: truenas-storage01 - tags: - - kind: Server - cpus: - - model: Intel(R) Core(TM) i5-8500 - cores: 6 - threads: 6 - ram: - size: 32 - mts: 2666 - drives: - - type: ssd - size: 512 - nics: - - type: rj45 - speed: 1 - ports: 4 - gpus: - ipmi: false - name: proxmox-edge01 - tags: - - kind: Server - cpus: - - model: Intel(R) Celeron(R) J4125 - cores: 4 - threads: 4 - ram: - size: 8 - mts: 2400 - drives: - - type: ssd - size: 64 - nics: - - type: rj45 - speed: 1 - ports: 4 - gpus: - ipmi: false - name: opnsense-fw01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E3-1270 v6 - cores: 4 - threads: 8 - ram: - size: 16 - mts: 2400 - drives: - - type: ssd - size: 256 - nics: - - type: rj45 - speed: 1 - ports: 1 - gpus: - ipmi: true - name: mgmt-bastion01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E5-2630 v4 - cores: 10 - threads: 20 - ram: - size: 64 - mts: 2133 - drives: - - type: hdd - size: 6144 - - type: hdd - size: 6144 - - type: hdd - size: 6144 - - type: hdd - size: 6144 - - type: ssd - size: 240 - nics: - - type: rj45 - speed: 1 - ports: 2 - - type: sfp+ - speed: 10 - ports: 1 - gpus: - ipmi: true - name: truenas-backup01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4214 - cores: 12 - threads: 24 - ram: - size: 128 - mts: 2666 - drives: - - type: ssd - size: 1024 - nics: - - type: sfp+ - speed: 10 - ports: 2 - gpus: - - model: NVIDIA Tesla P40 - vram: 24 - - model: NVIDIA Tesla P40 - vram: 24 - - model: NVIDIA Tesla P4 - vram: 8 - ipmi: true - name: compute-gpu01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E3-1240 v5 - cores: 4 - threads: 8 - ram: - size: 32 - mts: 2133 - drives: - - type: ssd - size: 512 - nics: - - type: rj45 - speed: 1 - ports: 2 - gpus: - ipmi: true - name: proxmox-lab01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E-2224 - cores: 4 - threads: 4 - ram: - size: 16 - mts: 2666 - drives: - - type: ssd - size: 256 - nics: - - type: rj45 - speed: 1 - ports: 2 - gpus: - ipmi: true - name: k8s-control01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E-2224 - cores: 4 - threads: 4 - ram: - size: 16 - mts: 2666 - drives: - - type: ssd - size: 256 - nics: - - type: rj45 - speed: 1 - ports: 2 - gpus: - ipmi: true - name: k8s-control02 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) Silver 4108 - cores: 8 - threads: 16 - ram: - size: 64 - mts: 2400 - drives: - - type: ssd - size: 1024 - - type: ssd - size: 1024 - nics: - - type: sfp+ - speed: 10 - ports: 1 - gpus: - ipmi: true - name: elk-logging01 - tags: - - kind: Server - cpus: - - model: Intel(R) Core(TM) i3-8100 - cores: 4 - threads: 4 - ram: - size: 16 - mts: 2400 - drives: - - type: ssd - size: 256 - nics: - - type: rj45 - speed: 1 - ports: 2 - gpus: - ipmi: false - name: edge-node01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E5-1650 v3 - cores: 6 - threads: 12 - ram: - size: 64 - mts: 2133 - drives: - - type: ssd - size: 480 - - type: hdd - size: 4096 - nics: - - type: rj45 - speed: 1 - ports: 4 - gpus: - ipmi: true - name: backup-proxmox01 - tags: - - kind: Server - cpus: - - model: Intel(R) Core(TM) i7-8700 - cores: 6 - threads: 12 - ram: - size: 32 - mts: 2666 - drives: - - type: ssd - size: 512 - nics: - - type: rj45 - speed: 1 - ports: 1 - gpus: - ipmi: false - name: lab-general01 - tags: - - kind: Server - cpus: - - model: Intel(R) Xeon(R) E5-2650 v3 - cores: 10 - threads: 20 - ram: - size: 128 - mts: 2133 - drives: - - type: hdd - size: 4096 - - type: hdd - size: 4096 - - type: hdd - size: 4096 - - type: hdd - size: 4096 - nics: - - type: sfp+ - speed: 10 - ports: 2 - gpus: - ipmi: true - name: dell-r730-archive01 - tags: diff --git a/RackPeek.Web/config copy/switches.yaml b/RackPeek.Web/config copy/switches.yaml deleted file mode 100644 index 7466544c..00000000 --- a/RackPeek.Web/config copy/switches.yaml +++ /dev/null @@ -1 +0,0 @@ -resources: [ ] diff --git a/RackPeek.Web/config copy/ups.yaml b/RackPeek.Web/config copy/ups.yaml deleted file mode 100644 index a49dab5f..00000000 --- a/RackPeek.Web/config copy/ups.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resources: - - kind: Ups - model: Volta - va: 2200 - name: rack-ups - tags: diff --git a/config/config.yaml b/config/config.yaml deleted file mode 100644 index 70dc7731..00000000 --- a/config/config.yaml +++ /dev/null @@ -1,29 +0,0 @@ -resources: -- kind: System - type: - os: - cores: - ram: - drives: - runsOn: - name: xf - tags: -- kind: Service - network: - ip: dfdf - port: 6 - protocol: 10.2.0.1 - url: - runsOn: xf - name: dfs - tags: -- kind: Switch - model: - managed: - poe: - ports: - - type: rj45 - speed: 1 - count: 24 - name: core-sw1 - tags: From 098f7dc408539f3ec10af23088df79fef9411153 Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 11:33:34 +0100 Subject: [PATCH 03/10] config cleanup, CLI consistency, doc updates --- AGENTS.md | 1 + RackPeek.Web/RackPeek.Web.csproj | 80 ------------------- Shared.Rcl/CliBootstrap.cs | 10 +-- Tests/EndToEnd/CliCommandsWorkflowTests.cs | 2 +- .../LaptopTests/LaptopCommandTests.cs | 2 +- .../EndToEnd/LaptopTests/LaptopErrorTests.cs | 2 +- .../LaptopTests/LaptopWorkflowTests.cs | 2 +- docs/CommandIndex.md | 8 +- docs/Commands.md | 18 ++--- docs/development/dev-cheat-sheet.md | 2 + docs/development/dev-setup.md | 45 ++++++++++- 11 files changed, 69 insertions(+), 103 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f4f71e05..1aba715d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -281,6 +281,7 @@ Default branches: feature work targets `staging`; releases flow `staging → mai - **E2E tests require the Docker image.** `just test-e2e` rebuilds it via `just build-web`. If you change anything in `RackPeek.Web`, `RackPeek.Domain`, or `Shared.Rcl`, the image must be rebuilt before E2E runs. - **Playwright browsers** are installed once via `just e2e-setup`. In CI they're cached under `~/.cache/ms-playwright`. +- **Bumping the `Microsoft.Playwright` package invalidates the browser cache.** Each Playwright version pins a specific Chromium build (e.g. 1.58 → `chromium_headless_shell-1208`, 1.59 → `-1217`). After bumping, every E2E test fails fast with `PlaywrightException : Executable doesn't exist at .../chromium_headless_shell-NNNN`. Re-run `just e2e-setup` (or `~/.dotnet/tools/playwright install chromium`) to download the matching build before running the suite. - **Docker image tag** is `rackpeek:ci` locally (referenced by `Tests.E2e/Infra/PlaywrightFixture.cs:9`); the registry tag is `aptacode/rackpeek`. - **Debugging E2E**: temporarily set `Headless = false, SlowMo = 1500` in `Tests.E2e/Infra/PlaywrightFixture.cs`. **Always revert before commit** — CI requires headless. - **TreatWarningsAsErrors** — a stray `unused-variable` warning fails the whole build. Don't add `#pragma warning disable` to push through; fix the warning. diff --git a/RackPeek.Web/RackPeek.Web.csproj b/RackPeek.Web/RackPeek.Web.csproj index 47110620..4d928bc4 100644 --- a/RackPeek.Web/RackPeek.Web.csproj +++ b/RackPeek.Web/RackPeek.Web.csproj @@ -16,86 +16,6 @@ - - <_ContentIncludedByDefault Remove="Components\Components\Desktops\DesktopCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Components\Desktops\DesktopsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\FireWalls\FireWallCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\FireWalls\FireWallsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\FireWalls\FireWallsListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Laptops\LaptopCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Laptops\LaptopsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Laptops\LaptopsListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Routers\RouterCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Routers\RoutersListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Routers\RoutersListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\HardwareDependencyTreeComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\ResourceBreadCrumbComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\ServerCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\ServersListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\ServiceCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\ServicesListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\SystemCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\SystemDependencyTreeComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\Components\SystemsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\AccessPoints\AccessPointCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\AccessPoints\AccessPointsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\AccessPoints\AccessPointsListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\AccessPoints\AddAccessPointComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Components\HardwareDependencyTreeComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Components\ResourceBreadCrumbComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Desktops\AddDesktopComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Desktops\DesktopCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Desktops\DesktopsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Desktops\DesktopsListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Firewalls\AddFirewallComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Firewalls\FirewallListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Firewalls\FirewallListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Hardware\HardwareDetailsPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Hardware\HardwareTreePage.razor"/> - <_ContentIncludedByDefault Remove="Components\Laptops\AddLaptopComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Layout\MainLayout.razor"/> - <_ContentIncludedByDefault Remove="Components\Layout\ReconnectModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\ConfirmModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\CpuModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\DriveModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\GpuModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\HardwareSelectionModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\NicModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\PortModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\RamModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\StringValueModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Modals\SystemSelectionModal.razor"/> - <_ContentIncludedByDefault Remove="Components\Pages\Error.razor"/> - <_ContentIncludedByDefault Remove="Components\Pages\Home.razor"/> - <_ContentIncludedByDefault Remove="Components\Pages\NotFound.razor"/> - <_ContentIncludedByDefault Remove="Components\Routers\AddRouterComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Routers\RouterListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Routers\RouterListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\AddServerComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\ServerCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\ServersListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Servers\ServersListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Services\AddServiceComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Services\ServiceCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Services\ServiceDetailsPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Services\ServicesListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Services\ServicesListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Switches\AddSwitchComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Switches\SwitchCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Switches\SwitchListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Switches\SwitchListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Systems\AddSystemComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Systems\SystemCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Systems\SystemDependencyTreeComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Systems\SystemsDetailsPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Systems\SystemsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Systems\SystemsListPage.razor"/> - <_ContentIncludedByDefault Remove="Components\Ups\AddUpsComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Ups\UpsCardComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Ups\UpsListComponent.razor"/> - <_ContentIncludedByDefault Remove="Components\Ups\UpsListPage.razor"/> - - .dockerignore diff --git a/Shared.Rcl/CliBootstrap.cs b/Shared.Rcl/CliBootstrap.cs index d09486c6..87daaed5 100644 --- a/Shared.Rcl/CliBootstrap.cs +++ b/Shared.Rcl/CliBootstrap.cs @@ -541,11 +541,11 @@ public static void BuildApp(CommandApp app) { }); // Drives - laptops.AddBranch("drives", drives => { - drives.SetDescription("Manage storage drives attached to Laptops."); - drives.AddCommand("add").WithDescription("Add a drive to a Laptop."); - drives.AddCommand("set").WithDescription("Update a Laptop drive."); - drives.AddCommand("del").WithDescription("Remove a drive from a Laptop."); + laptops.AddBranch("drive", drive => { + drive.SetDescription("Manage storage drives attached to Laptops."); + drive.AddCommand("add").WithDescription("Add a drive to a Laptop."); + drive.AddCommand("set").WithDescription("Update a Laptop drive."); + drive.AddCommand("del").WithDescription("Remove a drive from a Laptop."); }); // GPUs diff --git a/Tests/EndToEnd/CliCommandsWorkflowTests.cs b/Tests/EndToEnd/CliCommandsWorkflowTests.cs index 36442f7f..5af7ec20 100644 --- a/Tests/EndToEnd/CliCommandsWorkflowTests.cs +++ b/Tests/EndToEnd/CliCommandsWorkflowTests.cs @@ -391,7 +391,7 @@ public async Task comprehensive_cli_workflow_test() { Assert.Contains("added", output); (output, _) = await ExecuteAsync( - "laptops", "drives", "add", "ltp-dev-01", + "laptops", "drive", "add", "ltp-dev-01", "--type", "ssd", "--size", "1024" ); diff --git a/Tests/EndToEnd/LaptopTests/LaptopCommandTests.cs b/Tests/EndToEnd/LaptopTests/LaptopCommandTests.cs index 0d57716c..eb444574 100644 --- a/Tests/EndToEnd/LaptopTests/LaptopCommandTests.cs +++ b/Tests/EndToEnd/LaptopTests/LaptopCommandTests.cs @@ -45,7 +45,7 @@ public async Task help_commands_do_not_throw() { Assert.Contains("Add a CPU", (await ExecuteAsync("laptops", "cpu", "add", "--help")).Item1); // Drives help - Assert.Contains("Manage storage drives", (await ExecuteAsync("laptops", "drives", "--help")).Item1); + Assert.Contains("Manage storage drives", (await ExecuteAsync("laptops", "drive", "--help")).Item1); // GPU help Assert.Contains("Manage GPUs", (await ExecuteAsync("laptops", "gpu", "--help")).Item1); diff --git a/Tests/EndToEnd/LaptopTests/LaptopErrorTests.cs b/Tests/EndToEnd/LaptopTests/LaptopErrorTests.cs index f7aad37b..53bd47f7 100644 --- a/Tests/EndToEnd/LaptopTests/LaptopErrorTests.cs +++ b/Tests/EndToEnd/LaptopTests/LaptopErrorTests.cs @@ -68,7 +68,7 @@ public async Task drive_set_invalid_index_returns_error() { await ExecuteAsync("laptops", "add", "lap01"); (var output, var _) = await ExecuteAsync( - "laptops", "drives", "set", "lap01", "3", + "laptops", "drive", "set", "lap01", "3", "--type", "ssd" ); diff --git a/Tests/EndToEnd/LaptopTests/LaptopWorkflowTests.cs b/Tests/EndToEnd/LaptopTests/LaptopWorkflowTests.cs index ce2a19c2..1468787d 100644 --- a/Tests/EndToEnd/LaptopTests/LaptopWorkflowTests.cs +++ b/Tests/EndToEnd/LaptopTests/LaptopWorkflowTests.cs @@ -50,7 +50,7 @@ public async Task laptops_cli_workflow_test() { // Add Drive (output, yaml) = await ExecuteAsync( - "laptops", "drives", "add", "lap01", + "laptops", "drive", "add", "lap01", "--type", "ssd", "--size", "512" ); diff --git a/docs/CommandIndex.md b/docs/CommandIndex.md index 98837e17..8063d4b8 100644 --- a/docs/CommandIndex.md +++ b/docs/CommandIndex.md @@ -123,10 +123,10 @@ - [add](Commands.md#rpk-laptops-cpu-add) - Add a CPU to a Laptop - [set](Commands.md#rpk-laptops-cpu-set) - Update a Laptop CPU - [del](Commands.md#rpk-laptops-cpu-del) - Remove a CPU from a Laptop - - [drives](Commands.md#rpk-laptops-drives) - Manage storage drives attached to Laptops - - [add](Commands.md#rpk-laptops-drives-add) - Add a drive to a Laptop - - [set](Commands.md#rpk-laptops-drives-set) - Update a Laptop drive - - [del](Commands.md#rpk-laptops-drives-del) - Remove a drive from a Laptop + - [drive](Commands.md#rpk-laptops-drive) - Manage storage drives attached to Laptops + - [add](Commands.md#rpk-laptops-drive-add) - Add a drive to a Laptop + - [set](Commands.md#rpk-laptops-drive-set) - Update a Laptop drive + - [del](Commands.md#rpk-laptops-drive-del) - Remove a drive from a Laptop - [gpu](Commands.md#rpk-laptops-gpu) - Manage GPUs attached to Laptops - [add](Commands.md#rpk-laptops-gpu-add) - Add a GPU to a Laptop - [set](Commands.md#rpk-laptops-gpu-set) - Update a Laptop GPU diff --git a/docs/Commands.md b/docs/Commands.md index 5b1b7ed4..aa0833de 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -1845,7 +1845,7 @@ COMMANDS: summary Show a summarized hardware report for all Laptops tree Display the dependency tree for a Laptop cpu Manage CPUs attached to Laptops - drives Manage storage drives attached to Laptops + drive Manage storage drives attached to Laptops gpu Manage GPUs attached to Laptops ``` @@ -2018,13 +2018,13 @@ OPTIONS: -h, --help Prints help information ``` -## `rpk laptops drives` +## `rpk laptops drive` ``` DESCRIPTION: Manage storage drives attached to Laptops USAGE: - rpk laptops drives [OPTIONS] + rpk laptops drive [OPTIONS] OPTIONS: -h, --help Prints help information @@ -2035,13 +2035,13 @@ COMMANDS: del Remove a drive from a Laptop ``` -## `rpk laptops drives add` +## `rpk laptops drive add` ``` DESCRIPTION: Add a drive to a Laptop USAGE: - rpk laptops drives add [OPTIONS] + rpk laptops drive add [OPTIONS] ARGUMENTS: The name of the Laptop @@ -2052,13 +2052,13 @@ OPTIONS: --size The drive capacity in GB: ``` -## `rpk laptops drives set` +## `rpk laptops drive set` ``` DESCRIPTION: Update a Laptop drive USAGE: - rpk laptops drives set [OPTIONS] + rpk laptops drive set [OPTIONS] ARGUMENTS: The Laptop name @@ -2070,13 +2070,13 @@ OPTIONS: --size The drive capacity in Gb ``` -## `rpk laptops drives del` +## `rpk laptops drive del` ``` DESCRIPTION: Remove a drive from a Laptop USAGE: - rpk laptops drives del [OPTIONS] + rpk laptops drive del [OPTIONS] ARGUMENTS: The name of the Laptop diff --git a/docs/development/dev-cheat-sheet.md b/docs/development/dev-cheat-sheet.md index f7d437ac..5ec1d929 100644 --- a/docs/development/dev-cheat-sheet.md +++ b/docs/development/dev-cheat-sheet.md @@ -99,6 +99,8 @@ dotnet build playwright install ``` +> ⚠ **Re-run `playwright install` whenever the `Microsoft.Playwright` NuGet is bumped.** Each Playwright release pins a specific Chromium build (e.g. 1.58 ships `chromium_headless_shell-1208`, 1.59 ships `-1217`). If the cache is stale every test fails with `PlaywrightException : Executable doesn't exist at .../chromium_headless_shell-NNNN`. `just e2e-setup` covers this. + Build Web image (required before running tests): ```bash diff --git a/docs/development/dev-setup.md b/docs/development/dev-setup.md index 350606e0..8cca95ee 100644 --- a/docs/development/dev-setup.md +++ b/docs/development/dev-setup.md @@ -99,7 +99,50 @@ dotnet --version ### MacOS -🏗️ Help wanted for guide on MacOS development environment setup. +Setup tested on macOS (Apple Silicon and Intel). All dependencies install via Homebrew. + +#### Install .NET 10 SDK + +```shell +brew install --cask dotnet-sdk +``` + +Verify: + +```shell +dotnet --version +``` + +If `dotnet --version` reports a version below `10.0.x`, install the SDK explicitly: + +```shell +brew install --cask dotnet-sdk@10 +``` + +#### Install Docker Desktop + +Needed for running the Web UI locally (`just run-docker`) and for the E2E test suite (which builds the `rackpeek:ci` image via Testcontainers): + +```shell +brew install --cask docker +open -a Docker # start the daemon; wait until the whale icon settles +``` + +Verify: + +```shell +docker info +``` + +#### (Optional) Playwright browsers for E2E + +The first time you run E2E tests: + +```shell +just e2e-setup +``` + +This installs the `Microsoft.Playwright.CLI` global tool and downloads the Chromium build pinned to the current Playwright NuGet version. **Re-run it whenever the `Microsoft.Playwright` package is bumped** — each Playwright version pins a specific Chromium build and stale caches cause every test to fail with `PlaywrightException : Executable doesn't exist at .../chromium_headless_shell-NNNN`. ### Windows From 1d0cbd5c0efc38df878dc633024d5be0b557770a Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 12:04:54 +0100 Subject: [PATCH 04/10] fixed #290 --- README.md | 5 +- RackPeek.Web/Dockerfile | 9 ++++ Shared.Rcl/wwwroot/raw_docs/install-guide.md | 5 +- Tests.E2e/DockerHealthcheckTests.cs | 49 ++++++++++++++++++++ 4 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 Tests.E2e/DockerHealthcheckTests.cs diff --git a/README.md b/README.md index 512ebe5b..0621a25d 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,10 @@ services: - rackpeek-config:/app/config restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "curl -s http://localhost:8080 | grep -q 'rackpeek' || exit 1"] + test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"] interval: 30s - timeout: 10s + timeout: 5s + start_period: 15s retries: 3 volumes: diff --git a/RackPeek.Web/Dockerfile b/RackPeek.Web/Dockerfile index 28e7f1c1..b0a180ab 100644 --- a/RackPeek.Web/Dockerfile +++ b/RackPeek.Web/Dockerfile @@ -42,6 +42,12 @@ WORKDIR /app USER root +# Install curl for the container HEALTHCHECK probe (the aspnet runtime image +# ships without curl/wget, so without this the HEALTHCHECK below cannot run). +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* + # Create shared config directory safely RUN mkdir -p /app/config \ && chown -R ${APP_UID}:0 /app/config \ @@ -68,4 +74,7 @@ ENV RPK_YAML_DIR=/app/config # Drop privileges USER ${APP_UID} +HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ + CMD curl -fsS http://localhost:8080/health || exit 1 + ENTRYPOINT ["dotnet", "RackPeek.Web.dll"] diff --git a/Shared.Rcl/wwwroot/raw_docs/install-guide.md b/Shared.Rcl/wwwroot/raw_docs/install-guide.md index aa5990fb..0c960cab 100644 --- a/Shared.Rcl/wwwroot/raw_docs/install-guide.md +++ b/Shared.Rcl/wwwroot/raw_docs/install-guide.md @@ -34,9 +34,10 @@ services: - rackpeek-config:/app/config restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "curl -s http://localhost:8080 | grep -q 'rackpeek' || exit 1"] + test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"] interval: 30s - timeout: 10s + timeout: 5s + start_period: 15s retries: 3 volumes: diff --git a/Tests.E2e/DockerHealthcheckTests.cs b/Tests.E2e/DockerHealthcheckTests.cs new file mode 100644 index 00000000..9f520a55 --- /dev/null +++ b/Tests.E2e/DockerHealthcheckTests.cs @@ -0,0 +1,49 @@ +using DotNet.Testcontainers.Builders; +using DotNet.Testcontainers.Containers; +using Xunit.Abstractions; + +namespace Tests.E2e; + +public class DockerHealthcheckTests(ITestOutputHelper output) { + private const string _dockerImage = "rackpeek:ci"; + private static readonly TimeSpan _healthDeadline = TimeSpan.FromSeconds(60); + + [Fact] + public async Task Container_Reports_Healthy_Status_Via_Docker_HEALTHCHECK() { + await using IContainer container = new ContainerBuilder(_dockerImage) + .WithPortBinding(8080, true) + .WithWaitStrategy( + Wait.ForUnixContainer() + .UntilContainerIsHealthy()) + .Build(); + + using var cts = new CancellationTokenSource(_healthDeadline); + + try { + // StartAsync blocks until the wait strategy succeeds. If the image + // has no HEALTHCHECK instruction Docker reports `health: none` forever, + // so we bound the wait — the cancellation token forces a fast failure + // rather than letting the test hang. + await container.StartAsync(cts.Token); + + Assert.Equal(TestcontainersStates.Running, container.State); + Assert.Equal(TestcontainersHealthStatus.Healthy, container.Health); + } + catch (Exception) { + output.WriteLine($"Container did not reach 'Healthy' within {_healthDeadline.TotalSeconds:F0}s."); + output.WriteLine($"Container state: {container.State}"); + output.WriteLine($"Container health: {container.Health}"); + try { + (string Stdout, string Stderr) logs = await container.GetLogsAsync(); + output.WriteLine("==== CONTAINER STDOUT ===="); + output.WriteLine(logs.Stdout); + output.WriteLine("==== CONTAINER STDERR ===="); + output.WriteLine(logs.Stderr); + } + catch (Exception logEx) { + output.WriteLine($"Failed to capture container logs: {logEx.Message}"); + } + throw; + } + } +} From 200e06b733f28f98cb9bdea42ffe1031998bbeba Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 14:04:53 +0100 Subject: [PATCH 05/10] Added global search box --- Shared.Rcl/Components/GlobalSearch.razor | 119 ++++++++++++++++++ Shared.Rcl/Layout/MainLayout.razor | 45 ++++--- Shared.Rcl/Services/GlobalSearchService.cs | 119 ++++++++++++++++++ Tests.E2e/GlobalSearchTests.cs | 55 ++++++++ Tests.E2e/PageObjectModels/GlobalSearchPom.cs | 44 +++++++ 5 files changed, 362 insertions(+), 20 deletions(-) create mode 100644 Shared.Rcl/Components/GlobalSearch.razor create mode 100644 Shared.Rcl/Services/GlobalSearchService.cs create mode 100644 Tests.E2e/GlobalSearchTests.cs create mode 100644 Tests.E2e/PageObjectModels/GlobalSearchPom.cs diff --git a/Shared.Rcl/Components/GlobalSearch.razor b/Shared.Rcl/Components/GlobalSearch.razor new file mode 100644 index 00000000..10726c80 --- /dev/null +++ b/Shared.Rcl/Components/GlobalSearch.razor @@ -0,0 +1,119 @@ +@* Global resource search — header-level palette. + + Keyboard: ↑/↓ move the highlight, Enter navigates, Esc clears. +*@ + +@using Microsoft.AspNetCore.Components.Web +@using RackPeek.Domain.Persistence +@using RackPeek.Domain.Resources +@using Shared.Rcl.Services + +@inject IResourceCollection Repo +@inject NavigationManager Nav + +
+ + + @if (!string.IsNullOrWhiteSpace(_query)) + { +
+ + @if (_results.Count == 0) + { +
+ No matches. +
+ } + else + { + @for (var i = 0; i < _results.Count; i++) + { + var r = _results[i]; + var highlighted = i == _highlightedIndex; + var rowClass = highlighted + ? "bg-zinc-800 border-l-2 border-emerald-400" + : "hover:bg-zinc-800 border-l-2 border-transparent"; + + + } + } +
+ } +
+ +@code { + private string _query = string.Empty; + private IReadOnlyList _results = []; + private IReadOnlyList? _resources; + private int _highlightedIndex; + + private async Task RunSearchAsync() + { + _resources ??= await Repo.GetAllOfTypeAsync(); + _results = GlobalSearchService.Search(_resources, _query); + _highlightedIndex = 0; + } + + private void OnKeyDown(KeyboardEventArgs e) + { + switch (e.Key) + { + case "ArrowDown": + if (_results.Count > 0) + _highlightedIndex = Math.Min(_highlightedIndex + 1, _results.Count - 1); + break; + + case "ArrowUp": + if (_results.Count > 0) + _highlightedIndex = Math.Max(_highlightedIndex - 1, 0); + break; + + case "Enter": + if (_highlightedIndex >= 0 && _highlightedIndex < _results.Count) + OnResultSelected(_results[_highlightedIndex]); + break; + + case "Escape": + _query = string.Empty; + _results = []; + _highlightedIndex = 0; + break; + } + } + + private void OnResultSelected(SearchResult r) + { + _query = string.Empty; + _results = []; + _highlightedIndex = 0; + Nav.NavigateTo(r.Url); + } + + private static string Sanitize(string value) => + value.Replace(" ", "-").ToLowerInvariant(); +} diff --git a/Shared.Rcl/Layout/MainLayout.razor b/Shared.Rcl/Layout/MainLayout.razor index e5bccf22..3d2705f8 100644 --- a/Shared.Rcl/Layout/MainLayout.razor +++ b/Shared.Rcl/Layout/MainLayout.razor @@ -1,30 +1,35 @@ @using RackPeek.Domain +@using Shared.Rcl.Components @inherits LayoutComponentBase
- - -
- - - rackpeek - - - - @RpkConstants.Version - - -
-
+
+ + +
+ + + rackpeek + + + + @RpkConstants.Version + + +
+
+ + +
@if (RpkConstants.HasGitServices) diff --git a/Shared.Rcl/Services/GlobalSearchService.cs b/Shared.Rcl/Services/GlobalSearchService.cs new file mode 100644 index 00000000..5dea1de8 --- /dev/null +++ b/Shared.Rcl/Services/GlobalSearchService.cs @@ -0,0 +1,119 @@ +using RackPeek.Domain.Resources; +using RackPeek.Domain.Resources.Services; +using RackPeek.Domain.Resources.SystemResources; + +namespace Shared.Rcl.Services; + +public record SearchResult( + string Name, + string Kind, + string Url, + string MatchedField, + string MatchedValue, + int Score +); + +/// +/// Ranks a set of resources against a free-text query and returns the top N matches. +/// +/// Scoring per resource: each searchable field is scored independently with a +/// weight (name > ip > tag > label) and a shape modifier (equality > +/// prefix > substring > subsequence). The resource takes the best-scoring +/// single field, so a strong name match always beats a weak label match. +/// +public static class GlobalSearchService { + private const int _defaultMax = 8; + + private const int _weightName = 100; + private const int _weightIp = 50; + private const int _weightTag = 25; + private const int _weightLabel = 10; + + public static IReadOnlyList Search( + IEnumerable resources, + string query, + int max = _defaultMax) { + if (string.IsNullOrWhiteSpace(query)) return []; + + var q = query.Trim().ToLowerInvariant(); + var results = new List(); + + foreach (Resource r in resources) { + (string Field, string Value, int Score)? best = BestMatch(r, q); + if (best is null) continue; + + results.Add(new SearchResult( + Name: r.Name, + Kind: r.Kind, + Url: Resource.GetResourceUrl(r.Kind, r.Name), + MatchedField: best.Value.Field, + MatchedValue: best.Value.Value, + Score: best.Value.Score)); + } + + return results + .OrderByDescending(s => s.Score) + .ThenBy(s => s.Name, StringComparer.OrdinalIgnoreCase) + .Take(max) + .ToList(); + } + + private static (string Field, string Value, int Score)? BestMatch(Resource r, string q) { + (string Field, string Value, int Score)? best = null; + + void Consider(string field, string? value, int weight) { + if (string.IsNullOrEmpty(value)) return; + var score = ScoreField(value, q, weight); + if (score <= 0) return; + if (best is null || score > best.Value.Score) { + best = (field, value, score); + } + } + + Consider("name", r.Name, _weightName); + + var ip = GetIp(r); + Consider("ip", ip, _weightIp); + + if (r.Tags is not null) { + foreach (var tag in r.Tags) { + Consider("tag", tag, _weightTag); + } + } + + if (r.Labels is not null) { + foreach (KeyValuePair kvp in r.Labels) { + // Match against the value (label keys are usually category names, + // values hold the meaningful data — IPs, hostnames, etc). + Consider("label", $"{kvp.Key}: {kvp.Value}", _weightLabel); + } + } + + return best; + } + + private static string? GetIp(Resource r) => r switch { + SystemResource s => s.Ip, + Service svc => svc.Network?.Ip, + _ => null + }; + + private static int ScoreField(string? value, string lowerQuery, int weight) { + if (string.IsNullOrEmpty(value)) return 0; + + var v = value.ToLowerInvariant(); + if (v == lowerQuery) return weight + 20; + if (v.StartsWith(lowerQuery, StringComparison.Ordinal)) return weight + 10; + if (v.Contains(lowerQuery, StringComparison.Ordinal)) return weight; + return IsSubsequence(lowerQuery, v) ? weight - 10 : 0; + } + + private static bool IsSubsequence(string needle, string haystack) { + var i = 0; + foreach (var c in haystack) { + if (i < needle.Length && c == needle[i]) i++; + if (i == needle.Length) return true; + } + return i == needle.Length; + } +} diff --git a/Tests.E2e/GlobalSearchTests.cs b/Tests.E2e/GlobalSearchTests.cs new file mode 100644 index 00000000..4e15647d --- /dev/null +++ b/Tests.E2e/GlobalSearchTests.cs @@ -0,0 +1,55 @@ +using Microsoft.Playwright; +using Tests.E2e.Infra; +using Tests.E2e.PageObjectModels; +using Xunit.Abstractions; + +namespace Tests.E2e; + +public class GlobalSearchTests( + PlaywrightFixture fixture, + ITestOutputHelper output) : E2ETestBase(fixture, output) { + private readonly PlaywrightFixture _fixture = fixture; + private readonly ITestOutputHelper _output = output; + + [Fact] + public async Task User_Can_Search_For_A_Service_And_Navigate_To_It() { + (IBrowserContext context, IPage page) = await CreatePageAsync(); + var serviceName = $"e2e-search-{Guid.NewGuid():N}"[..20]; + + try { + // Seed: create a service via the existing services list flow + await page.GotoAsync(_fixture.BaseUrl); + + var layout = new MainLayoutPom(page); + await layout.AssertLoadedAsync(); + await layout.GotoServicesAsync(); + + var servicesList = new ServicesListPom(page); + await servicesList.AssertLoadedAsync(); + await servicesList.AddServiceAsync(serviceName); + + // Use global search from the header — partial prefix of the unique name + var search = new GlobalSearchPom(page); + await search.SearchAsync(serviceName[..12]); + await search.AssertResultExistsAsync("service", serviceName); + + // Click the result and assert navigation to the service detail page + await search.ClickResultAsync("service", serviceName); + await page.WaitForURLAsync($"**/resources/services/{serviceName}"); + } + catch (Exception) { + _output.WriteLine("TEST FAILED — Capturing diagnostics"); + _output.WriteLine($"Current URL: {page.Url}"); + + var html = await page.ContentAsync(); + _output.WriteLine("==== DOM SNAPSHOT START ===="); + _output.WriteLine(html); + _output.WriteLine("==== DOM SNAPSHOT END ===="); + + throw; + } + finally { + await context.CloseAsync(); + } + } +} diff --git a/Tests.E2e/PageObjectModels/GlobalSearchPom.cs b/Tests.E2e/PageObjectModels/GlobalSearchPom.cs new file mode 100644 index 00000000..ebd3c955 --- /dev/null +++ b/Tests.E2e/PageObjectModels/GlobalSearchPom.cs @@ -0,0 +1,44 @@ +using Microsoft.Playwright; + +namespace Tests.E2e.PageObjectModels; + +/// +/// POM for the header-level global search component. +/// +/// Selectors anchor on stable test IDs: +/// global-search-input — the textbox +/// global-search-results — the dropdown container (visible when query is non-empty) +/// global-search-no-results — empty-state inside the dropdown +/// global-search-result-{kind}-{n} — one row per match +/// global-search-result-match — secondary label inside a row, e.g. "via ip: 10.0.0.5" +/// +public class GlobalSearchPom(IPage page) { + public ILocator Input => page.GetByTestId("global-search-input"); + public ILocator Results => page.GetByTestId("global-search-results"); + public ILocator NoResults => page.GetByTestId("global-search-no-results"); + + public ILocator Result(string kind, string name) => + page.GetByTestId($"global-search-result-{kind.ToLowerInvariant()}-{Sanitize(name)}"); + + public ILocator ResultMatchLabel(string kind, string name) => + Result(kind, name).GetByTestId("global-search-result-match"); + + public async Task SearchAsync(string query) { + await Input.FillAsync(query); + await Assertions.Expect(Results).ToBeVisibleAsync(); + } + + public async Task ClearAsync() => await Input.FillAsync(""); + + public async Task ClickResultAsync(string kind, string name) => + await Result(kind, name).ClickAsync(); + + public async Task AssertResultExistsAsync(string kind, string name) => + await Assertions.Expect(Result(kind, name)).ToBeVisibleAsync(); + + public async Task AssertResultDoesNotExistAsync(string kind, string name) => + await Assertions.Expect(Result(kind, name)).Not.ToBeVisibleAsync(); + + private static string Sanitize(string value) => + value.Replace(" ", "-").ToLowerInvariant(); +} From 62f1d4642fe1e598eb9950b7b9de9646095aeb7a Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 14:24:51 +0100 Subject: [PATCH 06/10] Added global search key navigation --- Shared.Rcl/Components/GlobalSearch.razor | 39 ++++++++--- Tests.E2e/GlobalSearchTests.cs | 83 +++++++++++++++++++----- 2 files changed, 99 insertions(+), 23 deletions(-) diff --git a/Shared.Rcl/Components/GlobalSearch.razor b/Shared.Rcl/Components/GlobalSearch.razor index 10726c80..532c096b 100644 --- a/Shared.Rcl/Components/GlobalSearch.razor +++ b/Shared.Rcl/Components/GlobalSearch.razor @@ -1,6 +1,7 @@ @* Global resource search — header-level palette. Keyboard: ↑/↓ move the highlight, Enter navigates, Esc clears. + Blur: Clicking anywhere outside the input closes the dropdown. *@ @using Microsoft.AspNetCore.Components.Web @@ -23,7 +24,8 @@ @bind="_query" @bind:event="oninput" @bind:after="RunSearchAsync" - @onkeydown="OnKeyDown"/> + @onkeydown="OnKeyDown" + @onfocusout="OnFocusOut"/> @if (!string.IsNullOrWhiteSpace(_query)) { @@ -67,15 +69,23 @@
@code { + // Brief delay on focus-out so a click on a result button can fire first. + // Browser event order is mousedown → blur → click, so the focus-out fires + // before the click handler on the button. The delay lets the click register + // before we close the dropdown. + private const int _blurCloseDelayMs = 150; + private string _query = string.Empty; private IReadOnlyList _results = []; - private IReadOnlyList? _resources; private int _highlightedIndex; private async Task RunSearchAsync() { - _resources ??= await Repo.GetAllOfTypeAsync(); - _results = GlobalSearchService.Search(_resources, _query); + // Reload every search so newly added / edited / deleted resources show up + // without a hard page refresh. The repo layer is already in-memory, so + // this is a cheap dictionary lookup, not a disk read. + var resources = await Repo.GetAllOfTypeAsync(); + _results = GlobalSearchService.Search(resources, _query); _highlightedIndex = 0; } @@ -99,19 +109,32 @@ break; case "Escape": - _query = string.Empty; - _results = []; - _highlightedIndex = 0; + Close(); break; } } + private async Task OnFocusOut() + { + await Task.Delay(_blurCloseDelayMs); + if (!string.IsNullOrEmpty(_query)) + { + Close(); + StateHasChanged(); + } + } + private void OnResultSelected(SearchResult r) + { + Close(); + Nav.NavigateTo(r.Url); + } + + private void Close() { _query = string.Empty; _results = []; _highlightedIndex = 0; - Nav.NavigateTo(r.Url); } private static string Sanitize(string value) => diff --git a/Tests.E2e/GlobalSearchTests.cs b/Tests.E2e/GlobalSearchTests.cs index 4e15647d..2905d83d 100644 --- a/Tests.E2e/GlobalSearchTests.cs +++ b/Tests.E2e/GlobalSearchTests.cs @@ -12,30 +12,83 @@ public class GlobalSearchTests( private readonly ITestOutputHelper _output = output; [Fact] - public async Task User_Can_Search_For_A_Service_And_Navigate_To_It() { + public async Task User_Can_Search_For_Resources_Of_Every_Kind_And_Navigate_To_One() { (IBrowserContext context, IPage page) = await CreatePageAsync(); - var serviceName = $"e2e-search-{Guid.NewGuid():N}"[..20]; + + // Shared random token in every seeded name so a single fragment hits + // every kind, while a kind-prefixed query isolates one. + var token = Guid.NewGuid().ToString("N")[..6]; + + var seed = new (string Kind, string Name)[] { + ("server", $"srv-{token}"), + ("switch", $"sw-{token}"), + ("firewall", $"fw-{token}"), + ("router", $"rt-{token}"), + ("accesspoint", $"ap-{token}"), + ("ups", $"ups-{token}"), + ("desktop", $"dt-{token}"), + ("laptop", $"lt-{token}"), + ("system", $"sys-{token}"), + ("service", $"svc-{token}"), + }; try { - // Seed: create a service via the existing services list flow await page.GotoAsync(_fixture.BaseUrl); + await new MainLayoutPom(page).AssertLoadedAsync(); + + // ───── Seed: one resource of every kind ───── + await page.GotoAsync($"{_fixture.BaseUrl}/servers/list"); + await new ServersListPom(page).AddServerAsync($"srv-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/switches/list"); + await new SwitchListPom(page).AddSwitchAsync($"sw-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/firewalls/list"); + await new FirewallsListPom(page).AddFirewallAsync($"fw-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/routers/list"); + await new RouterListPom(page).AddRouterAsync($"rt-{token}"); - var layout = new MainLayoutPom(page); - await layout.AssertLoadedAsync(); - await layout.GotoServicesAsync(); + await page.GotoAsync($"{_fixture.BaseUrl}/accesspoints/list"); + await new AccessPointsListPom(page).AddAccessPointAsync($"ap-{token}"); - var servicesList = new ServicesListPom(page); - await servicesList.AssertLoadedAsync(); - await servicesList.AddServiceAsync(serviceName); + await page.GotoAsync($"{_fixture.BaseUrl}/ups/list"); + await new UpsListPom(page).AddUpsAsync($"ups-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/desktops/list"); + await new DesktopsListPom(page).AddDesktopAsync($"dt-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/laptops/list"); + await new LaptopListPom(page).AddLaptopAsync($"lt-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/systems/list"); + await new SystemsListPom(page).AddSystemAsync($"sys-{token}"); + + await page.GotoAsync($"{_fixture.BaseUrl}/services/list"); + await new ServicesListPom(page).AddServiceAsync($"svc-{token}"); - // Use global search from the header — partial prefix of the unique name var search = new GlobalSearchPom(page); - await search.SearchAsync(serviceName[..12]); - await search.AssertResultExistsAsync("service", serviceName); - // Click the result and assert navigation to the service detail page - await search.ClickResultAsync("service", serviceName); - await page.WaitForURLAsync($"**/resources/services/{serviceName}"); + // ───── Per-kind search: each unique name surfaces its own kind ───── + foreach ((string Kind, string Name) entry in seed) { + await search.SearchAsync(entry.Name); + await search.AssertResultExistsAsync(entry.Kind, entry.Name); + } + + // ───── Cross-kind search: shared token surfaces results from + // multiple kinds in the same dropdown. Top N is capped at 8; + // within an equal-score tier ties break alphabetically by name, + // so the kinds asserted here are those guaranteed to land + // inside the cap given the seeded name prefixes. + await search.SearchAsync(token); + await search.AssertResultExistsAsync("service", $"svc-{token}"); + await search.AssertResultExistsAsync("server", $"srv-{token}"); + await search.AssertResultExistsAsync("switch", $"sw-{token}"); + + // ───── Click navigates to the resource page ───── + await search.SearchAsync($"svc-{token}"); + await search.ClickResultAsync("service", $"svc-{token}"); + await page.WaitForURLAsync($"**/resources/services/svc-{token}"); } catch (Exception) { _output.WriteLine("TEST FAILED — Capturing diagnostics"); From da3f5fd004e92fefc3560c987186187715ea87b5 Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 14:30:36 +0100 Subject: [PATCH 07/10] fixed minor formatting issue --- Tests.E2e/GlobalSearchTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests.E2e/GlobalSearchTests.cs b/Tests.E2e/GlobalSearchTests.cs index 2905d83d..d6e558ea 100644 --- a/Tests.E2e/GlobalSearchTests.cs +++ b/Tests.E2e/GlobalSearchTests.cs @@ -82,8 +82,8 @@ public async Task User_Can_Search_For_Resources_Of_Every_Kind_And_Navigate_To_On // inside the cap given the seeded name prefixes. await search.SearchAsync(token); await search.AssertResultExistsAsync("service", $"svc-{token}"); - await search.AssertResultExistsAsync("server", $"srv-{token}"); - await search.AssertResultExistsAsync("switch", $"sw-{token}"); + await search.AssertResultExistsAsync("server", $"srv-{token}"); + await search.AssertResultExistsAsync("switch", $"sw-{token}"); // ───── Click navigates to the resource page ───── await search.SearchAsync($"svc-{token}"); From c403592eacd0bf36ba8545f8197f449df7c01aae Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 14:39:48 +0100 Subject: [PATCH 08/10] Allow any git instance (not just GitHub) --- RackPeek.Domain/Git/LibGit2GitRepository.cs | 60 ++++++++++---- .../ServiceCollectionExtensions.cs | 6 +- Shared.Rcl/Layout/GitStatusIndicator.razor | 2 +- .../wwwroot/raw_docs/git-integration.md | 78 ++++++++++++++----- 4 files changed, 107 insertions(+), 39 deletions(-) diff --git a/RackPeek.Domain/Git/LibGit2GitRepository.cs b/RackPeek.Domain/Git/LibGit2GitRepository.cs index 278b8d07..657cc363 100644 --- a/RackPeek.Domain/Git/LibGit2GitRepository.cs +++ b/RackPeek.Domain/Git/LibGit2GitRepository.cs @@ -7,7 +7,12 @@ public interface IGitCredentialsProvider { CredentialsHandler GetHandler(); } -public sealed class GitHubTokenCredentialsProvider(string username, string token) : IGitCredentialsProvider { +/// +/// HTTP Basic auth using a personal access token as the password. Works with +/// any forge that accepts a token over HTTPS — GitHub, Gitea, GitLab, Bitbucket, +/// Forgejo, etc. +/// +public sealed class TokenCredentialsProvider(string username, string token) : IGitCredentialsProvider { private readonly string _username = username ?? throw new ArgumentNullException(nameof(username)); private readonly string _token = token ?? throw new ArgumentNullException(nameof(token)); @@ -19,22 +24,47 @@ public CredentialsHandler GetHandler() { } } -public sealed class LibGit2GitRepository( - string configDirectory, - IGitCredentialsProvider credentialsProvider) : IGitRepository { - private readonly CredentialsHandler _credentials = credentialsProvider.GetHandler(); +public sealed class LibGit2GitRepository : IGitRepository { + private readonly string _configDirectory; + private readonly CredentialsHandler _credentials; + private readonly CertificateCheckHandler? _certificateCheck; + + public LibGit2GitRepository( + string configDirectory, + IGitCredentialsProvider credentialsProvider, + bool insecureTls = false) { + _configDirectory = configDirectory; + _credentials = credentialsProvider.GetHandler(); + _isAvailable = Repository.IsValid(configDirectory); + // When insecureTls is true, accept any TLS certificate. Required for + // self-hosted forges (Gitea, GitLab) behind a private CA or self-signed + // cert. Public hosts already ship trusted certs; leave it off for them. + _certificateCheck = insecureTls + ? (_, _, _) => true + : null; + } + + private FetchOptions BuildFetchOptions() => new() { + CredentialsProvider = _credentials, + CertificateCheck = _certificateCheck + }; + + private PushOptions BuildPushOptions() => new() { + CredentialsProvider = _credentials, + CertificateCheck = _certificateCheck + }; - private bool _isAvailable = Repository.IsValid(configDirectory); + private bool _isAvailable; public bool IsAvailable => _isAvailable; public void Init() { - Repository.Init(configDirectory); + Repository.Init(_configDirectory); _isAvailable = true; } - private Repository OpenRepo() => new(configDirectory); + private Repository OpenRepo() => new(_configDirectory); private static Signature GetSignature(Repository repo) { var name = repo.Config.Get("user.name")?.Value ?? "RackPeek"; @@ -156,7 +186,7 @@ public GitSyncStatus FetchAndGetSyncStatus() { repo, remote.Name, remote.FetchRefSpecs.Select(r => r.Specification), - new FetchOptions { CredentialsProvider = _credentials }, + BuildFetchOptions(), null); // If the repo has no commits yet (unborn branch) @@ -188,7 +218,7 @@ public void Push() { repo.Network.Push( remote, refSpec, - new PushOptions { CredentialsProvider = _credentials }); + BuildPushOptions()); } catch (NonFastForwardException) { PullInternal(repo); @@ -196,7 +226,7 @@ public void Push() { repo.Network.Push( remote, refSpec, - new PushOptions { CredentialsProvider = _credentials }); + BuildPushOptions()); } if (repo.Head.TrackedBranch is null) { @@ -220,7 +250,7 @@ private void PullInternal(Repository repo) { repo, remote.Name, remote.FetchRefSpecs.Select(r => r.Specification), - new FetchOptions { CredentialsProvider = _credentials }, + BuildFetchOptions(), null); Branch? remoteBranch = repo.Branches[$"{remote.Name}/{repo.Head.FriendlyName}"]; @@ -249,7 +279,7 @@ public void AddRemote(string name, string url) { repo, remote.Name, remote.FetchRefSpecs.Select(r => r.Specification), - new FetchOptions { CredentialsProvider = _credentials }, + BuildFetchOptions(), null); // detect if remote has a default branch @@ -288,7 +318,7 @@ public void AddRemote(string name, string url) { repo.Network.Push( remote, $"refs/heads/{importBranchName}:refs/heads/{importBranchName}", - new PushOptions { CredentialsProvider = _credentials }); + BuildPushOptions()); repo.Branches.Update(importBranch, b => b.TrackedBranch = $"refs/remotes/{remote.Name}/{importBranchName}"); @@ -316,7 +346,7 @@ public void AddRemote(string name, string url) { repo.Network.Push( remote, $"refs/heads/{branchName}:refs/heads/{branchName}", - new PushOptions { CredentialsProvider = _credentials }); + BuildPushOptions()); repo.Branches.Update(branch, b => b.TrackedBranch = $"refs/remotes/{remote.Name}/{branchName}"); diff --git a/RackPeek.Domain/ServiceCollectionExtensions.cs b/RackPeek.Domain/ServiceCollectionExtensions.cs index c2af0dbe..5d32189b 100644 --- a/RackPeek.Domain/ServiceCollectionExtensions.cs +++ b/RackPeek.Domain/ServiceCollectionExtensions.cs @@ -30,13 +30,15 @@ public static IServiceCollection AddGitServices( var gitToken = config["GIT_TOKEN"]; if (!string.IsNullOrEmpty(gitToken) && !string.IsNullOrWhiteSpace(yamlPath)) { var gitUsername = config["GIT_USERNAME"] ?? "git"; + var insecureTls = string.Equals( + config["GIT_INSECURE_TLS"], "true", StringComparison.OrdinalIgnoreCase); services.AddSingleton( - _ => new GitHubTokenCredentialsProvider(gitUsername, gitToken)); + _ => new TokenCredentialsProvider(gitUsername, gitToken)); services.AddSingleton(sp => { IGitCredentialsProvider creds = sp.GetRequiredService(); - return new LibGit2GitRepository(yamlPath, creds); + return new LibGit2GitRepository(yamlPath, creds, insecureTls); }); RpkConstants.HasGitServices = true; } diff --git a/Shared.Rcl/Layout/GitStatusIndicator.razor b/Shared.Rcl/Layout/GitStatusIndicator.razor index ca09f920..fb0b5068 100644 --- a/Shared.Rcl/Layout/GitStatusIndicator.razor +++ b/Shared.Rcl/Layout/GitStatusIndicator.razor @@ -51,7 +51,7 @@ { diff --git a/Shared.Rcl/wwwroot/raw_docs/git-integration.md b/Shared.Rcl/wwwroot/raw_docs/git-integration.md index e74ad83a..b16b3f3b 100644 --- a/Shared.Rcl/wwwroot/raw_docs/git-integration.md +++ b/Shared.Rcl/wwwroot/raw_docs/git-integration.md @@ -1,13 +1,41 @@ # Git Integration Guide -RackPeek can automatically save and sync its configuration using Git. -To enable this you need a GitHub Personal Access Token with permission to push to the repository that will store your config. +RackPeek can automatically save and sync its configuration with any Git host +that accepts a personal access token over HTTPS — GitHub, Gitea, GitLab, +Bitbucket, Forgejo, self-hosted, etc. RackPeek does not use any host-specific +APIs; the integration is plain `git` over HTTPS. -Create a fine-grained access token on GitHub. Select the repository that will contain your RackPeek config and grant **Contents: Read and Write** access. Copy the token when it is created. +## What you need -Provide the token to the container using the `GIT_TOKEN` environment variable. You should also provide your GitHub username with `GIT_USERNAME`. +1. **A repository** on your chosen Git host, dedicated to storing the + RackPeek configuration. It can start empty. +2. **A personal access token** with permission to push to that repository. +3. **The username** the token authenticates as. -Example using Docker Compose: +### Where to create a token + +* **GitHub** — Settings → Developer settings → Personal access tokens → + Fine-grained tokens. Select the target repository and grant + **Contents: Read and Write**. +* **Gitea / Forgejo** — Settings → Applications → Generate New Token. + Scope: `write:repository`. +* **GitLab** — User Settings → Access Tokens. Scope: `write_repository`. +* **Bitbucket** — Personal settings → App passwords → Create app password + with `Repositories: Read, Write`. + +Copy the token immediately — most hosts only show it once. + +## Configuring RackPeek + +Provide the token and username to the container via environment variables: + +| Variable | Required | Description | +|---|---|---| +| `GIT_TOKEN` | Yes | Personal access token (used as the password for HTTP Basic auth). | +| `GIT_USERNAME` | Yes | The username the token belongs to. | +| `GIT_INSECURE_TLS` | No | Set to `true` to skip TLS certificate validation — useful when pointing at a self-hosted Gitea / GitLab behind a private CA or self-signed certificate. Leave unset for any public host. | + +Example with Docker Compose, pointing at a self-hosted Gitea: ```yaml version: "3.9" @@ -22,14 +50,17 @@ services: - rackpeek-config:/app/config environment: - GIT_TOKEN=your_token_here - - GIT_USERNAME=your_github_username + - GIT_USERNAME=your_username + # Uncomment the next line only if your Git host uses a private CA + # or a self-signed certificate (common for home-lab Gitea instances): + # - GIT_INSECURE_TLS=true restart: unless-stopped volumes: rackpeek-config: ``` -Example using the Docker CLI: +Example with the Docker CLI: ```bash docker run -d \ @@ -37,22 +68,27 @@ docker run -d \ -p 8080:8080 \ -v rackpeek-config:/app/config \ -e GIT_TOKEN=your_token_here \ - -e GIT_USERNAME=your_github_username \ + -e GIT_USERNAME=your_username \ aptacode/rackpeek:latest ``` -Or with health check: +## Wiring up the remote -```bash -docker run -d \ - --name rackpeek \ - -p 8080:8080 \ - -v rackpeek-config:/app/config \ - --health-cmd="curl -s http://localhost:8080 | grep -q 'rackpeek'" \ - --health-interval=30s \ - --health-timeout=10s \ - --health-retries=3 \ - aptacode/rackpeek:latest -``` +Open RackPeek in the browser. With `GIT_TOKEN` set, a Git status indicator +appears in the header. Enable Git when prompted, then enter the repository +remote URL — for example: + +* `https://github.com/youruser/rackpeek-config.git` +* `https://gitea.example.com/youruser/rackpeek-config.git` +* `https://gitlab.example.com/youruser/rackpeek-config.git` + +RackPeek will commit and sync configuration changes from there on. + +## Security notes -Open RackPeek in the browser, enable Git when prompted, then add the repository remote URL. RackPeek will commit and sync configuration changes automatically. +* The token is read from the environment at container start; it is not + persisted in the YAML config. +* `GIT_INSECURE_TLS=true` disables certificate validation on push, pull, + and fetch. Only set it on networks you trust. Public hosts (github.com, + gitlab.com, gitea.com, …) ship correct, trusted certificates — you do + not need this flag for them. From 8ba68f227ae60ed329ff112c06bed395dd2177d2 Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 14:48:26 +0100 Subject: [PATCH 09/10] Bumped up to v1.4.0 --- README.md | 2 +- RackPeek.Domain/RpkConstants.cs | 2 +- RackPeek/RackPeek.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0621a25d..448db569 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![RackPeek demo](./assets/rackpeek_banner_thin.png)](./assets/rackpeek_banner_thin.png) -![Version](https://img.shields.io/badge/Version-1.3.0-2ea44f) ![Status](https://img.shields.io/badge/Status-Stable-success) +![Version](https://img.shields.io/badge/Version-1.4.0-2ea44f) ![Status](https://img.shields.io/badge/Status-Stable-success) [![Join our Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/egXRPdesee) [![Live Demo](https://img.shields.io/badge/Live%20Demo-Try%20RackPeek%20Online-2ea44f?logo=githubpages&logoColor=white)](https://timmoth.github.io/RackPeek/) [![Docker Hub](https://img.shields.io/badge/Docker%20Hub-rackpeek-2496ED?logo=docker&logoColor=white)](https://hub.docker.com/r/aptacode/rackpeek/) RackPeek is a webui & CLI tool for documenting and managing home lab and small-scale IT infrastructure. diff --git a/RackPeek.Domain/RpkConstants.cs b/RackPeek.Domain/RpkConstants.cs index 5fa0900a..d3c4e5b4 100644 --- a/RackPeek.Domain/RpkConstants.cs +++ b/RackPeek.Domain/RpkConstants.cs @@ -1,7 +1,7 @@ namespace RackPeek.Domain; public static class RpkConstants { - public const string Version = "v1.3.1"; + public const string Version = "v1.4.0"; public static bool HasGitServices = false; } diff --git a/RackPeek/RackPeek.csproj b/RackPeek/RackPeek.csproj index 58be043e..f92fe458 100644 --- a/RackPeek/RackPeek.csproj +++ b/RackPeek/RackPeek.csproj @@ -5,7 +5,7 @@ net10.0 enable enable - 1.3.1 + 1.4.0 From 70b495f9ee2c8ac905303a34e51b3036ec363ab3 Mon Sep 17 00:00:00 2001 From: Tim Jones Date: Sun, 17 May 2026 15:05:09 +0100 Subject: [PATCH 10/10] v1.4.0 touch up --- .github/workflows/generate-docs.yaml | 2 +- RackPeek.Domain/RpkConstants.cs | 2 +- docs/development/dev-cheat-sheet.md | 7 ------- generate-docs.sh | 2 -- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generate-docs.yaml b/.github/workflows/generate-docs.yaml index 5fcc732a..811e890b 100644 --- a/.github/workflows/generate-docs.yaml +++ b/.github/workflows/generate-docs.yaml @@ -35,6 +35,6 @@ jobs: run: | git config user.name "github-actions" git config user.email "github-actions@github.com" - git add CommandIndex.md Commands.md + git add Shared.Rcl/wwwroot/raw_docs/CommandIndex.md Shared.Rcl/wwwroot/raw_docs/Commands.md git commit -m "Update CLI docs" || echo "No changes to commit" git push diff --git a/RackPeek.Domain/RpkConstants.cs b/RackPeek.Domain/RpkConstants.cs index d3c4e5b4..829a4145 100644 --- a/RackPeek.Domain/RpkConstants.cs +++ b/RackPeek.Domain/RpkConstants.cs @@ -3,5 +3,5 @@ namespace RackPeek.Domain; public static class RpkConstants { public const string Version = "v1.4.0"; - public static bool HasGitServices = false; + public static bool HasGitServices { get; set; } } diff --git a/docs/development/dev-cheat-sheet.md b/docs/development/dev-cheat-sheet.md index 5ec1d929..a3de6578 100644 --- a/docs/development/dev-cheat-sheet.md +++ b/docs/development/dev-cheat-sheet.md @@ -105,13 +105,6 @@ Build Web image (required before running tests): ```bash docker build -t rackpeek:ci -f RackPeek.Web/Dockerfile . - - -docker buildx build \ - --platform linux/amd64,linux/arm64 \ - -f ./Dockerfile \ - -t aptacode/rackpeek-qa:latest \ - --push .. ``` --- diff --git a/generate-docs.sh b/generate-docs.sh index 5075b692..b7a2edf2 100755 --- a/generate-docs.sh +++ b/generate-docs.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -PROJECT_PATH="." -OUTPUT_FILE="COMMANDS.md" declare -A VISITED TREE_TEMP=$(mktemp)