fix(web): support runId in Detail page from both route parameters and query strings
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 24s
Prepare Release / Build & Create Release (push) Successful in 56s
Prepare Release / Release Notification (push) Successful in 1s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 2m8s

This commit is contained in:
2026-07-12 13:37:33 +09:00
parent 475950be36
commit f40da64a05
2 changed files with 20 additions and 4 deletions
@@ -1,4 +1,4 @@
@page "{runId}"
@page "{runId?}"
@model QuantEngine.Web.Pages.Admin.Collection.DetailModel
@{
ViewData["Title"] = "수집 실행 상세";
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using QuantEngine.Core.Interfaces;
using QuantEngine.Web.Services;
@@ -19,16 +20,31 @@ public class DetailModel : PageModel
_logger = logger;
}
public async Task OnGetAsync(string runId)
public async Task OnGetAsync([FromQuery] string? runId, [FromRoute] string? routeRunId)
{
var targetRunId = runId ?? routeRunId;
if (string.IsNullOrEmpty(targetRunId))
{
if (RouteData.Values.TryGetValue("runId", out var routeVal))
{
targetRunId = routeVal?.ToString();
}
}
if (string.IsNullOrEmpty(targetRunId))
{
_logger.LogWarning("Detail page loaded without a runId");
return;
}
try
{
var runs = await _collectionRepository.GetRecentRunsAsync(limit: 100);
Run = runs.FirstOrDefault(r => r.RunId == runId);
Run = runs.FirstOrDefault(r => r.RunId == targetRunId);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to load collection run detail");
_logger.LogError(ex, "Failed to load collection run detail for runId: {RunId}", targetRunId);
}
}
}