Skip to content

Commit 1e650ae

Browse files
committed
feat: Remove disabled fields from showing on redeployment in server mode
1 parent 2c676af commit 1e650ae

9 files changed

+37
-2
lines changed

src/AWS.Deploy.CLI/ServerMode/Controllers/DeploymentController.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ private List<OptionSettingItemSummary> ListOptionSettingSummary(IOptionSettingHa
208208
Value = optionSettingHandler.GetOptionSettingValue(recommendation, setting),
209209
Advanced = setting.AdvancedSetting,
210210
ReadOnly = recommendation.IsExistingCloudApplication && !setting.Updatable,
211-
Visible = optionSettingHandler.IsOptionSettingDisplayable(recommendation, setting),
211+
Visible =
212+
optionSettingHandler.IsOptionSettingDisplayable(recommendation, setting) &&
213+
!(recommendation.IsExistingCloudApplication && !setting.Updatable && !setting.VisibleOnRedeployment),
212214
SummaryDisplayable = optionSettingHandler.IsSummaryDisplayable(recommendation, setting),
213215
AllowedValues = setting.AllowedValues,
214216
ValueMapping = setting.ValueMapping,

src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs

+5
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ public partial class OptionSettingItem : IOptionSettingItem
124124
/// </summary>
125125
public bool Updatable { get; set; }
126126

127+
/// <summary>
128+
/// If the value is true, the setting will be displayed during a redeployment. This only applies to server-mode clients.
129+
/// </summary>
130+
public bool VisibleOnRedeployment { get; set; }
131+
127132
/// <summary>
128133
/// List of all validators that should be run when configuring this OptionSettingItem.
129134
/// </summary>

src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppAppRunner.recipe

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
"TypeHint": "AppRunnerService",
101101
"AdvancedSetting": false,
102102
"Updatable": false,
103+
"VisibleOnRedeployment": true,
103104
"DefaultValue": "{StackName}-service",
104105
"Validators": [
105106
{

src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppECSFargate.recipe

+6-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"TypeHint": "ECSCluster",
119119
"AdvancedSetting": false,
120120
"Updatable": false,
121+
"VisibleOnRedeployment": true,
121122
"ChildOptionSettings": [
122123
{
123124
"Id": "CreateNew",
@@ -136,6 +137,7 @@
136137
"TypeHint": "ExistingECSCluster",
137138
"AdvancedSetting": false,
138139
"Updatable": false,
140+
"VisibleOnRedeployment": true,
139141
"Validators": [
140142
{
141143
"ValidatorType": "Regex",
@@ -160,6 +162,7 @@
160162
"DefaultValue": "{StackName}",
161163
"AdvancedSetting": false,
162164
"Updatable": false,
165+
"VisibleOnRedeployment": true,
163166
"Validators": [
164167
{
165168
"ValidatorType": "Regex",
@@ -195,6 +198,7 @@
195198
"DefaultValue": "{StackName}-service",
196199
"AdvancedSetting": false,
197200
"Updatable": false,
201+
"VisibleOnRedeployment": true,
198202
"Validators": [
199203
{
200204
"ValidatorType": "Regex",
@@ -738,7 +742,8 @@
738742
"Type": "Bool",
739743
"DefaultValue": true,
740744
"AdvancedSetting": false,
741-
"Updatable": false
745+
"Updatable": false,
746+
"VisibleOnRedeployment": true
742747
}
743748
]
744749
},

src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe

+5
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
"TypeHint": "BeanstalkApplication",
138138
"AdvancedSetting": false,
139139
"Updatable": false,
140+
"VisibleOnRedeployment": true,
140141
"ChildOptionSettings": [
141142
{
142143
"Id": "CreateNew",
@@ -155,6 +156,7 @@
155156
"DefaultValue": "{StackName}",
156157
"AdvancedSetting": false,
157158
"Updatable": false,
159+
"VisibleOnRedeployment": true,
158160
"DependsOn": [
159161
{
160162
"Id": "BeanstalkApplication.CreateNew",
@@ -187,6 +189,7 @@
187189
"DefaultValue": "{StackName}",
188190
"AdvancedSetting": false,
189191
"Updatable": false,
192+
"VisibleOnRedeployment": true,
190193
"DependsOn": [
191194
{
192195
"Id": "BeanstalkApplication.CreateNew",
@@ -215,6 +218,7 @@
215218
"Type": "Object",
216219
"AdvancedSetting": false,
217220
"Updatable": false,
221+
"VisibleOnRedeployment": true,
218222
"ChildOptionSettings": [
219223
{
220224
"Id": "EnvironmentName",
@@ -225,6 +229,7 @@
225229
"DefaultValue": "{StackName}-dev",
226230
"AdvancedSetting": false,
227231
"Updatable": false,
232+
"VisibleOnRedeployment": true,
228233
"Validators": [
229234
{
230235
"ValidatorType": "Regex",

src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
"TypeHint": "BeanstalkApplication",
138138
"AdvancedSetting": false,
139139
"Updatable": false,
140+
"VisibleOnRedeployment": true,
140141
"ChildOptionSettings": [
141142
{
142143
"Id": "CreateNew",
@@ -155,6 +156,7 @@
155156
"DefaultValue": "{StackName}",
156157
"AdvancedSetting": false,
157158
"Updatable": false,
159+
"VisibleOnRedeployment": true,
158160
"DependsOn": [
159161
{
160162
"Id": "BeanstalkApplication.CreateNew",
@@ -187,6 +189,7 @@
187189
"DefaultValue": "{StackName}",
188190
"AdvancedSetting": false,
189191
"Updatable": false,
192+
"VisibleOnRedeployment": true,
190193
"DependsOn": [
191194
{
192195
"Id": "BeanstalkApplication.CreateNew",
@@ -216,6 +219,7 @@
216219
"DefaultValue": "{StackName}-dev",
217220
"AdvancedSetting": false,
218221
"Updatable": false,
222+
"VisibleOnRedeployment": true,
219223
"Validators": [
220224
{
221225
"ValidatorType": "Regex",

src/AWS.Deploy.Recipes/RecipeDefinitions/ConsoleAppECSFargateScheduleTask.recipe

+3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
"TypeHint": "ECSCluster",
137137
"AdvancedSetting": false,
138138
"Updatable": false,
139+
"VisibleOnRedeployment": true,
139140
"ChildOptionSettings": [
140141
{
141142
"Id": "CreateNew",
@@ -154,6 +155,7 @@
154155
"TypeHint": "ExistingECSCluster",
155156
"AdvancedSetting": false,
156157
"Updatable": false,
158+
"VisibleOnRedeployment": true,
157159
"Validators": [
158160
{
159161
"ValidatorType": "Regex",
@@ -178,6 +180,7 @@
178180
"DefaultValue": "{StackName}",
179181
"AdvancedSetting": false,
180182
"Updatable": false,
183+
"VisibleOnRedeployment": true,
181184
"Validators": [
182185
{
183186
"ValidatorType": "Regex",

src/AWS.Deploy.Recipes/RecipeDefinitions/ConsoleAppECSFargateService.recipe

+4
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@
176176
"TypeHint": "ECSCluster",
177177
"AdvancedSetting": false,
178178
"Updatable": false,
179+
"VisibleOnRedeployment": true,
179180
"ChildOptionSettings": [
180181
{
181182
"Id": "CreateNew",
@@ -194,6 +195,7 @@
194195
"TypeHint": "ExistingECSCluster",
195196
"AdvancedSetting": false,
196197
"Updatable": false,
198+
"VisibleOnRedeployment": true,
197199
"Validators": [
198200
{
199201
"ValidatorType": "Regex",
@@ -218,6 +220,7 @@
218220
"DefaultValue": "{StackName}",
219221
"AdvancedSetting": false,
220222
"Updatable": false,
223+
"VisibleOnRedeployment": true,
221224
"Validators": [
222225
{
223226
"ValidatorType": "Regex",
@@ -247,6 +250,7 @@
247250
"DefaultValue": "{StackName}-service",
248251
"AdvancedSetting": false,
249252
"Updatable": false,
253+
"VisibleOnRedeployment": true,
250254
"Validators": [
251255
{
252256
"ValidatorType": "Regex",

src/AWS.Deploy.Recipes/RecipeDefinitions/aws-deploy-recipe-schema.json

+6
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,12 @@
587587
"description": "If the setting is false the setting can not be changed during redeployment.",
588588
"minLength": 1
589589
},
590+
"VisibleOnRedeployment": {
591+
"type": "boolean",
592+
"title": "VisibleOnRedeployment",
593+
"description": "If the value is true, the setting will be displayed during a redeployment. This only applies to server-mode clients.",
594+
"minLength": 1
595+
},
590596
"DependsOn": {
591597
"type": "array",
592598
"title": "",

0 commit comments

Comments
 (0)