Skip to content

Commit

Permalink
fix: option setting updatable flag causes issues in toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
philasmar committed Oct 8, 2021
1 parent a3f2b6f commit 24c8dff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ private List<OptionSettingItemSummary> ListOptionSettingSummary(Recommendation r
TypeHint = setting.TypeHint?.ToString(),
Value = recommendation.GetOptionSettingValue(setting),
Advanced = setting.AdvancedSetting,
Updatable = (!recommendation.IsExistingCloudApplication || setting.Updatable) && recommendation.IsOptionSettingDisplayable(setting),
ReadOnly = recommendation.IsExistingCloudApplication && !setting.Updatable,
Visible = recommendation.IsOptionSettingDisplayable(setting),
AllowedValues = setting.AllowedValues,
ValueMapping = setting.ValueMapping,
ChildOptionSettings = ListOptionSettingSummary(recommendation, setting.ChildOptionSettings)
Expand Down Expand Up @@ -263,7 +264,7 @@ public async Task<IActionResult> GetExistingDeployments(string sessionId)

var deployedApplicationQueryer = serviceProvider.GetRequiredService<IDeployedApplicationQueryer>();
var session = CreateOrchestratorSession(state);

//ExistingDeployments is set during StartDeploymentSession API. It is only updated here if ExistingDeployments was null.
state.ExistingDeployments ??= await deployedApplicationQueryer.GetCompatibleApplications(state.NewRecommendations.ToList(), session: session);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public class OptionSettingItemSummary

public bool Advanced { get; set; }

public bool Updatable { get; set; }
public bool ReadOnly { get; set; }

public bool Visible { get; set; }

public IList<string> AllowedValues { get; set; } = new List<string>();

Expand Down

0 comments on commit 24c8dff

Please sign in to comment.