feat: route dashboard pages through shared IOperationsService#28
Merged
feat: route dashboard pages through shared IOperationsService#28
Conversation
Replaces inline EF queries and config mutation in five Blazor pages with
calls to IOperationsService (Trax.Scheduler). The dashboard and the
GraphQL operations.* namespace in Trax.Api now share validation,
persistence, and metrics computation by construction, which is the
prerequisite for the React dashboard rebuild reading from the same API.
- QueueTrainDialog: queueTrain via service (validation + JSON
deserialization moved to service; fixes a latent bug where lookup
used ServiceTypeName instead of ServiceType.FullName)
- WorkQueueDetailPage.CancelEntry: shared cancel path
- ManifestGroupDetailPage: SaveSettings -> updateManifestGroup;
LoadDependencyGraph -> getManifestGroupDependencyGraph (returns
plain DTOs which the page maps to DagLayout for Radzen rendering)
- Index: KPIs / charts / top-failures / durations / throughput series
all sourced from getDashboardMetricsAsync; CPU% sampling stays
local since it requires per-instance state
- ServerSettingsPage.SaveScheduler: now persists via the service
(previously only mutated the in-memory singleton, lost on restart)
About 200 lines of inline DB / mutation logic removed from the
dashboard layer.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
This PR is included in version 1.13.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactors five Blazor pages to call `IOperationsService` in Trax.Scheduler instead of issuing EF queries / mutating config singletons inline. This is the prerequisite for the React dashboard rebuild: Blazor and React both read from / write to the same code path through the GraphQL `operations.*` namespace, so the two surfaces can never diverge in behaviour.
What changes
Net diff: +200 / -464, with about 200 lines of inline DB logic deleted from the dashboard layer.
Bug fix bundled in
The old `QueueTrainDialog` matched user input against `TrainRegistration.ServiceTypeName` (a friendly name like `IServiceTrain<X, Y>`) instead of `ServiceType.FullName`. The shared service compares against FullName per the Train Type Naming Rules in `CLAUDE.md`. The fix lands automatically through this refactor.
Coordinated changes
Depends on Trax.Effect `feat/scheduler-config-model` and Trax.Scheduler `feat/operations-service` for the service and persistence model.
Test plan