Enabled dynamic options to use CategoryValue type. SQL MIAA deploy now up to parity with Portal. (#18279)

* Removed extra backup policy field in MIAA deploy. Re-ordered fields in MIAA deploy for parity.

* Enabled dynamic options to work with categoryvalue type objects.

* Removed defaultValue CategoryValue typing, fixed some type checks.

* Added a clarifying comment to setModelValues and removed unnecessary type from defaultValue

* Removed CategoryValue from selection

* Undo parenthesis for single type
This commit is contained in:
Candice Ye
2022-02-11 11:19:30 -08:00
committed by GitHub
parent 56f72e33b1
commit 85cfde7421
5 changed files with 70 additions and 77 deletions

View File

@@ -1045,16 +1045,50 @@
"fields": [
{
"type": "options",
"label": "%arc.sql.replicas%",
"label": "%arc.sql.service.tier.label%",
"variableName": "AZDATA_NB_VAR_SQL_SERVICE_TIER",
"description": "%arc.sql.service.tier.description%",
"required": true,
"options": {
"values": [
{
"name": "BusinessCritical",
"displayName": "%arc.sql.service.tier.business.critical%"
},
{
"name": "GeneralPurpose",
"displayName": "%arc.sql.service.tier.general.purpose%"
}
],
"defaultValue": "BusinessCritical",
"optionsType": "radio"
}
},
{
"type": "checkbox",
"label": "%arc.sql.dev.use.label%",
"variableName": "AZDATA_NB_VAR_SQL_DEV_USE",
"description": "%arc.sql.dev.use.description%",
"defaultValue": false
},
{
"type": "options",
"label": "%arc.sql.high.availability%",
"description": "%arc.sql.high.availability.description%",
"required": true,
"variableName": "AZDATA_NB_VAR_SQL_REPLICAS",
"options": {
"values": [
"%arc.sql.two.replicas%",
"%arc.sql.three.replicas%"
{
"name": "2",
"displayName": "%arc.sql.two.replicas%"
},
{
"name": "3",
"displayName": "%arc.sql.three.replicas%"
}
],
"defaultValue": "%arc.sql.two.replicas%",
"defaultValue": "2",
"optionsType": "radio"
},
"dynamicOptions":
@@ -1062,15 +1096,25 @@
"target": "AZDATA_NB_VAR_SQL_SERVICE_TIER",
"alternates": [
{
"selection": "%arc.sql.service.tier.general.purpose%",
"selection": "GeneralPurpose",
"alternateValues": [
"%arc.sql.one.replica%"
{
"name": "1",
"displayName": "%arc.sql.one.replica%"
}
],
"defaultValue": "%arc.sql.one.replica%"
"defaultValue": "1"
}
]
}
},
{
"type": "checkbox",
"label": "%arc.sql.license.type.label%",
"variableName": "AZDATA_NB_VAR_SQL_LICENSE_TYPE",
"description": "%arc.sql.license.type.description%",
"defaultValue": false
},
{
"label": "%arc.storage-class.data.label%",
"description": "%arc.sql.storage-class.data.description%",
@@ -1198,62 +1242,6 @@
"description": "%memory.limit.greater.than.or.equal.to.requested.memory%"
}
]
},
{
"type": "options",
"label": "%arc.sql.service.tier.label%",
"variableName": "AZDATA_NB_VAR_SQL_SERVICE_TIER",
"description": "%arc.sql.service.tier.description%",
"required": true,
"options": {
"values": [
"%arc.sql.service.tier.business.critical%",
"%arc.sql.service.tier.general.purpose%"
],
"defaultValue": "%arc.sql.service.tier.business.critical%",
"optionsType": "radio"
}
},
{
"type": "checkbox",
"label": "%arc.sql.dev.use.label%",
"variableName": "AZDATA_NB_VAR_SQL_DEV_USE",
"description": "%arc.sql.dev.use.description%",
"defaultValue": false
},
{
"type": "checkbox",
"label": "%arc.sql.license.type.label%",
"variableName": "AZDATA_NB_VAR_SQL_LICENSE_TYPE",
"description": "%arc.sql.license.type.description%",
"defaultValue": false
}
]
},
{
"title": "%arc.sql.instance.retention.policy.title%",
"fields": [
{
"type": "readonly_text",
"label": "%arc.sql.pitr.retention.description%",
"labelWidth": "600px",
"enabled": true,
"fieldHeight": "10px",
"links": [
{
"text": "%arc.agreement.sql.help.text.learn.more%",
"url": "https://docs.microsoft.com/azure/azure-arc/data/point-in-time-restore"
}
]
},
{
"label": "%arc.sql.retention.days.label%",
"description": "%arc.sql.retention.days.description%",
"variableName": "AZDATA_NB_VAR_SQL_RETENTION_DAYS",
"type": "number",
"min": 0,
"max": 35,
"required": false
}
]
},