Skip to content

Commit

Permalink
fix: error 查询排序修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng committed Apr 16, 2024
1 parent 0ac209e commit a41264e
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 436 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ internal partial class ClickhouseApmService : IApmService
private static readonly Dictionary<string, string> errorOrders = new() {
{nameof(ErrorMessageDto.Type),"Type"},
{nameof(ErrorMessageDto.Message),"Message"},
{nameof(ErrorMessageDto.LastTime),"`time`"},
{nameof(ErrorMessageDto.Total),"`total`"}
{nameof(ErrorMessageDto.LastTime),"time"},
{nameof(ErrorMessageDto.Total),"total"}
};
const double MILLSECOND = 1e6;
const string SERVICE_NAME = "ServiceName";
Expand Down
32 changes: 1 addition & 31 deletions src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -75,35 +75,5 @@
</MCard>
</div>
</div>
</div>
@* <div class="d-flex pt-4">
<div class="col-4 rounded-lg" style="border:solid #ccc 1px;height:354px">
@if (!failed.ChartLoading && failed.HasChart)
{
<ShortEndpoint MetricType="metricTypeChartData.MetricType" />
}
</div>
<div class="col-8 pa-0">
<div style="border:solid #ccc 1px;height:354px" class="rounded-lg ml-4">
<ShortErrors />
</div>
</div>
</div> *@
@* <div class="d-flex pt-4">
<div class="col-4 rounded-lg" style="border:solid #ccc 1px;height:354px">
<MECharts Option="@(new ())" Width="80" Height="24" />
</div>
<div class="col-8 pa-0">
<div style="border:solid #ccc 1px;height:354px" class="rounded-lg ml-4">
short dependencies
</div>
</div>
</div>
<div class="rounded-lg mt-4" style="border:solid #ccc 1px;height:354px">
Instances latency distribution
<MECharts Option="@(new ())" Width="80" Height="24" />
</div>
<div class="rounded-lg mt-4" style="border:solid #ccc 1px;height:354px">
Instances
</div> *@
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ItemColContent>
</SDataTable>
<MCard Rounded=true Class="px-6" Style="border-top-left-radius: 0 !important; border-top-right-radius: 0 !important;">
<SPagination Class="mt-2" Page="page" PageChanged="OnPageChange" @bind-PageSize=defaultSize Total=total PageSizeSelect="@(new List<int>{defaultSize})" />
<SPagination Class="mt-2" Page="page" OnChange="OnPageChange" @bind-PageSize=defaultSize Total=total />
</MCard>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class ServiceErrors
new() { Text = I18n.Apm("Error.List.Total"), Value = nameof(ErrorMessageDto.Total)}
};

private int defaultSize = 5;
private int defaultSize = 20;
private int total = 0;
private int page = 1;
private List<ErrorMessageDto> data = new();
Expand Down Expand Up @@ -55,9 +55,10 @@ protected override async Task OnParametersSetAsync()
await base.OnParametersSetAsync();
}

private async Task OnPageChange(int page)
private async Task OnPageChange((int page, int pageSize) pageData)
{
this.page = page;
page = pageData.page;
defaultSize = pageData.pageSize;
await LoadPageDataAsync();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</ItemColContent>
</SDataTable>
<MCard Rounded=true Class="px-6" Style="border-top-left-radius: 0 !important; border-top-right-radius: 0 !important;">
<SPagination Class="mt-2" @bind-Page="page" @bind-PageSize=defaultSize Total=total PageSizeSelect="@(new List<int>{defaultSize})" OnChange="OnPageChange" />
<SPagination Class="mt-2" @bind-Page="page" @bind-PageSize=defaultSize Total=total OnChange="OnPageChange" />
</MCard>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class ServiceLogs
new() { Text = I18n.Apm("Log.List.Body"), Value = nameof(LogResponseDto.Body) }
};

private int defaultSize = 5;
private int defaultSize = 10;
private int total = 0;
private int page = 1;
private List<LogResponseDto> data = new();
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit a41264e

Please sign in to comment.