mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Added dynamic options for SQL MIAA Deployment Wizard and updated checkbox field (#17119)
* Dynamic enablement * Added new package.json field for dynamic options and corresponding functions and classes. * Enabled dynamic options non-generalized and changed formatting of checkbox to have label on the left. * Added setOptions under InputComponentInfo for generalization, comments under checkbox component, and changed Replicas to High Availability to reflect parity in portal. * fix unit test Co-authored-by: Candice Ye <canye@microsoft.com> Co-authored-by: Alan Ren <alanren@microsoft.com>
This commit is contained in:
@@ -242,6 +242,10 @@ export function instanceOfDynamicEnablementInfo(obj: any): obj is DynamicEnablem
|
||||
return (<DynamicEnablementInfo>obj)?.target !== undefined && (<DynamicEnablementInfo>obj)?.value !== undefined;
|
||||
}
|
||||
|
||||
export function instanceOfDynamicOptionsInfo(obj: any): obj is DynamicOptionsInfo {
|
||||
return (<DynamicOptionsInfo>obj)?.target !== undefined && (<DynamicOptionsInfo>obj)?.alternates !== undefined;
|
||||
}
|
||||
|
||||
export interface DialogInfoBase {
|
||||
title: string;
|
||||
name: string;
|
||||
@@ -290,6 +294,17 @@ export interface DynamicEnablementInfo {
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface DynamicOptionsInfo {
|
||||
target: string,
|
||||
alternates: DynamicOptionsAlternates[]
|
||||
}
|
||||
|
||||
export interface DynamicOptionsAlternates {
|
||||
selection: string,
|
||||
alternateValues: string[],
|
||||
defaultValue: string
|
||||
}
|
||||
|
||||
export interface ValueProviderInfo {
|
||||
providerId: string,
|
||||
triggerField: string
|
||||
@@ -340,6 +355,7 @@ export interface FieldInfo extends SubFieldInfo, FieldInfoBase {
|
||||
links?: azdata.LinkArea[];
|
||||
editable?: boolean; // for editable drop-down,
|
||||
enabled?: boolean | DynamicEnablementInfo;
|
||||
dynamicOptions?: DynamicOptionsInfo;
|
||||
isEvaluated?: boolean;
|
||||
validations?: ValidationInfo[];
|
||||
valueProvider?: ValueProviderInfo;
|
||||
|
||||
Reference in New Issue
Block a user