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:
Candice Ye
2021-10-21 16:51:31 -07:00
committed by GitHub
parent 5fe569e864
commit dc0651aef7
10 changed files with 321 additions and 21 deletions

View File

@@ -24,9 +24,15 @@ declare module 'resource-deployment' {
getIsPassword?: (variableName: string) => boolean | Promise<boolean>;
}
export type InputValueType = string | number | boolean | undefined;
/**
* Gets a calculated value based on the given input values.
* @param triggerValues A map of the trigger field names and their current values specified in the valueProvider field info
*/
export interface IValueProvider {
readonly id: string,
getValue(triggerValue: string): Promise<string>;
getValue(triggerValues: string | {[key: string]: InputValueType}): Promise<InputValueType>;
}
/**