Lyo.Job.Web.Components
3.0.0
dotnet add package Lyo.Job.Web.Components --version 3.0.0
NuGet\Install-Package Lyo.Job.Web.Components -Version 3.0.0
<PackageReference Include="Lyo.Job.Web.Components" Version="3.0.0" />
<PackageVersion Include="Lyo.Job.Web.Components" Version="3.0.0" />
<PackageReference Include="Lyo.Job.Web.Components" />
paket add Lyo.Job.Web.Components --version 3.0.0
#r "nuget: Lyo.Job.Web.Components, 3.0.0"
#:package Lyo.Job.Web.Components@3.0.0
#addin nuget:?package=Lyo.Job.Web.Components&version=3.0.0
#tool nuget:?package=Lyo.Job.Web.Components&version=3.0.0
Lyo.Job.Web.Components
Blazor / MudBlazor dashboard for the Lyo job stack. Drop JobManagement on a host page for Statistics, Definitions, Schedules, Runs (progress and SLA breach indicators), worker
registry, and workflow views. Uses an injected IApiClient and a configurable base route prefix.
The Workers datagrid uses REST heartbeats plus optional AutoRefresh (on by default) for live registry updates.
Targets server-side or interactive Blazor on net10.0 and pulls in MudBlazor >= 9.3.
This package is a Razor component library. It has no AddXxx DI registration. The host must already register IApiClient.
Examples
Architecture
flowchart LR
UI[JobManagement tabs] --> API[IApiClient → Job API]
API --> MQ[job.events exchange]
Top-level entry point
@using Lyo.Job.Web.Components
<JobManagement BaseRoute="Job" StatisticsRoute="api/job-stats/recent" />
| Parameter | Notes |
|---|---|
BaseRoute |
Route prefix for job endpoints. Required. Defaults to "Job". |
StatisticsRoute |
Optional URL returning SpJobStatistic rows. When omitted, the stats tab shows an info alert. |
MudTabs on JobManagement expose Statistics, Definitions, Schedules, Runs, Workers, and Workflows.
Component catalog
| Component | Role |
|---|---|
JobManagement |
Tabbed dashboard shell. |
JobStats |
Aggregated SpJobStatistic success rates and counts. |
JobDefinitionGrid |
CRUD grid for definitions. |
JobDefinitionView |
Editor: basic info with last/next/running activity, parameters, schedules. |
JobDefinitionActivity |
Basic Info activity panel: running/queued counts, last run snapshots, next scheduled slots. Timestamps use LyoTimestamp (browser TZ shown); next runs are relative within ±24h. |
JobScheduleGrid |
Standalone schedule grid with next/upcoming runs in the browser time zone (LyoTimestamp, relative within ±24h). Run now creates a job run with that schedule's stored parameters. |
JobParameterView |
Definition parameter editor via LyoParameterEditor (LyoTypeSelect type+shape in one row; Required/Encrypt flags; description, optional default, and Options kind in the expanded body). Loads the definition's latest runs once so formatter-typed parameters preview against real values. |
JobScheduleView |
Inline schedule editor: add/remove, enable toggle, atomic day/month flags with selected-state preset chips (Every day / Weekdays / Weekends, Every month / quarter), timezone picker (defaults to the browser IANA id), local start/end date pickers stored as UTC midnight in that zone, blackout calendar, LyoParameterEditor schedule-parameter overrides (query-root pickers inherited from definition parameters). Run now creates a job run with the selected schedule's stored parameters. Times stay wall-clock TimeOnly values. |
JobBlackoutCalendarEditor |
Create/unlink a schedule blackout calendar and CRUD its windows (weekdays, calendar month/day-of-month with optional year bounds, dated range, or calculated holiday; Skip/Defer). |
JobRunGrid |
Runs with state pills, worker column (machine:pid + instance id), drill-down, Resync RabbitMQ (republish queued runs missing from the broker). |
JobRunDetailView |
Overview (identity/timing/context), parameters, results, logs ordered by time, progress, SLA chip, re-run. |
JobWorkerInstanceGrid |
Worker datagrid (type, machine, PID, state chips, in-flight, heartbeat, metadata). AutoRefresh on by default. |
JobWorkerInstanceView |
Worker detail popup: identity, CPU/memory, queue subscriptions, plus System and Worker metadata tabs. |
JobWorkflowView |
Workflow picker + ordered step diagram. Run now starts an ad-hoc run of the selected workflow. |
JobWorkflowBuilderWorkbench |
Authoring surface for a workflow: the DAG on top and the selected step's editor below it. Drag the diagram background to move it and scroll or use the zoom controls to scale it; click a node to change selection. Each arrow is labeled with the condition that lets its target run, or "always" when that step is ungated. The other tabs are the request JSON it produces and a run panel. Add step appends a step that depends on the selected one, so repeated clicks build a chain; Add parallel step copies the selected step's dependencies instead, giving it a sibling that runs alongside. Dependencies are draft ids, so renaming a step does not break the steps that wait on it; Step.{name}.* paths in conditions and parameter templates are rewritten in the same edit. The draft is persisted through ClientStore (debounced, flushed on dispose) so a reload does not discard an unsaved graph. The request is assembled by JobWorkflowBuilder, so duplicate names, unknown dependencies, cycles, and a gate reading a step it does not depend on are rejected by the same code the API and engine use. |
JobWorkflowStepEditor |
One step, in a single aligned field grid: step picker, name, job definition, enabled, depends-on multi-select of draft ids (labeled with the current step name), and failure policy. Parameter overrides (LyoParameterEditor, keys and types inherited from the definition's JobParameters) and the condition tree (QueryNodeEditorPanel) sit in collapsed panels. Both the parameter templates and the condition fields draw their paths from one JobWorkflowFormatterContext bag, so the two pickers offer the same vocabulary. |
JobWorkflowGraphView |
Draws the workflow as a DiagramDocument from JobWorkflowDiagram: one rounded shape per step and an orthogonal connector per dependency. The SVG includes the arrowhead, so the picture does not depend on a marker URL. Each arrow is labeled with the condition that lets its target run, or "always" when that step is ungated. The picture sits in a viewport at a readable size: drag the background to move it, scroll or the zoom controls to scale it. Hovering a node shows the job it runs, the steps it waits on, and its gate; clicking one raises OnStepSelected with the step id. Supply StepStates, keyed by step id, to color a run's per-step outcome on the same picture. |
JobWorkflowRunGrid |
Workflow run history, optionally scoped to one workflow, with a drill-down into JobWorkflowRunDetailView. |
JobWorkflowRunDetailView |
One run: the authored graph with each step's outcome overlaid, plus a per-step drill-down into JobRunDetailView. |
RunJobDialog |
Ad-hoc run with parameter overrides via LyoParameterValueField (Options / AllowedValues select or typed JSON, optional encrypt). |
JobWorkflowGraphLayout |
Pure layout for the graph: Kahn layering into columns, fixed box and gap sizes, canvas extents, and an orthogonal polyline per edge. JobWorkflowDiagram copies that geometry onto a diagram. Reports the steps in a cycle rather than throwing, so a half-authored graph still renders. |
Host a grid or view on its own: each one takes IApiClient plus route parameters and does not require the full shell.
Formatter and condition context
A formatter-typed job parameter is a template, so authors need the keys that will actually resolve.
Definition editor — JobFormatterContext.Build(definition, latestRuns, schedule) builds that key list and matches both runtime stages:
- Scheduler (
JobScheduler.BuildTemplateData):Definition,LastRun,LastSuccessfulRun,LastFailedRun,Schedule, plus flattened{prefix}_Result_{key}/{prefix}_Parameter_{key}andSchedule_Parameter_{key}entries. - Worker (
JobWorkerParameterFormatter.SeedJobRun): thejobrunbag (run properties and aParametersmap).{jobrun.parameters.emailTo}reads from that map.
Workflow step editor — JobWorkflowFormatterContext.Build(step, definition, workflow, inputKeys, dependencies) builds the bag for one step of a workflow, which is a different
shape: it offers Workflow.*, Input.{key}, CurrentStep.*, Definition.*, and Step.{name}.* for each dependency. It goes through the same JobContextBag.WithWorkflowStep
seeder the engine uses at run time, and JobWorkflowFormatterContextTests asserts the editor offers every key the engine seeds, so the two cannot drift.
JobWorkflowFormatterContext.Paths walks that bag into the condition editor's field list, sizing the catalog budget to the dependency count so a step with several upstreams is not
truncated.
Views receive the bag as FormatterContext. Host-supplied AddContext keys arrive on a separate path through AddLyoFormatterValueEditor. Steps and definitions that have never
run still autocomplete on the run paths because LyoSampleShape substitutes for the missing JobRunRes.
UI features
| Feature | Where surfaced |
|---|---|
| Progress | JobRunGrid progress column; JobRunDetailView linear bar + message |
| SLA | JobRunDetailView breach indicator when SlaBreached == true |
| Alerting | Definition/run alert flags in detail view |
| Queue resync | JobRunGrid Resync RabbitMQ toolbar. POST Job/Run/Resync (scoped when a definition filter is set) |
| Worker registry | Workers tab (JobWorkerInstanceGrid) |
| Workflows | Workflows tab (JobWorkflowView) |
| Schedules / blackout calendars | Schedules tab. Add/remove schedules, enable toggle, timezone dropdown defaulting to the browser zone, local date pickers, inline blackout calendar/windows (weekdays, calendar days, date range, holiday), misfire/cron fields |
| Dry run | RunJobDialog can pass DryRun for validate-only runs (no worker dispatch) |
| Workflow authoring | Workflows tab. Chained Add step / fan-out Add parallel step, clickable graph nodes with run-condition tooltips, declared run inputs surfaced as Input.{key} paths and sent with Run now |
JobColorHelper
One static helper applies the same colors and icons to job state, result, and log level.
| Member | Returns / behavior |
|---|---|
ForState(JobState) |
MudBlazor Color mapping. |
ForWorkerState(JobWorkerInstanceState) |
Running→Success, Draining→Warning, Stopped→Default. |
ForResult(JobRunResult?) |
Success / warning / error colors. |
ForLogLevel(JobLogLevel) |
Trace/Debug→Default, Info→Info, Warning→Warning, Error/Critical→Error. |
StateIcon / ResultIcon |
Material icon names. |
FormatDuration / FormatDurationFromDates |
Human-readable durations. |
GetEnumDescription<T>(T value) |
[Description] attribute or field name. |
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Api.Client(direct, lyo)Lyo.Common.Metadata(direct, lyo)Lyo.Diagram(direct, lyo)Lyo.Formatter(direct, lyo)Lyo.Formatter.Web.Components(direct, lyo)Lyo.Http.Client(direct, lyo)Lyo.Job.Models(direct, lyo)Lyo.Parameters(direct, lyo)Lyo.Scheduler(direct, lyo)Lyo.Web.Components(direct, lyo)Lyo.Web.Components.Export(direct, lyo)Lyo.Web.Components.Export.Csv(direct, lyo)Lyo.Web.Components.Export.Toml(direct, lyo)Lyo.Web.Components.Export.Xlsx(direct, lyo)Lyo.Web.Components.Export.Xml(direct, lyo)Lyo.Web.Components.Export.Yaml(direct, lyo)MudBlazor9.3(direct, third-party)Lyo.Api.Models(transitive, lyo)Lyo.Common.Core(transitive, lyo)Lyo.DataTable.Models(transitive, lyo)Lyo.DateAndTime(transitive, lyo)Lyo.Diagnostic(transitive, lyo)Lyo.Diagram.Models(transitive, lyo)Lyo.Encryption(transitive, lyo)Lyo.EntityReference.Models(transitive, lyo)Lyo.Exceptions(transitive, lyo)Lyo.Hashing(transitive, lyo)Lyo.IO.FileSystem(transitive, lyo)Lyo.IO.Temp(transitive, lyo)Lyo.Json(transitive, lyo)Lyo.KeyStore(transitive, lyo)Lyo.Metrics(transitive, lyo)Lyo.PackageMetadata(transitive, lyo)Lyo.Query.Evaluation(transitive, lyo)Lyo.Query.Models(transitive, lyo)Lyo.Result(transitive, lyo)Lyo.Schedule.Models(transitive, lyo)Lyo.Streams(transitive, lyo)Lyo.Validation(transitive, lyo)Lyo.Validation.Models(transitive, lyo)Lyo.Web.Primitives(transitive, lyo)AngleSharp1.5.0(transitive, third-party)Blazored.LocalStorage4.5.0(transitive, third-party)BouncyCastle.Cryptography2.6.2(transitive, third-party, netstandard2.0)DynamicExpresso.Core2.19.3(transitive, third-party)Konscious.Security.Cryptography.Argon21.3.1(transitive, third-party)Microsoft.Bcl.AsyncInterfaces10.0.5(transitive, microsoft, netstandard2.0)Microsoft.Extensions.Configuration.Binder10.0.5(transitive, microsoft)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5(transitive, microsoft, net10.0, netstandard2.0)Microsoft.Extensions.Hosting.Abstractions10.0.5(transitive, microsoft)Microsoft.Extensions.Http10.0.5(transitive, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5(transitive, microsoft)SmartFormat.NET3.6.1(transitive, third-party)System.Buffers4.6.1(transitive, microsoft, netstandard2.0)System.ComponentModel.Annotations5.0.0(transitive, microsoft)System.Diagnostics.DiagnosticSource10.0.5(transitive, microsoft, netstandard2.0)System.IO.Hashing10.0.5(transitive, microsoft, net10.0)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Text.Encoding.CodePages10.0.5(transitive, microsoft)System.Text.Json10.0.5(transitive, microsoft, netstandard2.0)System.Threading.RateLimiting10.0.5(transitive, microsoft)System.Threading.Tasks.Extensions4.6.3(transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Lyo.Api.Client (>= 3.0.0)
- Lyo.Common.Metadata (>= 3.0.0)
- Lyo.Diagram (>= 3.0.0)
- Lyo.Formatter (>= 3.0.0)
- Lyo.Formatter.Web.Components (>= 3.0.0)
- Lyo.Http.Client (>= 3.0.0)
- Lyo.Job.Models (>= 3.0.0)
- Lyo.Parameters (>= 3.0.0)
- Lyo.Scheduler (>= 3.0.0)
- Lyo.Web.Components (>= 3.0.0)
- Lyo.Web.Components.Export (>= 3.0.0)
- Lyo.Web.Components.Export.Csv (>= 3.0.0)
- Lyo.Web.Components.Export.Toml (>= 3.0.0)
- Lyo.Web.Components.Export.Xlsx (>= 3.0.0)
- Lyo.Web.Components.Export.Xml (>= 3.0.0)
- Lyo.Web.Components.Export.Yaml (>= 3.0.0)
- MudBlazor (>= 9.3.0 && < 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.