mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Added a dynamic Cost Summary section to SQL MIAA Deployment Wizard (#17420)
* Added valueprovider for pricing. Pushing this for troubleshooting help. * Committing changes for troubleshooting help. Moved InputValueType to typings file. * Add readonly inputs to list * Fixed ordering of package.json merge items * Estimated cost moved to input page, ValueProvider only takes in a triggerfields[] and not a single string, fixed pricing logic. * Removed pricingModel.ts * Reverted some comments and code changes that were used in debugging. * Changed some values from localizedConstants to single-quote constants' * Changed some values from localizedConstants to single-quote constants' * Added copyright header to pricingUtils.ts * Removed try catch in extension.ts valueproviders, made some values in PricingUtils.ts top-level instead of exporting. * Minor changes, added some comments and localized USD. * Changes pricingutils classes to be constants, and added disposable to Hookupvalueprovider Co-authored-by: Candice Ye <canye@microsoft.com> Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -1079,6 +1079,7 @@
|
||||
"variableName": "AZDATA_NB_VAR_SQL_CORES_REQUEST",
|
||||
"type": "number",
|
||||
"min": 1,
|
||||
"defaultValue": 2,
|
||||
"required": false,
|
||||
"validations": [
|
||||
{
|
||||
@@ -1095,6 +1096,7 @@
|
||||
"type": "number",
|
||||
"min": 1,
|
||||
"required": false,
|
||||
"defaultValue": 4,
|
||||
"validations": [
|
||||
{
|
||||
"type": ">=",
|
||||
@@ -1109,6 +1111,7 @@
|
||||
"variableName": "AZDATA_NB_VAR_SQL_MEMORY_REQUEST",
|
||||
"type": "number",
|
||||
"min": 2,
|
||||
"defaultValue": 4,
|
||||
"required": false,
|
||||
"validations": [
|
||||
{
|
||||
@@ -1124,6 +1127,7 @@
|
||||
"variableName": "AZDATA_NB_VAR_SQL_MEMORY_LIMIT",
|
||||
"type": "number",
|
||||
"min": 2,
|
||||
"defaultValue": 8,
|
||||
"required": false,
|
||||
"validations": [
|
||||
{
|
||||
@@ -1136,9 +1140,9 @@
|
||||
{
|
||||
"type": "options",
|
||||
"label": "%arc.sql.service.tier.label%",
|
||||
"variableName": "AZDATA_NB_VAR_SQL_SERVICE_TIER",
|
||||
"description": "%arc.sql.service.tier.description%",
|
||||
"required": true,
|
||||
"variableName": "AZDATA_NB_VAR_SQL_SERVICE_TIER",
|
||||
"options": {
|
||||
"values": [
|
||||
"%arc.sql.service.tier.business.critical%",
|
||||
@@ -1151,10 +1155,16 @@
|
||||
{
|
||||
"type": "checkbox",
|
||||
"label": "%arc.sql.dev.use.label%",
|
||||
"description": "%arc.sql.dev.use.description%",
|
||||
"defaultValue": "false",
|
||||
"variableName": "AZDATA_NB_VAR_SQL_DEV_USE",
|
||||
"required": true
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1184,8 +1194,81 @@
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "%arc.sql.cost.summary%",
|
||||
"fields": [
|
||||
{
|
||||
"label": "%arc.sql.cost.summary.additional.charge%",
|
||||
"type": "readonly_text",
|
||||
"enabled": true,
|
||||
"labelWidth": "750px",
|
||||
"links": [
|
||||
{
|
||||
"text": "%arc.sql.cost.summary.pricing.details%",
|
||||
"url": "https://aka.ms/ArcSQLBilling"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "%arc.sql.cost.summary.cost.vcore%",
|
||||
"type": "readonly_text",
|
||||
"isEvaluated": true,
|
||||
"defaultValue": "0.00 USD",
|
||||
"valueProvider": {
|
||||
"providerId": "params-to-cost-per-vcore",
|
||||
"triggerFields": [
|
||||
"AZDATA_NB_VAR_SQL_DEV_USE",
|
||||
"AZDATA_NB_VAR_SQL_SERVICE_TIER"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "%arc.sql.cost.summary.vcore.limit%",
|
||||
"type": "readonly_text",
|
||||
"isEvaluated": true,
|
||||
"defaultValue": "x 4",
|
||||
"valueProvider": {
|
||||
"providerId": "params-to-vcore-limit",
|
||||
"triggerFields": [
|
||||
"AZDATA_NB_VAR_SQL_CORES_LIMIT"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "%arc.sql.cost.summary.azure.hybrid.benefit.discount%",
|
||||
"type": "readonly_text",
|
||||
"isEvaluated": true,
|
||||
"defaultValue": "- 0",
|
||||
"valueProvider": {
|
||||
"providerId": "params-to-hybrid-benefit-discount",
|
||||
"triggerFields": [
|
||||
"AZDATA_NB_VAR_SQL_CORES_LIMIT",
|
||||
"AZDATA_NB_VAR_SQL_DEV_USE",
|
||||
"AZDATA_NB_VAR_SQL_SERVICE_TIER",
|
||||
"AZDATA_NB_VAR_SQL_LICENSE_TYPE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "%arc.sql.cost.summary.estimated.cost.per.month%",
|
||||
"type": "readonly_text",
|
||||
"variableName": "AZDATA_NB_VAR_SQL_ESTIMATED_COST",
|
||||
"defaultValue": "0.00 USD",
|
||||
"valueProvider": {
|
||||
"providerId": "params-to-estimated-cost",
|
||||
"triggerFields": [
|
||||
"AZDATA_NB_VAR_SQL_REPLICAS",
|
||||
"AZDATA_NB_VAR_SQL_CORES_LIMIT",
|
||||
"AZDATA_NB_VAR_SQL_DEV_USE",
|
||||
"AZDATA_NB_VAR_SQL_SERVICE_TIER",
|
||||
"AZDATA_NB_VAR_SQL_LICENSE_TYPE"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user