wizard for deploying bdc (#7183)

* wip

* wip2

* wip eod 820

* wip 822

* text component improvements and misc changes

* aria-label

* targetClusterPage wip

* target cluster page

* target cluster page

* wip 827

* wip deployment profile page

* profile page

* service settings page

* wip 0903

* 0909 wip

* 0910

* 0911

* sql instance and working directory

* notebooks

* docker version on windows

* EULA env var

* 917 updates

* address comments

* use async file access

* fix the summary page display issue for ad auth

* add save json file buttons

* use promise for private methds

* review feedbacks

* refactor

* pass json to notebooks

* fix no tool scenario

* bypass tool check if installed

* update hint text

* update notebooks

* workaround azdata first time use

* comments

* accept eula and some text update

* fix the error in package.json

* promise instead of thenable

* comments

* fix typo
This commit is contained in:
Alan Ren
2019-09-25 10:04:13 -07:00
committed by GitHub
parent 6a6048d40f
commit a0e31fc723
51 changed files with 4137 additions and 855 deletions

View File

@@ -2,7 +2,10 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as azdata from 'azdata';
import { SemVer } from 'semver';
export const NoteBookEnvironmentVariablePrefix = 'AZDATA_NB_VAR_';
export interface ResourceType {
name: string;
@@ -12,9 +15,15 @@ export interface ResourceType {
icon: { light: string; dark: string };
options: ResourceTypeOption[];
providers: DeploymentProvider[];
agreement?: AgreementInfo;
getProvider(selectedOptions: { option: string, value: string }[]): DeploymentProvider | undefined;
}
export interface AgreementInfo {
template: string;
links: azdata.LinkArea[];
}
export interface ResourceTypeOption {
name: string;
displayName: string;
@@ -32,10 +41,16 @@ export interface DeploymentProvider {
notebook: string | NotebookInfo;
downloadUrl: string;
webPageUrl: string;
wizard: WizardInfo;
requiredTools: ToolRequirementInfo[];
when: string;
}
export interface WizardInfo {
notebook: string | NotebookInfo;
type: BdcDeploymentType;
}
export interface DialogInfo {
notebook: string | NotebookInfo;
title: string;
@@ -45,27 +60,56 @@ export interface DialogInfo {
export interface DialogTabInfo {
title: string;
sections: DialogSectionInfo[];
sections: SectionInfo[];
labelWidth?: string;
inputWidth?: string;
}
export interface DialogSectionInfo {
export interface SectionInfo {
title: string;
fields: DialogFieldInfo[];
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.
labelWidth?: string;
inputWidth?: string;
labelPosition?: LabelPosition; // Default value is top
collapsible?: boolean;
collapsed?: boolean;
spaceBetweenFields?: string;
}
export interface DialogFieldInfo {
export interface RowInfo {
fields: FieldInfo[];
}
export interface FieldInfo {
label: string;
variableName: string;
variableName?: string;
type: FieldType;
defaultValue: string;
confirmationRequired: boolean;
confirmationLabel: string;
defaultValue?: string;
confirmationRequired?: boolean;
confirmationLabel?: string;
min?: number;
max?: number;
required: boolean;
options: string[];
placeHolder: string;
userName?: string; //needed for sql server's password complexity requirement check, password can not include the login name.
required?: boolean;
options?: string[] | azdata.CategoryValue[];
placeHolder?: string;
userName?: string; // needed for sql server's password complexity requirement check, password can not include the login name.
labelWidth?: string;
inputWidth?: string;
description?: string;
useCustomValidator?: boolean;
labelPosition?: LabelPosition; // overwrite the labelPosition of SectionInfo.
fontStyle?: FontStyle;
}
export enum LabelPosition {
Top = 'top',
Left = 'left'
}
export enum FontStyle {
Normal = 'normal',
Italic = 'italic'
}
export enum FieldType {
@@ -74,7 +118,9 @@ export enum FieldType {
DateTimeText = 'datetime_text',
SQLPassword = 'sql_password',
Password = 'password',
Options = 'options'
Options = 'options',
ReadonlyText = 'readonly_text',
Checkbox = 'checkbox'
}
export interface NotebookInfo {
@@ -100,4 +146,15 @@ export interface ITool {
readonly displayName: string;
readonly description: string;
readonly type: ToolType;
readonly version: SemVer | undefined;
readonly homePage: string;
readonly isInstalled: boolean;
loadInformation(): Promise<void>;
readonly statusDescription: string | undefined;
}
export enum BdcDeploymentType {
NewAKS = 'new-aks',
ExistingAKS = 'existing-aks',
ExistingKubeAdm = 'existing-kubeadm'
}