From 0ac3e2cc595a8d2a32f30b4f23d8474c92467412 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Mon, 26 Feb 2024 09:07:24 +0800 Subject: [PATCH] Comment --- .../ResourcesGridColumns/EndpointsColumnDisplay.razor.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Aspire.Dashboard/Components/ResourcesGridColumns/EndpointsColumnDisplay.razor.cs b/src/Aspire.Dashboard/Components/ResourcesGridColumns/EndpointsColumnDisplay.razor.cs index eef23c036c5..12a1298da52 100644 --- a/src/Aspire.Dashboard/Components/ResourcesGridColumns/EndpointsColumnDisplay.razor.cs +++ b/src/Aspire.Dashboard/Components/ResourcesGridColumns/EndpointsColumnDisplay.razor.cs @@ -14,6 +14,9 @@ public partial class EndpointsColumnDisplay [Parameter, EditorRequired] public required bool HasMultipleReplicas { get; set; } + /// + /// A resource has services and endpoints. These can overlap. This method attempts to return a single list without duplicates. + /// private static List GetEndpoints(ResourceViewModel resource, bool excludeServices = false) { var displayedEndpoints = new List(); @@ -43,6 +46,7 @@ private static List GetEndpoints(ResourceViewModel resource, throw new InvalidOperationException($"Couldn't parse '{endpoint.ProxyUrl}' to a URI.", ex); } + // There isn't a good way to match services and endpoints other than by address and port. var existingMatches = displayedEndpoints.Where(e => string.Equals(e.Address, uri.Host, StringComparisons.UrlHost) && e.Port == uri.Port).ToList(); if (existingMatches.Count > 0)