Skip to content

Commit

Permalink
fix: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng committed Oct 24, 2024
1 parent 2eaec4d commit a057a90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ private async Task LoadPageDataAsync()
};
var result = await ApiCaller.ApmService.GetErrorsPageAsync(GlobalConfig.CurrentTeamId, query, Search.Project, Search.ServiceType);
data.Clear();
if (result.Result != null && result.Result.Any())
total = 0;
if (result != null)
{
data.AddRange(result.Result);
total = (int)result.Total;
if (result.Result != null && result.Result.Any())
data = result.Result;
}
total = (int)result.Total;
}

bool showDetail = false;
Expand Down
9 changes: 5 additions & 4 deletions src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ private async Task LoadPageDataAsync()
query.Conditions = list;
var result = await ApiCaller.ApmService.GetLogListAsync(GlobalConfig.CurrentTeamId, query, Search.Project, Search.ServiceType);
data.Clear();
if (result.Result != null && result.Result.Any())
total = 0;
if (result != null)
{
data = result.Result;
}
if (total == 0)
total = (int)result.Total;
if (result.Result != null && result.Result.Any())
data = result.Result;
}
}
}

0 comments on commit a057a90

Please sign in to comment.