Skip to content

Commit b93bac7

Browse files
author
Dany Contreras
committed
updates
1 parent 95c7476 commit b93bac7

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

workload/portal-ui/brownfield/portalUiNewSessionHosts.json

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,31 @@
7979
"list": "value|[*].{label:name, value:id}"
8080
}
8181
}
82+
}
83+
]
84+
},
85+
{
86+
"name": "sessionHosts",
87+
"label": "Session Hosts",
88+
"elements": [
89+
{
90+
"name": "resourceSkusApi",
91+
"type": "Microsoft.Solutions.ArmApiControl",
92+
"condition": "[and(not(empty(steps('basics').resourceScope.subscription)), not(empty(steps('basics').resourceScope.location)))]",
93+
"request": {
94+
"method": "GET",
95+
"path": "[concat(steps('basics').resourceScope.subscription.id, '/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter=location eq ', decodeUriComponent('%27'), steps('basics').resourceScope.location.name, decodeUriComponent('%27'))]"
96+
}
8297
},
8398
{
84-
"name": "deployment",
99+
"name": "naming",
85100
"type": "Microsoft.Common.Section",
86-
"label": "Deployment Details",
101+
"label": "Virtual Machine Naming",
87102
"elements": [
88103
{
89104
"name": "prefix",
90105
"type": "Microsoft.Common.TextBox",
106+
"visible": "[not(steps('sessionHosts').naming.customNaming)]",
91107
"label": "Deployment Prefix",
92108
"subLabel": "",
93109
"defaultValue": "AVD1",
@@ -102,6 +118,7 @@
102118
"name": "environment",
103119
"type": "Microsoft.Common.DropDown",
104120
"label": "Deployment Environment",
121+
"visible": "[not(steps('sessionHosts').naming.customNaming)]",
105122
"defaultValue": "Dev",
106123
"toolTip": "The name of the resource group to deploy.",
107124
"constraints": {
@@ -121,30 +138,7 @@
121138
}
122139
]
123140
}
124-
}
125-
],
126-
"visible": true
127-
}
128-
]
129-
},
130-
{
131-
"name": "sessionHosts",
132-
"label": "Session Hosts",
133-
"elements": [
134-
{
135-
"name": "resourceSkusApi",
136-
"type": "Microsoft.Solutions.ArmApiControl",
137-
"condition": "[and(not(empty(steps('basics').resourceScope.subscription)), not(empty(steps('basics').resourceScope.location)))]",
138-
"request": {
139-
"method": "GET",
140-
"path": "[concat(steps('basics').resourceScope.subscription.id, '/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter=location eq ', decodeUriComponent('%27'), steps('basics').resourceScope.location.name, decodeUriComponent('%27'))]"
141-
}
142-
},
143-
{
144-
"name": "naming",
145-
"type": "Microsoft.Common.Section",
146-
"label": "Virtual Machine Naming",
147-
"elements": [
141+
},
148142
{
149143
"name": "customNaming",
150144
"type": "Microsoft.Common.CheckBox",
@@ -1027,8 +1021,8 @@
10271021
"hostPoolResourceId": "[steps('basics').hostPool.id]",
10281022
"location": "[steps('basics').resourceScope.location.name]",
10291023
"computeRgResourceGroupName": "[steps('basics').resourceGroup.name]",
1030-
"deploymentPrefix": "[steps('basics').deployment.prefix]",
1031-
"deploymentEnvironment": "[steps('basics').deployment.environment]",
1024+
"deploymentPrefix": "[if(not(steps('sessionHosts').naming.customNaming), steps('sessionHosts').naming.prefix, '')]",
1025+
"deploymentEnvironment": "[if(not(steps('sessionHosts').naming.customNaming), steps('sessionHosts').naming.environment, '')]",
10321026
"customNaming": "[steps('sessionHosts').naming.customNaming]",
10331027
"sessionHostCustomNamePrefix": "[if(steps('sessionHosts').naming.customNaming, steps('sessionHosts').naming.vmNamePrefix, 'notapp')]",
10341028
"count": "[steps('sessionHosts').naming.count]",

0 commit comments

Comments
 (0)