Add client log summary and dashboard shortcut
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m51s
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m51s
This commit is contained in:
@@ -14,6 +14,15 @@
|
||||
</header>
|
||||
|
||||
<div class="admin-simple-card">
|
||||
@if (_summary is not null)
|
||||
{
|
||||
<div class="admin-log-summary">
|
||||
<div><strong>Total</strong> @_summary.Total</div>
|
||||
<div><strong>Error</strong> @_summary.ErrorCount</div>
|
||||
<div><strong>Warning</strong> @_summary.WarningCount</div>
|
||||
<div><strong>Info</strong> @_summary.InfoCount</div>
|
||||
</div>
|
||||
}
|
||||
<div class="admin-log-filter-row">
|
||||
<input class="mud-input-slot" placeholder="검색어" @bind="_query" @bind:event="oninput" />
|
||||
<select class="mud-input-slot" @bind="_level">
|
||||
@@ -57,6 +66,7 @@
|
||||
private bool _loading = true;
|
||||
private string _query = "";
|
||||
private string _level = "";
|
||||
private ClientLogSummaryDto? _summary;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -70,6 +80,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
_summary = await Http.GetFromJsonAsync<ClientLogSummaryDto>("/taxbaik/api/client-logs/summary");
|
||||
var url = $"/taxbaik/api/client-logs/recent?q={Uri.EscapeDataString(_query ?? string.Empty)}&level={Uri.EscapeDataString(_level ?? string.Empty)}";
|
||||
var result = await Http.GetFromJsonAsync<List<ClientLogDto>>(url);
|
||||
if (result is not null)
|
||||
@@ -95,4 +106,12 @@
|
||||
public string? Message { get; set; }
|
||||
public string? Route { get; set; }
|
||||
}
|
||||
|
||||
private sealed class ClientLogSummaryDto
|
||||
{
|
||||
public int Total { get; set; }
|
||||
public int ErrorCount { get; set; }
|
||||
public int WarningCount { get; set; }
|
||||
public int InfoCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +23,10 @@
|
||||
<div>하위 경로 배포와 렌더러 분리를 유지하도록 라우트 린트를 적용합니다.</div>
|
||||
<a href="/taxbaik/admin/client-logs">최근 에러 확인</a>
|
||||
</article>
|
||||
<article class="admin-simple-card">
|
||||
<strong>원인 규명</strong>
|
||||
<div>중복되는 오류는 최근 로그 요약에서 source와 route 기준으로 묶어 봅니다.</div>
|
||||
<a href="/taxbaik/admin/client-logs?q=invoke">오류 검색</a>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user