Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/Aspire.Dashboard/Model/ResourceStateViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private static (Icon icon, Color color) GetStateIcon(ResourceViewModel resource)
{
(icon, color) = resource.StateStyle switch
{
"warning" => ((Icon)new Icons.Filled.Size16.Warning(), Color.Warning),
"warn" => ((Icon)new Icons.Filled.Size16.Warning(), Color.Warning),
"error" => (new Icons.Filled.Size16.ErrorCircle(), Color.Error),
"success" => (new Icons.Filled.Size16.CheckmarkCircle(), Color.Success),
"info" => (new Icons.Filled.Size16.Info(), Color.Info),
Expand Down
5 changes: 4 additions & 1 deletion src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ await notificationService.PublishUpdateAsync(parameterResource, s =>
}
catch (Exception ex)
{
string stateStyle;
// Missing parameter values throw a MissingParameterValueException.
if (interactionService.IsAvailable && ex is MissingParameterValueException)
{
Expand All @@ -194,6 +195,7 @@ await notificationService.PublishUpdateAsync(parameterResource, s =>

loggerService.GetLogger(parameterResource)
.LogWarning("Parameter resource {ResourceName} could not be initialized. Waiting for user input.", parameterResource.Name);
stateStyle = KnownResourceStateStyles.Warn;
}
else
{
Expand All @@ -202,6 +204,7 @@ await notificationService.PublishUpdateAsync(parameterResource, s =>

loggerService.GetLogger(parameterResource)
.LogError(ex, "Failed to initialize parameter resource {ResourceName}.", parameterResource.Name);
stateStyle = KnownResourceStateStyles.Error;
}

var stateText = ex is MissingParameterValueException ?
Expand All @@ -212,7 +215,7 @@ await notificationService.PublishUpdateAsync(parameterResource, s =>
{
return s with
{
State = new(stateText, KnownResourceStateStyles.Error),
State = new(stateText, stateStyle),
Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, ex.Message)
};
})
Expand Down
Loading