OSDC.Drilling.EarthGravity.WebPages 1.0.5

dotnet add package OSDC.Drilling.EarthGravity.WebPages --version 1.0.5
                    
NuGet\Install-Package OSDC.Drilling.EarthGravity.WebPages -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OSDC.Drilling.EarthGravity.WebPages" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OSDC.Drilling.EarthGravity.WebPages" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="OSDC.Drilling.EarthGravity.WebPages" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OSDC.Drilling.EarthGravity.WebPages --version 1.0.5
                    
#r "nuget: OSDC.Drilling.EarthGravity.WebPages, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OSDC.Drilling.EarthGravity.WebPages@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OSDC.Drilling.EarthGravity.WebPages&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=OSDC.Drilling.EarthGravity.WebPages&version=1.0.5
                    
Install as a Cake Tool

OSDC.Drilling.EarthGravity.WebPages

This release targets MudBlazor 9.9.0 and the matching OSDC shared web component packages.

Author: Eric Cayeux
Company: NORCE Research

Reusable server-side Blazor pages for the OSDC Earth Gravity service. The package consumes the generated ModelSharedOut NSwag client and uses OSDC.UnitConversion.DrillingRazorMudComponents so users can work in a selected OSDC unit system while the Earth Gravity API remains strictly SI.

Included pages

  • /Home: service purpose and SI/WGS84 conventions.
  • /EarthGravityCalculation: unit-aware single-position gravity evaluation.
  • /EarthGravityModel: EGM96 provenance and coefficient hash.
  • /StatisticsEarthGravity: cumulative operational counters retained by the service's persistent data volume.

EarthGravityCalculation uses:

  • MudUnitAndReferenceChoiceTag for the selected OSDC unit system.
  • MudInputAngleWithUnitAdornment for sexagesimal latitude/longitude entry.
  • MudInputWithUnitAdornment with PlaneAngleGeodesic, DepthDrilling, and AccelerationDrilling.

The generated client always sends radians, metres, and metres per second squared. The WGS84 depth reference is fixed by the Earth Gravity contract and is not user-selectable; only display units change.

Package dependencies

  • MudBlazor
  • OSDC.DotnetLibraries.Drilling.WebAppUtils
  • OSDC.UnitConversion.DrillingRazorMudComponents
  • Generated ModelSharedOut/EarthGravityMergedModel.cs

The generated client and PseudoConstructors.cs are linked into this Razor class library at build time.

Host configuration

The host must implement IEarthGravityWebPagesConfiguration:

public sealed class WebPagesHostConfiguration : IEarthGravityWebPagesConfiguration
{
    public string EarthGravityHostURL { get; set; } = string.Empty;
    public string? UnitConversionHostURL { get; set; } = string.Empty;
}

Both values are host roots, normally with trailing slashes. APIUtils appends EarthGravity/api/ and UnitConversion/api/.

Register the pages and API utilities:

builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddMudServices();
builder.Services.AddSingleton<IEarthGravityWebPagesConfiguration>(configuration);
builder.Services.AddSingleton<IEarthGravityAPIUtils, APIUtils>();

Add this assembly to the Blazor router:

<Router AppAssembly="@typeof(App).Assembly"
        AdditionalAssemblies="new[] { typeof(OSDC.Drilling.EarthGravity.WebPages.EarthGravityCalculation).Assembly }">
    ...
</Router>

The host layout must include MudBlazor providers, CSS, and JavaScript, and must map the Blazor hub. See the repository WebApp project for a complete host.

Build and package

From the repository root:

dotnet build WebPages/WebPages.csproj -c Release
dotnet pack WebPages/WebPages.csproj -c Release -p:PackageVersion=1.0.2

The project currently generates a package during Release builds. The GitHub workflow publishes OSDC.Drilling.EarthGravity.WebPages for webpages-v* tags or a manually supplied version.

Regenerate ModelSharedOut before building the package whenever the service API changes.

Semantic quantity alignment

The shared catalogue bindings use the UI's existing PlaneAngleGeodesic, DepthDrilling and AccelerationDrilling choices. Depth is a position relative to the WGS84 ellipsoid, not an interval length. TotalPotential uses EarthGravityPotential through the standard read-only unit-adornment component. SI/Metric default to m²/s²; US/Imperial default to ft²/s². J/kg and ft·lbf/lbm are also available. The meaningful display precision is 0.01 m²/s², converted to the chosen unit; this is not model accuracy. Deploy a UnitConversion service containing the new quantity (3.3.28 or later) before enabling this UI update. EarthGravity API values remain in SI.

Package release 1.0.4

This release packages the current WebPages and generated contracts. Update consuming WebApps to OSDC.Drilling.EarthGravity.WebPages version 1.0.4 after it is available on nuget.org.

Trusted NuGet publishing

The publish-webpages-nuget.yml workflow authenticates with GitHub OIDC through NuGet/login@v1; no long-lived NUGET_API_KEY secret is used. Set NUGET_USER to the nuget.org profile username as a repository variable (a repository secret is also accepted). The publishing job requests contents: read and id-token: write and obtains its temporary credential immediately before uploading.

On nuget.org, the package owner must configure a trusted-publishing policy for Open-Source-Drilling-Community/EarthGravity, workflow filename publish-webpages-nuget.yml, with permission to push new versions of OSDC.Drilling.EarthGravity.WebPages. Leave the policy environment empty because the workflow does not declare a GitHub environment. Trigger the workflow manually with the intended version or push a webpages-v* tag. Already published versions are skipped.

Package release 1.0.5

Requires OSDC.UnitConversion.DrillingRazorMudComponents 3.4.9 so embedded unit selectors consume bounded UnitSystem discovery pages. Rebuild consuming WebApps after upgrading this package.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 233 10/17/2026
1.0.4 119 10/17/2026
1.0.3 152 9/6/2026
1.0.2 358 9/1/2026
1.0.1 157 8/24/2026
1.0.0 133 8/21/2026