Skip to content

Commit

Permalink
fix: show app traceline
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng committed Oct 21, 2024
1 parent 3e9c97c commit 4cab43c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public partial class TimeLine
[Parameter]
public bool IsMaui { get; set; }

[Parameter]
public string? Service { get; set; }

[Parameter]
public string RoutePath { get; set; }

Expand Down Expand Up @@ -100,6 +103,8 @@ protected override async Task OnInitializedAsync()

private async Task CaculateTimelines(List<TraceResponseDto>? traces)
{
if (string.IsNullOrEmpty(urlService) && !string.IsNullOrEmpty(Service))
urlService = Service;
traceLinkUrl = default;
spanLinkUrl = default;
timeLines.Clear();
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/App/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<ApmTraceView Value="@(currentLog!=null?currentLog.Data:currentTrace?.Data)" Dialog=false Height="@("calc(100vh - 400px)")" />
</MTabItem>
<MTabItem Value="2" Class="mx-2">
<Masa.Tsc.Web.Admin.Rcl.Pages.Apm.Endpoints.TimeLine Data="traceLines" IsMaui RoutePath="@(currentTrace!=null&&currentTrace.Data.Attributes.TryGetValue("http.target",out var target)?target.ToString():default)" />
<Masa.Tsc.Web.Admin.Rcl.Pages.Apm.Endpoints.TimeLine Data="traceLines" IsMaui RoutePath="@(currentTrace!=null&&currentTrace.Data.Attributes.TryGetValue("http.target",out var target)?target.ToString():default)" Service="@serviceName" />
</MTabItem>
<MTabItem Value="3">
<Masa.Tsc.Web.Admin.Rcl.Pages.Apm.Services.ServiceErrors ShowChart=false />
Expand Down
1 change: 0 additions & 1 deletion src/Web/Masa.Tsc.Web.Admin.Rcl/Pages/App/Index.razor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

using Masa.Blazor;
using Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;
using Masa.Tsc.Contracts.Admin.User;
using System.Collections.Specialized;
Expand Down

0 comments on commit 4cab43c

Please sign in to comment.