From 47cf411a478b2a53aca9b7907f7539aa6d3ed68a Mon Sep 17 00:00:00 2001 From: qinyouzeng Date: Wed, 27 Mar 2024 15:04:04 +0800 Subject: [PATCH] chore: ui update --- .../Components/Apm/ApmLogView.razor | 8 ++-- .../Components/Apm/ApmLogView.razor.css | 2 +- .../Components/Apm/ApmSearchComponent.razor | 12 +++--- .../Apm/ApmSearchComponent.razor.cs | 26 ++++++------- .../Components/Apm/ApmTraceView.razor | 13 ++++--- .../Data/Apm/SearchData.cs | 2 +- .../Pages/Apm/Endpoint.razor | 2 +- .../Pages/Apm/Endpoint.razor.cs | 4 +- .../Pages/Apm/Endpoints/OverView.razor | 39 ++----------------- .../Pages/Apm/Endpoints/OverView.razor.cs | 15 +++---- .../Pages/Apm/ErrorDetail.razor | 7 ++-- .../Pages/Apm/ErrorDetail.razor.cs | 4 +- .../Pages/Apm/Errors.razor | 4 +- .../Pages/Apm/Errors.razor.cs | 2 +- .../Pages/Apm/Logs.razor | 2 +- .../Pages/Apm/Logs.razor.cs | 4 +- .../Pages/Apm/Service.razor | 2 +- .../Pages/Apm/Service.razor.cs | 6 +-- .../Pages/Apm/Services/OverView.razor | 4 +- .../Pages/Apm/Services/OverView.razor.cs | 7 +--- .../Pages/Apm/Services/ServiceEndpoints.razor | 2 +- .../Apm/Services/ServiceEndpoints.razor.cs | 4 +- .../Pages/Apm/Services/ServiceErrors.razor | 8 +++- .../Pages/Apm/Services/ServiceErrors.razor.cs | 5 ++- .../Pages/Apm/Services/ServiceLogs.razor.cs | 4 +- .../Pages/Apm/Services/ShortEndpoint.razor | 2 +- .../Pages/Apm/Services/ShortEndpoint.razor.cs | 4 +- .../Pages/Apm/Services/ShortErrors.razor | 2 +- .../Pages/Apm/Services/ShortErrors.razor.cs | 2 +- .../Shared/ApmComponentBase.cs | 2 +- .../wwwroot/i18n/en-US.json | 2 +- .../wwwroot/i18n/zh-CN.json | 8 ++-- 32 files changed, 89 insertions(+), 121 deletions(-) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor index be71f5f6..0d042616 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor @@ -41,15 +41,15 @@ foreach (var key in dic.Keys) { var currentName = string.IsNullOrEmpty(parent) ? key : $"{parent}.{key}"; - - var isShow = string.IsNullOrEmpty(search) || currentName.Contains(search, StringComparison.CurrentCultureIgnoreCase); - var value = dic[key]; if (IsFundamental(value.GetType()) || value.GetType().Equals(typeof(JsonElement))) { - if (!isShow) continue; if (value is DateTime time) value = time.UtcFormatLocal(CurrentTimeZone, "yyyy-MM-dd HH:mm:ss fff"); + + var isShow = string.IsNullOrEmpty(search) || currentName.Contains(search, StringComparison.CurrentCultureIgnoreCase) || value.ToString()!.Contains(search); + if (!isShow) continue; + @currentName diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor.css b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor.css index cfa51dcc..226166fa 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor.css +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmLogView.razor.css @@ -5,6 +5,7 @@ .slide_out { animation-name: fadeout; transform: translateX(1100px); + display: none; } .slide { @@ -24,7 +25,6 @@ line-height: 1.5rem; } - @keyframes fadein { 0% { opacity: 0; diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor index 8de176f0..6dc365d2 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor @@ -12,9 +12,9 @@
@if (ShowEnv) { - + Value=Search.Environment + ValueChanged="OnEnvironmentChanged" /> } @if (ShowService) @@ -80,7 +80,9 @@ OnAutoUpdate="OnTimeUpdate" ShowQuickChange ShowTimeZoneSelector - DefaultQuickRange="QuickRangeKey.Last15Minutes" /> + DefaultQuickRange="QuickRangeKey.Last15Minutes" + ShowInterval + /> } @if (ShowButton) { diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor.cs index c8fe861a..9706ea13 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmSearchComponent.razor.cs @@ -42,7 +42,7 @@ public partial class ApmSearchComponent new (ApmComparisonTypes.Week, "Week before"), }; private List services = new(); - private List enviroments = new(); + private List environments = new(); private bool isServiceLoading = true, isEnvLoading = true; private bool isCallQuery = false; @@ -53,7 +53,7 @@ protected override async Task OnInitializedAsync() await base.OnInitializedAsync(); if (!isCallQuery && Search.Start > DateTime.MinValue) { - await LoadEnviromentAsync(); + await LoadEnvironmentAsync(); await LoadServiceAsync(); await OnValueChanged(); isCallQuery = true; @@ -66,8 +66,8 @@ protected override void OnInitialized() var uri = NavigationManager.ToAbsoluteUri(NavigationManager.Uri); if (string.IsNullOrEmpty(uri.Query)) { - if (string.IsNullOrEmpty(Search.Enviroment) && string.IsNullOrEmpty(Search.Service) && !string.IsNullOrEmpty(UserContext.Environment)) - Search.Enviroment = UserContext.Environment; + if (string.IsNullOrEmpty(Search.Environment) && string.IsNullOrEmpty(Search.Service) && !string.IsNullOrEmpty(UserContext.Environment)) + Search.Environment = UserContext.Environment; if (Search.ComparisonType == ApmComparisonTypes.None) Search.ComparisonType = ApmComparisonTypes.Day; } @@ -84,13 +84,13 @@ private async Task LoadServiceAsync() Name = StorageConst.ServiceName, Type = AggregateTypes.GroupBy }; - if (!string.IsNullOrEmpty(Search.Enviroment) && Search.Enviroment != "All") + if (!string.IsNullOrEmpty(Search.Environment) && Search.Environment != "All") { query.Conditions = new List { new FieldConditionDto{ Name=StorageConst.Environment, Type= ConditionTypes.Equal, - Value=Search.Enviroment + Value=Search.Environment } }; } @@ -101,7 +101,7 @@ private async Task LoadServiceAsync() isServiceLoading = false; } - private async Task LoadEnviromentAsync() + private async Task LoadEnvironmentAsync() { if (!ShowEnv) return; isEnvLoading = true; @@ -113,9 +113,9 @@ private async Task LoadEnviromentAsync() Type = AggregateTypes.GroupBy }; var result = await ApiCaller.TraceService.AggregateAsync>(query); - enviroments = result?.ToList() ?? new List(); - if (!string.IsNullOrEmpty(Search.Enviroment) && !enviroments.Contains(Search.Enviroment)) - Search.Enviroment = default!; + environments = result?.ToList() ?? new List(); + if (!string.IsNullOrEmpty(Search.Environment) && !environments.Contains(Search.Environment)) + Search.Environment = default!; isEnvLoading = false; } @@ -129,14 +129,14 @@ private async Task OnTimeUpdate((DateTimeOffset? start, DateTimeOffset? end) tim { Search.Start = times.start!.Value.UtcDateTime; Search.End = times.end!.Value.UtcDateTime; - await LoadEnviromentAsync(); + await LoadEnvironmentAsync(); await LoadServiceAsync(); await OnValueChanged(); } - private async Task OnEnviromentChanged(string env) + private async Task OnEnvironmentChanged(string env) { - Search.Enviroment = env; + Search.Environment = env; await LoadServiceAsync(); await OnValueChanged(); StateHasChanged(); diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmTraceView.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmTraceView.razor index 57ecce90..3a56776c 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmTraceView.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Components/Apm/ApmTraceView.razor @@ -2,7 +2,7 @@ @inherits ApmComponentBase - +
@@ -52,16 +52,17 @@ return; foreach (var key in dic.Keys) { - var currentName = string.IsNullOrEmpty(parent) ? key : $"{parent}.{key}"; - - var isShow = string.IsNullOrEmpty(search) || currentName.Contains(search, StringComparison.CurrentCultureIgnoreCase); + var currentName = string.IsNullOrEmpty(parent) ? key : $"{parent}.{key}"; var value = dic[key]; if (IsFundamental(value.GetType()) || value.GetType().Equals(typeof(JsonElement))) - { - if (!isShow) continue; + { if (value is DateTime time) value = time.UtcFormatLocal(CurrentTimeZone, "yyyy-MM-dd HH:mm:ss fff"); + + var isShow = string.IsNullOrEmpty(search) || currentName.Contains(search, StringComparison.CurrentCultureIgnoreCase) || value.ToString()!.Contains(search); + if (!isShow) continue; + @currentName diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Data/Apm/SearchData.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Data/Apm/SearchData.cs index b80c77b1..a77a530a 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Data/Apm/SearchData.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Data/Apm/SearchData.cs @@ -11,7 +11,7 @@ public class SearchData public DateTime End { get; set; } - public string? Enviroment { get; set; } + public string? Environment { get; set; } public string? Service { get; set; } diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor index 4062f79e..ee89249e 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor @@ -25,7 +25,7 @@ @if (context.Header.Value == nameof(ListChartData.Name)) { } diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor.cs index b20e582e..b301909e 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoint.razor.cs @@ -65,7 +65,7 @@ private async Task LoadPageDataAsync() Start = Search.Start, End = Search.End, OrderField = sortFiled, - Env = Search.Enviroment, + Env = Search.Environment, IsDesc = sortBy, Service = Search.Service, Queries=Search.Text @@ -99,7 +99,7 @@ private async Task LoadChartDataAsync() End = Search.End, Endpoint=Search.Endpoint!, Service = Search.Service, - Env = Search.Enviroment + Env = Search.Environment }; var result = await ApiCaller.ApmService.GetChartsAsync(query); if (result == null || !result.Any()) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor index 8829abad..729f28be 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor @@ -6,7 +6,7 @@
@I18n.Apm("Chart.Latency")
- + @bind-Value="metricTypeChartData.MetricType" />
@@ -31,7 +31,7 @@
- @I18n.Apm("Chart.Thought") + @I18n.Apm("Chart.Throughput") @if (!throughput.ChartLoading && throughput.HasChart) @@ -84,36 +84,5 @@ - - - @*
-
- @if (!failed.ChartLoading && failed.HasChart) - { - - } -
-
-
- -
-
-
*@ - @*
-
- -
-
-
- short dependencies -
-
-
-
- Instances latency distribution - -
-
- Instances -
*@ +
\ No newline at end of file diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor.cs index 14f21d94..6371d264 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Endpoints/OverView.razor.cs @@ -18,12 +18,7 @@ public partial class OverView int page = 1, total = 1; Dictionary latencies = new(); double percentile = 0; - //string? traceId = default; - - private void OnMetricTypeChanged(MetricTypes type) - { - metricTypeChartData.MetricType = type; - } + //string? traceId = default; protected override async Task OnParametersSetAsync() { @@ -58,7 +53,7 @@ private async Task LoadTraceDetailAsync(int page = 1) End = SearchData.End, Endpoint = SearchData.Endpoint!, Service = SearchData.Service!, - Env = SearchData.Enviroment!, + Env = SearchData.Environment!, Page = this.page, PageSize = 1, Keyword = SearchData.Text @@ -85,7 +80,7 @@ private async Task LoadTraceErrorsAsync(string traceId) { Start = SearchData.Start, End = SearchData.End, - Env = SearchData.Enviroment, + Env = SearchData.Environment, Queries = $"TraceId='{traceId}'", Page = 1, PageSize = 100 @@ -121,7 +116,7 @@ private async Task LoadDataAsync() Start = SearchData.Start, End = SearchData.End, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, Endpoint = SearchData.Endpoint!, Queries = SearchData.Text, ComparisonType = SearchData.ComparisonType.ToComparisonType() @@ -197,7 +192,7 @@ private async Task LoadDistributionDataAsync() Start = SearchData.Start, End = SearchData.End, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, Endpoint = SearchData.Endpoint!, Queries = SearchData.Text, ComparisonType = SearchData.ComparisonType.ToComparisonType() diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor index 93b6af81..c19d9f89 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor @@ -96,15 +96,14 @@ foreach (var key in dic.Keys) { var currentName = string.IsNullOrEmpty(parent) ? key : $"{parent}.{key}"; - - var isShow = string.IsNullOrEmpty(search) || currentName.Contains(search, StringComparison.CurrentCultureIgnoreCase); - var value = dic[key]; if (IsFundamental(value.GetType()) || value.GetType().Equals(typeof(JsonElement))) { - if (!isShow) continue; if (value is DateTime time) value = time.UtcFormatLocal(CurrentTimeZone, "yyyy-MM-dd HH:mm:ss fff"); + var isShow = string.IsNullOrEmpty(search) || currentName.Contains(search, StringComparison.CurrentCultureIgnoreCase) || value.ToString()!.Contains(search); + if (!isShow) continue; + @currentName
@value
diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor.cs index 0bc409b4..2da6643c 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/ErrorDetail.razor.cs @@ -65,7 +65,7 @@ private async Task LoadLogAysnc() var result = await ApiCaller.LogService.GetPageAsync(new LogPageQueryDto { Service = Search.Service!, - Env = Search.Enviroment!, + Env = Search.Environment!, PageSize = 1, Page = currentPage, Query = Search.Text, @@ -120,7 +120,7 @@ private async Task LoadChartDataAsync() //Queries = Search.Text, Service = Search.Service, Endpoint = Search.Endpoint!, - Env = Search.Enviroment, + Env = Search.Environment, }; var result = await ApiCaller.ApmService.GetErrorChartAsync(query); errorChart.Data = ConvertLatencyChartData(result, lineName: "error count").Json; diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor index 55ecca56..d5ef62f0 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor @@ -25,13 +25,13 @@ + href="/apm/errors/@(HttpUtility.UrlEncode(context.Item.Type)+GetUrlParam(service:Search.Service,env: GetSearchEnv(Search.Environment), comparisonType: Search.ComparisonType, start: Search.Start, end: Search.End,exType:context.Item.Type,search:Search.Text))"> @context.Item.Type } else if (context.Header.Value == nameof(ErrorMessageDto.Message)) { -
+
@context.Item.Message
} diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor.cs index 77f9dcc1..9425fdab 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Errors.razor.cs @@ -65,7 +65,7 @@ private async Task LoadPageDataAsync() Start = Search.Start, End = Search.End, OrderField = sortFiled, - Env = Search.Enviroment, + Env = Search.Environment, IsDesc = sortBy, Service = Search.Service, Queries = Search.Text diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor index 48c01300..2c6c50b1 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor @@ -30,7 +30,7 @@ } else if (context.Header.Value == nameof(LogResponseDto.Body)) { -
+
@context.Item.Body
} diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor.cs index 14b3d155..014db8e5 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Logs.razor.cs @@ -10,7 +10,7 @@ public partial class Logs private List> headers => new() { new() { Text = I18n.Apm("Log.List.Timestamp"), Value = nameof(LogResponseDto.Timestamp),Fixed = DataTableFixed.Left}, - new() { Text = I18n.Apm("Log.List.Enviroment"), Value ="Resource.service.namespace",Fixed = DataTableFixed.Left}, + new() { Text = I18n.Apm("Log.List.Environment"), Value ="Resource.service.namespace",Fixed = DataTableFixed.Left}, new() { Text = I18n.Apm("Log.List.ServiceName"), Value ="Resource.service.name",Fixed = DataTableFixed.Left }, new() { Text = I18n.Apm("Log.List.SeverityText"), Value = nameof(LogResponseDto.SeverityText),Fixed = DataTableFixed.Left}, new() { Text = I18n.Apm("Log.List.TraceId"), Value = nameof(LogResponseDto.TraceId)}, @@ -92,7 +92,7 @@ private async Task LoadPageDataAsync() End = Search.End, Service = Search.Service!, Page = page, - Env = Search.Enviroment!, + Env = Search.Environment!, PageSize = defaultSize, IsDesc = sortBy ?? false, SortField = sortFiled!, diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor index a56fd802..37b1a19e 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor @@ -23,7 +23,7 @@ @if (context.Header.Value == nameof(ListChartData.Name)) { - @context.Item.Name + @context.Item.Name } else if (context.Header.Value == nameof(ListChartData.Envs)) { diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor.cs index 14080c25..b2ca89ca 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Service.razor.cs @@ -10,7 +10,7 @@ public partial class Service private List> headers => new() { new() { Text = I18n.Apm("Service.List.Name"), Value = nameof(ListChartData.Name)}, - new() { Text = I18n.Apm("Service.List.Envs"), Value =nameof(ListChartData.Envs)}, + new() { Text = I18n.Apm("Service.List.Environment"), Value =nameof(ListChartData.Envs)}, new() { Text = I18n.Apm("Service.List.Latency"), Value = nameof(ListChartData.Latency) }, new() { Text = I18n.Apm("Service.List.Throughput"), Value = nameof(ListChartData.Throughput)}, new() { Text = I18n.Apm("Service.List.Failed"), Value = nameof(ListChartData.Failed)} @@ -66,7 +66,7 @@ private async Task LoadPageDataAsync() Start = Search.Start, End = Search.End, Service = Search.Service, - Env = Search.Enviroment, + Env = Search.Environment, OrderField = sortFiled, IsDesc = sortBy, ComparisonType = Search.ComparisonType.ToComparisonType(), @@ -99,7 +99,7 @@ private async Task LoadChartDataAsync() Start = Search.Start, End = Search.End, Service = Search.Service, - Env = Search.Enviroment, + Env = Search.Environment, Queries = Search.Text, ComparisonType = Search.ComparisonType.ToComparisonType() }; diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor index bf70e033..c8e6ada2 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor @@ -17,7 +17,7 @@ Class="my-auto mr-1" Small BackgroundColor="white" - ValueChanged="OnMetricTypeChanged" /> + @bind-Value="metricTypeChartData.MetricType" />
@@ -35,7 +35,7 @@
- @I18n.Apm("Chart.Thought") + @I18n.Apm("Chart.Throughput") @if (!throughput.ChartLoading && throughput.HasChart) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor.cs index 3a04c4a0..8d5f5d91 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/OverView.razor.cs @@ -13,11 +13,6 @@ public partial class OverView private ChartData throughput = new(), failed = new(); string lastKey = null; - private void OnMetricTypeChanged(MetricTypes type) - { - metricTypeChartData.MetricType = type; - } - protected override async Task OnParametersSetAsync() { var key = MD5Utils.Encrypt(JsonSerializer.Serialize(SearchData)); @@ -42,7 +37,7 @@ private async Task LoadDataAsync() Start = SearchData.Start, End = SearchData.End, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, ComparisonType = SearchData.ComparisonType.ToComparisonType() }; if (SearchData.ComparisonType == ApmComparisonTypes.Day) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor index 805ecd4f..b44e4982 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor @@ -42,7 +42,7 @@ @if (context.Header.Value == nameof(ListChartData.Name)) { } diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor.cs index f3a9afc9..f64b6ec5 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceEndpoints.razor.cs @@ -89,7 +89,7 @@ private async Task LoadPageDataAsync() End = SearchData.End, OrderField = sortFiled, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, IsDesc = sortBy }; var result = await ApiCaller.ApmService.GetEndpointPageAsync(query); @@ -121,7 +121,7 @@ private async Task LoadChartDataAsync() End = SearchData.End, Endpoint = "", Service = SearchData.Service, - Env = SearchData.Enviroment + Env = SearchData.Environment }; var result = await ApiCaller.ApmService.GetChartsAsync(query); if (result == null || !result.Any()) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor index ef0785fc..b783d602 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor @@ -32,10 +32,16 @@ + href="/apm/errors/@(HttpUtility.UrlEncode(context.Item.Type)+GetUrlParam(service:SearchData.Service,env: GetSearchEnv(SearchData.Environment), comparisonType: SearchData.ComparisonType, start: SearchData.Start, end: SearchData.End,exType:context.Item.Type))"> @context.Item.Type } + else if (context.Header.Value == nameof(ErrorMessageDto.Message)) + { +
+ @context.Item.Message +
+ } @if (context.Header.Value == nameof(ErrorMessageDto.LastTime)) { @context.Item.LastTime.UtcFormatLocal(CurrentTimeZone) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor.cs index f94789e6..7eb9854a 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceErrors.razor.cs @@ -14,6 +14,7 @@ public partial class ServiceErrors private List> headers => new() { new() { Text = I18n.Apm("Error.List.Type"), Value = nameof(ErrorMessageDto.Type)}, + new() { Text = I18n.Apm("Error.List.Message"), Value = nameof(ErrorMessageDto.Message) }, new() { Text = I18n.Apm("Error.List.LastTime"), Value = nameof(ErrorMessageDto.LastTime) }, new() { Text = I18n.Apm("Error.List.Total"), Value = nameof(ErrorMessageDto.Total)} }; @@ -80,7 +81,7 @@ private async Task LoadChartDataAsync() OrderField = sortFiled, Service = SearchData.Service, Endpoint = SearchData.Endpoint!, - Env = SearchData.Enviroment, + Env = SearchData.Environment, IsDesc = sortBy }; var result = await ApiCaller.ApmService.GetErrorChartAsync(query); @@ -100,7 +101,7 @@ private async Task LoadPageDataAsync() End = SearchData.End, OrderField = sortFiled, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, IsDesc = sortBy, Endpoint = SearchData.Endpoint! }; diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceLogs.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceLogs.razor.cs index e7686cd0..65acff42 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceLogs.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ServiceLogs.razor.cs @@ -85,7 +85,7 @@ private async Task LoadChartDataAsync() OrderField = sortFiled, Service = SearchData.Service, Endpoint = SearchData.Endpoint!, - Env = SearchData.Enviroment, + Env = SearchData.Environment, IsDesc = sortBy }; var result = await ApiCaller.ApmService.GetLogChartAsync(query); @@ -103,7 +103,7 @@ private async Task LoadPageDataAsync() End = SearchData.End, Service = SearchData.Service!, Page = page, - Env = SearchData.Enviroment!, + Env = SearchData.Environment!, PageSize = defaultSize, IsLimitEnv = false }; diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor index 6a6a71bc..1c86c942 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor @@ -16,7 +16,7 @@ @if (context.Header.Value == nameof(ListChartData.Name)) { } diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor.cs index 4ef58835..ba64025b 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortEndpoint.razor.cs @@ -91,7 +91,7 @@ private async Task LoadPageDataAsync() End = SearchData.End, OrderField = sortFiled, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, IsDesc = sortBy }; var result = await ApiCaller.ApmService.GetEndpointPageAsync(query); @@ -122,7 +122,7 @@ private async Task LoadChartDataAsync() Start = SearchData.Start, End = SearchData.End, Service = SearchData.Service, - Env = SearchData.Enviroment + Env = SearchData.Environment }; var result = await ApiCaller.ApmService.GetChartsAsync(query); if (result == null || !result.Any()) diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor index 31701364..9a1d43e0 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor @@ -18,7 +18,7 @@ + href="/apm/errors/@(HttpUtility.UrlEncode(context.Item.Type)+GetUrlParam(service:SearchData.Service,env: GetSearchEnv(SearchData.Environment), comparisonType: SearchData.ComparisonType, start: SearchData.Start, end: SearchData.End,exType:context.Item.Type,search:SearchData.Text))"> @context.Item.Type } diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor.cs index 4c51655b..ac86133e 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/Apm/Services/ShortErrors.razor.cs @@ -80,7 +80,7 @@ private async Task LoadPageDataAsync() End = SearchData.End, OrderField = sortFiled, Service = SearchData.Service, - Env = SearchData.Enviroment, + Env = SearchData.Environment, IsDesc = sortBy }; var result = await ApiCaller.ApmService.GetErrorsPageAsync(query); diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/Shared/ApmComponentBase.cs b/src/Web/Masa.Tsc.Web.Admin.Rcl/Shared/ApmComponentBase.cs index 4948e2f3..1ec4fc6a 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/Shared/ApmComponentBase.cs +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/Shared/ApmComponentBase.cs @@ -63,7 +63,7 @@ protected override void OnInitialized() } var service = values.Get("service"); var env = values.Get("env"); - Search.Enviroment = env; + Search.Environment = env; Search.Service = service; var endpoint = values.Get("endpoint"); diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/en-US.json b/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/en-US.json index 68819b15..e313469d 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/en-US.json +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/en-US.json @@ -56,7 +56,7 @@ } }, "Chart": { - "SpanKinds": "Time span kinds", + "SpanKinds": "Time spent by span type", "ErrorCount": "Error count", "LogCount": "Log count", "ErrorOccurrences": "Error occurrences", diff --git a/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/zh-CN.json b/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/zh-CN.json index d9043d2b..580ad435 100644 --- a/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/zh-CN.json +++ b/src/Web/Masa.Tsc.Web.Admin.Rcl/wwwroot/i18n/zh-CN.json @@ -228,7 +228,7 @@ "Metadata": "详细信息" }, "Search": { - "Enviroment": "环境", + "Environment": "环境", "Service": "服务", "Comparison": "Comparison", "Refresh": "刷新" @@ -236,7 +236,7 @@ "Service": { "List": { "Name": "服务", - "Envs": "环境", + "Environment": "环境", "Latency": "延迟", "Throughput": "吞吐量", "Failed": "失败率" @@ -280,7 +280,7 @@ "Log": { "List": { "Timestamp": "时间", - "Enviroment": "环境", + "Environment": "环境", "ServiceName": "服务", "SeverityText": "级别", "TraceId": "TraceId", @@ -296,7 +296,7 @@ }, "Chart": { "Latency": "加载延迟", - "Thought": "吞吐量", + "Throughput": "吞吐量", "Failed": "失败率", "SpanKinds": "Span分类", "ErrorCount": "错误次数",