NORCE.Drilling.SurveyInstrument.WebPages
1.0.2
dotnet add package NORCE.Drilling.SurveyInstrument.WebPages --version 1.0.2
NuGet\Install-Package NORCE.Drilling.SurveyInstrument.WebPages -Version 1.0.2
<PackageReference Include="NORCE.Drilling.SurveyInstrument.WebPages" Version="1.0.2" />
<PackageVersion Include="NORCE.Drilling.SurveyInstrument.WebPages" Version="1.0.2" />
<PackageReference Include="NORCE.Drilling.SurveyInstrument.WebPages" />
paket add NORCE.Drilling.SurveyInstrument.WebPages --version 1.0.2
#r "nuget: NORCE.Drilling.SurveyInstrument.WebPages, 1.0.2"
#:package NORCE.Drilling.SurveyInstrument.WebPages@1.0.2
#addin nuget:?package=NORCE.Drilling.SurveyInstrument.WebPages&version=1.0.2
#tool nuget:?package=NORCE.Drilling.SurveyInstrument.WebPages&version=1.0.2
WebPages
WebPages is a reusable Razor class library that contains the actual SurveyInstrument Blazor pages and the typed API access layer used by the host application.
It is the main UI feature library of the solution. WebApp hosts it, but most of the business-facing UI lives here.
Responsibilities
- Provide the SurveyInstrument management page.
- Provide the SurveyInstrument edit page.
- Provide the usage statistics page.
- Wrap the generated NSwag client behind a host-configured abstraction.
- Package the pages as a reusable RCL and NuGet package.
Architectural Role
This project sits between:
- the generated shared client/model from
ModelSharedOut - the deployable Blazor host in
WebApp
It is where reusable application UI is implemented without tying it to one specific host.
Main Pages and Components
SurveyInstrumentMain.razor- Main management page.
- Loads error sources and survey instruments in parallel.
- Displays a searchable MudBlazor grid.
- Supports add, delete, and row-click edit workflows.
SurveyInstrumentEdit.razor- Editor for a selected survey instrument.
- Supports Wolff and de Wardt and ISCWSA model choices.
- Supports magnetic and gyro-specific UI behavior.
- Includes grouped ISCWSA magnetic and gyro error-term sections.
StatisticsSurveyInstrument.razor- Displays aggregate usage statistics returned by the service.
Service Access Layer
ISurveyInstrumentWebPagesConfiguration.cs- Contract the host must implement to provide API base URLs.
ISurveyInstrumentAPIUtils.cs- Abstraction consumed by the pages.
SurveyInstrumentAPIUtils.cs- Concrete implementation using the generated NSwag
Client. - Builds
HttpClientinstances for:- SurveyInstrument service
- UnitConversion service
- Concrete implementation using the generated NSwag
DataUtils.cs- Shared labels, defaults, and small UI utility values.
Host Integration Requirements
To use this library from a Blazor host:
- Register an implementation of
ISurveyInstrumentWebPagesConfiguration. - Register
ISurveyInstrumentAPIUtils. - Add this assembly to the host router
AdditionalAssemblies.
WebApp already does exactly that in its Program.cs and App.razor.
Dependencies
MudBlazorOSDC.UnitConversion.DrillingRazorMudComponents- generated source linked from
..\ModelSharedOut\SurveyInstrumentMergedModel.cs
The linked generated file is compiled into this project as:
GeneratedDtos\SurveyInstrumentMergedModel.cs
That gives the pages direct access to the typed NSwag client and DTOs without copying generated code into the repository twice.
Packaging
This project is configured as a reusable Razor class library with package metadata:
- package id:
NORCE.Drilling.SurveyInstrument.WebPages - package README:
README.md - repository URL pointing to the SurveyInstrument GitHub repository
Build
dotnet build .\WebPages\WebPages.csproj
Common Maintenance Tasks
- Update
SurveyInstrumentEdit.razorwhen new error-source families are introduced. - Keep UI labels and defaults in
DataUtils.csaligned with service expectations. - Regenerate
ModelSharedOutwhen the service contract changes, then rebuild this project. - Keep configuration fail-fast behavior in
SurveyInstrumentAPIUtilsso host misconfiguration surfaces early.
Important Implementation Notes
- The pages assume the SurveyInstrument service follows the NSwag-generated contract from
ModelSharedOut. SurveyInstrumentAPIUtilscurrently disables TLS certificate validation for itsHttpClientHandler.- This is practical for some internal environments.
- It should be revisited if stricter client-side transport security is required.
- The project is reusable, but it is not standalone.
- It requires a host for routing and DI composition.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- OSDC.DotnetLibraries.Drilling.WebAppUtils (>= 1.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.