Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@if (unviewedErrorCount > 0)
{
<FluentCounterBadge Class="error-counter-badge" Max="9" BackgroundColor="@Color.Error" Color="Color.Fill" Appearance="Appearance.Lightweight" Count="@unviewedErrorCount" HorizontalPosition="100">
<a href="@GetResourceErrorStructuredLogsUrl(Resource)" title="@FormatLogLinkTitle(unviewedErrorCount)"><FluentHighlighter HighlightedText="@FilterText" Text="@FormatName(Resource)" /></a>
<span title="@FormatName(Resource)"><FluentHighlighter HighlightedText="@FilterText" Text="@FormatName(Resource)"/></span>
</FluentCounterBadge>
}
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Globalization;
using Aspire.Dashboard.Model;
using Aspire.Dashboard.Otlp.Storage;
using Aspire.Dashboard.Resources;
using Microsoft.AspNetCore.Components;

namespace Aspire.Dashboard.Components;
Expand All @@ -24,14 +22,4 @@ private int GetUnviewedErrorCount(ResourceViewModel resource)
var application = TelemetryRepository.GetApplication(resource.Uid);
return application is null ? 0 : UnviewedErrorCounts.GetValueOrDefault(application, 0);
}

private static string GetResourceErrorStructuredLogsUrl(ResourceViewModel resource)
{
return $"/StructuredLogs/{resource.Uid}?level=error";
}

private string FormatLogLinkTitle(int unviewedErrorCount)
{
return FormatName(Resource) + Environment.NewLine + string.Format(CultureInfo.CurrentCulture, Loc[nameof(Columns.UnreadLogErrors)], unviewedErrorCount);
}
}