Skip to content

Commit

Permalink
fix: fix error detail show
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng committed Oct 30, 2024
1 parent 6722666 commit 6aa1d14
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private async Task LoadLogAysnc()
}
if (!string.IsNullOrEmpty(Search.ExceptionMsg))
{
list.Add(new FieldConditionDto { Name = StorageConst.Current.Log.Body, Value = Search.ExceptionMsg, Type = ConditionTypes.Regex });
list.Add(new FieldConditionDto { Name = StorageConst.Current.ExceptionMessage, Value = Search.ExceptionMsg, Type = ConditionTypes.Regex });
}
if (!string.IsNullOrEmpty(Search.TextField) && !string.IsNullOrEmpty(Search.TextValue))
{
Expand All @@ -118,20 +118,31 @@ private async Task LoadLogAysnc()
}
}
query.Conditions = list;
var result = await ApiCaller.ApmService.GetLogListAsync(GlobalConfig.CurrentTeamId, query, Search.Project, Search.ServiceType, ignoreTeam: !string.IsNullOrEmpty(Search.TraceId));
if (result != null)
int count = 1;
do
{
if (currentPage == 1)
if (count == 0)
{
total = (int)result.Total;
var message = list.Find(item => item.Name == StorageConst.Current.ExceptionMessage)!;
message.Name = StorageConst.Current.Log.Body;
}

if (result.Result != null && result.Result.Any())
var result = await ApiCaller.ApmService.GetLogListAsync(GlobalConfig.CurrentTeamId, query, Search.Project, Search.ServiceType, ignoreTeam: !string.IsNullOrEmpty(Search.TraceId));
if (result != null)
{
currentLog = result.Result[0];
_dic = currentLog.ToDictionary();
if (currentPage == 1)
{
total = (int)result.Total;
}

if (result.Result != null && result.Result.Any())
{
currentLog = result.Result[0];
_dic = currentLog.ToDictionary();
break;
}

}
}
} while (count-- > 0);
}

private async Task LoadTraceAsync()
Expand Down

0 comments on commit 6aa1d14

Please sign in to comment.