Custom Summary Page for NotebookWizard and notebook Cell with wizard variables (#10297)

* save not yet tested work

* Merge from master.

* Screeens Shared for Feeedback

* Code complete

* remove unneeded changes

* remove unnecessary comma

* remov wss

* remove dead code

* PR feedback

* checkpoint fixes

* PR & minor fixes

* minor fix for feature of  resourceType options being optional.

* reverting experimental change

* separating out changes for future featurework.

* revert unneeded change

* review feedback fixes

* review feedback

* rename InputFieldComponent to InputComponent

* working version of custom summary page

* add option to align items in a flex- container.

* changes to support labelColor

* save work , still pending issue with labelCSSStyles

* Summary page and setting variabless in notebook.

* minor fixes.

* pr feedbck

* fix formatting issues

* pr feedback

* pr feedback

* pr feedback

* fixing docs

* summary page value setting fix

* rename children of RowInfo to items

* rename a method

* rename summary_text to evaluated_text

* rename properties of fieldInfo

* revert inadvertent change

* rename linked_texttext to hyperlinked_text and removing linking facility from readonly_text

* pr feedback

* fix setting tools variables in env and notebook

* removing saving of originalValues for EvaluatedText

* await on launchNotebookWithEdits

* await on launchNotebookWithContent

* merge RadioOptions & Options into 1

* merge ReadOnlyText, links  & evaluatedText

* Samples for new generic wizard features

* fix comment

* fix assertions

* return type and comment for getClusterContext

* fix inadvertent change

* increase minimum required azdata version

* remove unneeded environment variable settings

* not leaking passwords in notebooks
This commit is contained in:
Arvind Ranasaria
2020-06-01 11:14:59 -07:00
committed by GitHub
parent 84492049e8
commit 678bbe3142
23 changed files with 1190 additions and 473 deletions

View File

@@ -42,7 +42,7 @@ export interface DialogDeploymentProvider extends DeploymentProviderBase {
}
export interface BdcWizardDeploymentProvider extends DeploymentProviderBase {
bdcWizard: WizardInfo;
bdcWizard: BdcWizardInfo;
}
export interface NotebookWizardDeploymentProvider extends DeploymentProviderBase {
@@ -50,7 +50,7 @@ export interface NotebookWizardDeploymentProvider extends DeploymentProviderBase
}
export interface NotebookDeploymentProvider extends DeploymentProviderBase {
notebook: string | NotebookInfo;
notebook: string | NotebookPathInfo;
}
export interface WebPageDeploymentProvider extends DeploymentProviderBase {
@@ -100,31 +100,32 @@ export interface DeploymentProviderBase {
export type DeploymentProvider = DialogDeploymentProvider | BdcWizardDeploymentProvider | NotebookWizardDeploymentProvider | NotebookDeploymentProvider | WebPageDeploymentProvider | DownloadDeploymentProvider | CommandDeploymentProvider;
export interface WizardInfo {
notebook: string | NotebookInfo;
export interface BdcWizardInfo {
notebook: string | NotebookPathInfo;
type: BdcDeploymentType;
}
export interface NotebookWizardInfo extends WizardInfoBase {
notebook: string | NotebookInfo;
notebook: string | NotebookPathInfo;
runNotebook?: boolean;
codeCellInsertionPosition?: number;
pages: NotebookWizardPageInfo[]
}
export interface WizardInfoBase extends SharedFieldAttributes {
export interface WizardInfoBase extends FieldInfoBase {
taskName?: string;
type?: DeploymentType;
runNotebook?: boolean;
actionText?: string;
title: string;
pages: NotebookWizardPageInfo[];
summaryPage: NotebookWizardPageInfo;
generateSummaryPage: boolean;
pages: PageInfoBase[];
isSummaryPageAutoGenerated?: boolean
}
export interface NotebookWizardPageInfo extends PageInfoBase {
description?: string;
}
export interface NotebookBasedDialogInfo extends DialogInfoBase {
notebook: string | NotebookInfo;
notebook: string | NotebookPathInfo;
runNotebook?: boolean;
taskName?: string;
}
@@ -153,18 +154,39 @@ export interface DialogInfoBase {
export interface DialogTabInfo extends PageInfoBase {
}
export interface PageInfoBase extends SharedFieldAttributes {
export interface PageInfoBase extends FieldInfoBase {
title: string;
isSummaryPage?: boolean;
sections: SectionInfo[];
}
export interface SharedFieldAttributes {
export interface TextCSSStyles {
fontStyle?: FontStyle | undefined;
fontWeight?: FontWeight | undefined;
color?: string;
[key: string]: string | undefined;
}
export type ComponentCSSStyles = {
[key: string]: string;
};
export interface OptionsInfo {
values: string[] | azdata.CategoryValue[],
defaultValue: string,
optionsType?: OptionsType
}
export interface FieldInfoBase {
labelWidth?: string;
inputWidth?: string;
labelPosition?: LabelPosition; // Default value is top
fieldWidth?: string;
fieldHeight?: string;
fieldAlignItems?: azdata.AlignItemsType;
}
export interface SectionInfo extends SharedFieldAttributes {
export interface SectionInfo extends FieldInfoBase {
title?: string;
fields?: FieldInfo[]; // Use this if the dialog is not wide. All fields will be displayed in one column, label will be placed on top of the input component.
rows?: RowInfo[]; // Use this for wide dialog or wizard. label will be placed to the left of the input component.
@@ -174,7 +196,8 @@ export interface SectionInfo extends SharedFieldAttributes {
}
export interface RowInfo {
fields: FieldInfo[];
cssStyles?: ComponentCSSStyles;
items: FieldInfo[] | RowInfo[];
}
export interface SubFieldInfo {
@@ -182,7 +205,7 @@ export interface SubFieldInfo {
variableName?: string;
}
export interface FieldInfo extends SubFieldInfo, SharedFieldAttributes {
export interface FieldInfo extends SubFieldInfo, FieldInfoBase {
subFields?: SubFieldInfo[];
type: FieldType;
defaultValue?: string;
@@ -194,22 +217,23 @@ export interface FieldInfo extends SubFieldInfo, SharedFieldAttributes {
min?: number;
max?: number;
required?: boolean;
options?: string[] | azdata.CategoryValue[];
options?: string[] | azdata.CategoryValue[] | OptionsInfo;
placeHolder?: string;
userName?: string; // needed for sql server's password complexity requirement check, password can not include the login name.
description?: string;
fontStyle?: FontStyle;
labelFontWeight?: FontWeight;
textFontWeight?: FontWeight;
labelCSSStyles?: TextCSSStyles;
fontWeight?: FontWeight;
links?: azdata.LinkArea[];
editable?: boolean; // for editable drop-down,
enabled?: boolean;
isEvaluated?: boolean;
}
export interface KubeClusterContextFieldInfo extends FieldInfo {
configFileVariableName?: string;
}
export interface AzureAccountFieldInfo extends AzureLocationsFieldInfo {
displaySubscriptionVariableName?: string;
subscriptionVariableName?: string;
resourceGroupVariableName?: string;
}
@@ -242,16 +266,20 @@ export enum FieldType {
SQLPassword = 'sql_password',
Password = 'password',
Options = 'options',
RadioOptions = 'radio_options',
ReadonlyText = 'readonly_text',
Checkbox = 'checkbox',
AzureAccount = 'azure_account',
AzureLocations = 'azure_locations',
FilePicker = 'file_picker',
KubeClusterContextPicker = 'kube_cluster_context_picker'
KubeClusterContextPicker = 'kube_cluster_context_picker',
}
export interface NotebookInfo {
export enum OptionsType {
Dropdown = 'dropdown',
Radio = 'radio'
}
export interface NotebookPathInfo {
win32: string;
darwin: string;
linux: string;