-
Notifications
You must be signed in to change notification settings - Fork 761
Hide secrets in source tooltip, correct ExpressionResolver logic for non-containers #7662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
751ed4a
c31bd4e
1fcc27a
bc3fe8f
247cea7
5f1db82
4357580
844a056
e102dfe
d5505ef
859060d
72ceae0
07a4b13
4c27dcc
f36a730
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,16 +154,14 @@ async Task<ResolvedValue> EvalValueProvider(IValueProvider vp) | |
| /// </summary> | ||
| async ValueTask<ResolvedValue> ResolveInternalAsync(object? value) | ||
| { | ||
| return (value, sourceIsContainer) switch | ||
adamint marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return value switch | ||
| { | ||
| (ConnectionStringReference cs, true) => await ResolveInternalAsync(cs.Resource.ConnectionStringExpression).ConfigureAwait(false), | ||
| (IResourceWithConnectionString cs, true) => await ResolveInternalAsync(cs.ConnectionStringExpression).ConfigureAwait(false), | ||
| (ReferenceExpression ex, false) => await EvalExpressionAsync(ex).ConfigureAwait(false), | ||
| (ReferenceExpression ex, true) => await EvalExpressionAsync(ex).ConfigureAwait(false), | ||
| (EndpointReference endpointReference, true) => new(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false), | ||
| (EndpointReferenceExpression ep, true) => new(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false), | ||
| (IValueProvider vp, false) => await EvalValueProvider(vp).ConfigureAwait(false), | ||
| (IValueProvider vp, true) => await EvalValueProvider(vp).ConfigureAwait(false), | ||
| ConnectionStringReference cs => await ResolveInternalAsync(cs.Resource.ConnectionStringExpression).ConfigureAwait(false), | ||
| IResourceWithConnectionString cs => await ResolveInternalAsync(cs.ConnectionStringExpression).ConfigureAwait(false), | ||
|
||
| ReferenceExpression ex => await EvalExpressionAsync(ex).ConfigureAwait(false), | ||
| EndpointReference endpointReference when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false), | ||
| EndpointReferenceExpression ep when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false), | ||
| IValueProvider vp => await EvalValueProvider(vp).ConfigureAwait(false), | ||
| _ => throw new NotImplementedException() | ||
| }; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Net; | ||
| using Aspire.Dashboard.Model; | ||
| using Aspire.Dashboard.Utils; | ||
| using Aspire.Tests.Shared.DashboardModel; | ||
| using Google.Protobuf.WellKnownTypes; | ||
| using Microsoft.Extensions.Logging.Abstractions; | ||
|
|
@@ -94,7 +96,7 @@ void AddStringProperty(string propertyName, string? propertyValue) | |
| value: "project", | ||
| contentAfterValue: [new LaunchArgument("arg2", true), new LaunchArgument("--key", true), new LaunchArgument("secret", false)], | ||
| valueToVisualize: "path/to/project arg2 --key secret", | ||
| tooltip: "path/to/project arg2 --key secret")); | ||
| tooltip: $"path/to/project arg2 --key {WebUtility.HtmlDecode(DashboardUIHelpers.GetMaskingText(6).Value)}")); | ||
|
||
|
|
||
| // Project without executable arguments | ||
| data.Add(new TestData( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.