Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Re-add creation failure error notifications to the environments page #3149

Merged
merged 2 commits into from
Jun 8, 2024
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 @@ -108,9 +108,10 @@ private void UpdateStatusIfCompleted(CreateComputeSystemResult createComputeSyst
}
else
{
// Reset text in UI card and show the error notification info bar to tell the user the operation failed
UpdateUiMessage(string.Empty);
OnErrorReceived(_stringResource.GetLocalized("FailureMessageForCreateComputeSystem", createComputeSystemResult.Result.DisplayMessage));
// Reset text in UI card to show error and show the error notification info bar to tell the user the operation failed
var errorMsg = _stringResource.GetLocalized("FailureMessageForCreateComputeSystem", createComputeSystemResult.Result.DisplayMessage);
UpdateUiMessage(errorMsg);
OnErrorReceived(errorMsg);
State = ComputeSystemState.Unknown;
StateColor = CardStateColor.Failure;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,16 @@ private void SetupCreateComputeSystemOperationForUI()
foreach (var operation in curOperations)
{
// this is a new operation so we need to create a view model for it.
ComputeSystemCards.Insert(0, new CreateComputeSystemOperationViewModel(_computeSystemManager, _stringResource, _mainWindow, RemoveComputeSystemCard, AddNewlyCreatedComputeSystem, operation));
ComputeSystemCards.Last().ComputeSystemErrorReceived += OnComputeSystemOperationError;
var operationViewModel = new CreateComputeSystemOperationViewModel(
_computeSystemManager,
_stringResource,
_mainWindow,
RemoveComputeSystemCard,
AddNewlyCreatedComputeSystem,
operation);

operationViewModel.ComputeSystemErrorReceived += OnComputeSystemOperationError;
ComputeSystemCards.Insert(0, operationViewModel);
_log.Information($"Found new create compute system operation for provider {operation.ProviderDetails.ComputeSystemProvider}, with name {operation.EnvironmentName}");
}

Expand Down
Loading