EnergyAtlasWeb Job with Graphic User Interface (GUI)¶
The GUI Job system automatically generates a complete job page — input form, real-time log
stream, and output display — from a pair of C# input/output classes decorated with
[JobInput] / [JobOutput] attributes. No HTML or JavaScript is written per job.

GUI Job Page layout¶
A GUI Job page has three sections, rendered in order (left to right on the page, top to bottom in the diagram below):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
Architecture overview¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
- Developer defines
TInputandTOutputclasses with[JobInput]and[JobOutput]attributes. GUIJobReflectionreads the attributes at startup and producesInputFieldDescriptor/OutputFieldDescriptorlists.GUIJobFactoryBase<TInput, TOutput>exposes them via theIGUIJobFactoryinterface.GET /api/guiJob/{jobName}/schemareturns the descriptors as JSON.- The frontend (
jobRunner.js) renders the form based on a fixed base html and output widgets from those descriptors. In other words, all input, log, and output elements are generated on-the-fly with the same base HTML file.
1. Inputs (parameters)¶

[JobInput] attribute¶
TODO: Hook API doc link in the future.
EnergyAtlasWeb/Jobs/GUIJobs/GUIJobAttributes.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Supported InputFieldType enum values¶
| Type | C# type | Rendered as |
|---|---|---|
Text |
string |
Text input |
Number |
double, float |
Numeric input (min/max/step) |
Int |
int |
Integer input (min/max/step) |
Boolean |
bool |
Checkbox |
Enum |
any enum |
Dropdown (options from enum names) |
Picker |
string |
Dropdown populated from SourceEndpoint |
LocalFile |
string |
See Working with Local Files |
LocalFiles |
string (JSON array) |
Multi-file picker |
FolderPath |
string |
Directory picker |
DataHubFile |
string |
DataHub single-file selector |
DataHubFiles |
string |
DataHub multi-file selector |
Default values¶
The DefaultValue in the descriptor is read from the property's initial value in the new TInput()
default constructor.
The frontend pre-populates the form with these defaults.
2. Runtime logging¶

During Run(), the job reports progress through IJobReporter (received as the second argument).
All signal types are streamed to the frontend in real time via SignalR.
See SignalR Logging for the full reference on signal types,
BinaryProgress,TQDM, and how each renders.
Quick summary of what's available inside Run():
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
3. Outputs (artefacts)¶

[JobOutput] attribute¶
EnergyAtlasWeb/Jobs/GUIJobs/GUIJobAttributes.cs
1 2 3 4 5 | |
Supported OutputFieldType values¶
| Type | C# type (auto-inferred) | Rendered as |
|---|---|---|
Text |
string |
Read-only text box |
PlotlyChart |
PlotlyChartData |
Interactive Plotly chart (DataJson + LayoutJson) |
File |
OutputFileReference or List<OutputFileReference> |
Download link or reveal-in-folder |
OutputFileReference¶
EnergyAtlasWeb/Jobs/GUIJobs/GUIJobModels.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
- On-disk (
IsOnDisk = true): The file exists atReference. The frontend shows a folder icon and callsPOST /api/guiJob/revealInFolder?path=...to open the containing folder. - Download (
IsOnDisk = false): No file on disk. The job registers the blob in the artifact sink duringRun(), setsArtifactKey, and the frontend links toGET /api/guiJob/{jobId}/download/{artifactKey}.
See Working with Local Files for the full artifact sink design and file access differences across Execution Modes.
Factory and registration¶
GUIJobFactoryBase<TInput, TOutput>¶
EnergyAtlasWeb/Jobs/GUIJobs/GUIJobFactoryBase.cs
Abstract generic base that handles all the plumbing:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Execute(...) deserializes JSON → TInput, calls CreateJob().Run(input, reporter),
serializes TOutput → JSON.
Input Output Interfaces IGUIJob<TInput, TOutput>¶
EnergyAtlasWeb/Jobs/GUIJobs/GUIJob.cs
1 2 3 4 5 6 | |
Dependency Injection (DI) registration¶
EnergyAtlasWeb/Program.cs
1 2 3 4 | |
GUIJobRegistry receives IEnumerable<IGUIJobFactory> and builds a lookup by JobName.
The job automatically appears in GET /api/guiJob and gets a generated page.
Note: this is a standard .NET Dependency Injection (DI) behavior.
IEnumerable<T>collects all registeredT, instantiates each singleton, and injects them as a collection.
Optional: input validation¶
Override CreateValidator() to return an IGUIJobValidator<TInput>:
1 2 3 4 5 6 7 8 9 10 11 12 | |
When present, the frontend shows a Validate button. The user can pre-check their inputs before running.
Minimal code template¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
Registration checklist¶
- Create
TInputwith[JobInput]attributes on every property. - Create
TOutputwith[JobOutput]attributes on every property. - Create a factory extending
GUIJobFactoryBase<TInput, TOutput>. - Create the job implementing
IGUIJob<TInput, TOutput>. - Register in
Program.cs:builder.Services.AddSingleton<IGUIJobFactory, MyJobFactory>();. - The job page is generated automatically.

See also¶
- EnergyAtlasWeb Job (Single-Click, No GUI) — one-click jobs (no inputs/outputs)
- Working with Local Files — file picking, artifact sink, execution mode differences
- Execution Modes — browser vs local mode
- SignalR Logging — reporter, signal types, progress bars