Change Azure region dropdown to use azurecore API (#11131)

* Change Azure region dropdown to use azurecore API for getting display name

* Fix compile errors

* Adding a few things to the vscodeignore

* and another
This commit is contained in:
Charles Gagnon
2020-06-29 12:44:04 -07:00
committed by GitHub
parent e540096e07
commit 064ada1d2f
13 changed files with 70 additions and 90 deletions

View File

@@ -125,8 +125,8 @@ export class AzureSettingsPage extends WizardPageBase<DeployClusterWizard> {
}]
}]
};
this.pageObject.registerContent((view: azdata.ModelView) => {
const azureGroup = createSection({
this.pageObject.registerContent(async (view: azdata.ModelView) => {
const azureGroup = await createSection({
sectionInfo: azureSection,
view: view,
onNewDisposableCreated: (disposable: vscode.Disposable): void => {
@@ -157,7 +157,7 @@ export class AzureSettingsPage extends WizardPageBase<DeployClusterWizard> {
});
}
public onEnter(): void {
public async onEnter(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
this.wizard.wizardObject.message = { text: '' };
if (pcInfo.newPage > pcInfo.lastPage) {

View File

@@ -201,8 +201,8 @@ export class ClusterSettingsPage extends WizardPageBase<DeployClusterWizard> {
}
]
};
this.pageObject.registerContent((view: azdata.ModelView) => {
const basicSettingsGroup = createSection({
this.pageObject.registerContent(async (view: azdata.ModelView) => {
const basicSettingsGroup = await createSection({
view: view,
container: self.wizard.wizardObject,
inputComponents: this.wizard.inputComponents,
@@ -217,7 +217,7 @@ export class ClusterSettingsPage extends WizardPageBase<DeployClusterWizard> {
self.validators.push(validator);
}
});
const activeDirectorySettingsGroup = createSection({
const activeDirectorySettingsGroup = await createSection({
view: view,
container: self.wizard.wizardObject,
inputComponents: this.wizard.inputComponents,
@@ -232,7 +232,7 @@ export class ClusterSettingsPage extends WizardPageBase<DeployClusterWizard> {
self.validators.push(validator);
}
});
const dockerSettingsGroup = createSection({
const dockerSettingsGroup = await createSection({
view: view,
container: self.wizard.wizardObject,
inputComponents: this.wizard.inputComponents,
@@ -301,7 +301,7 @@ export class ClusterSettingsPage extends WizardPageBase<DeployClusterWizard> {
});
}
public onEnter() {
public async onEnter(): Promise<void> {
getInputBoxComponent(VariableNames.DockerRegistry_VariableName, this.inputComponents).value = this.wizard.model.getStringValue(VariableNames.DockerRegistry_VariableName);
getInputBoxComponent(VariableNames.DockerRepository_VariableName, this.inputComponents).value = this.wizard.model.getStringValue(VariableNames.DockerRepository_VariableName);
getInputBoxComponent(VariableNames.DockerImageTag_VariableName, this.inputComponents).value = this.wizard.model.getStringValue(VariableNames.DockerImageTag_VariableName);

View File

@@ -216,7 +216,7 @@ export class DeploymentProfilePage extends WizardPageBase<DeployClusterWizard> {
.component();
}
public onEnter() {
public async onEnter(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
this.wizard.wizardObject.message = { text: '' };
if (pcInfo.newPage > pcInfo.lastPage) {

View File

@@ -114,9 +114,9 @@ export class ServiceSettingsPage extends WizardPageBase<DeployClusterWizard> {
]
};
this.pageObject.registerContent((view: azdata.ModelView) => {
const createSectionFunc = (sectionInfo: SectionInfo): azdata.GroupContainer => {
return createSection({
this.pageObject.registerContent(async (view: azdata.ModelView) => {
const createSectionFunc = async (sectionInfo: SectionInfo): Promise<azdata.GroupContainer> => {
return await createSection({
view: view,
container: this.wizard.wizardObject,
inputComponents: this.inputComponents,
@@ -131,7 +131,7 @@ export class ServiceSettingsPage extends WizardPageBase<DeployClusterWizard> {
}
});
};
const scaleSection = createSectionFunc(scaleSectionInfo);
const scaleSection = await createSectionFunc(scaleSectionInfo);
this.endpointSection = this.createEndpointSection(view);
const storageSection = this.createStorageSection(view);
@@ -322,7 +322,7 @@ export class ServiceSettingsPage extends WizardPageBase<DeployClusterWizard> {
};
}
public onEnter(): void {
public async onEnter(): Promise<void> {
this.setInputBoxValue(VariableNames.ComputePoolScale_VariableName);
this.setInputBoxValue(VariableNames.DataPoolScale_VariableName);
this.setInputBoxValue(VariableNames.HDFSPoolScale_VariableName);

View File

@@ -29,7 +29,7 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
});
}
public onEnter() {
public async onEnter(): Promise<void> {
this.wizard.showCustomButtons();
this.formItems.forEach(item => {
this.form!.removeFormItem(item);
@@ -279,10 +279,10 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
]
};
const createSectionFunc = (sectionInfo: SectionInfo): azdata.FormComponent => {
const createSectionFunc = async (sectionInfo: SectionInfo): Promise<azdata.FormComponent> => {
return {
title: '',
component: createSection({
component: await createSection({
container: this.wizard.wizardObject,
inputComponents: this.wizard.inputComponents,
sectionInfo: sectionInfo,
@@ -295,12 +295,12 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
};
if (this.wizard.deploymentType === BdcDeploymentType.ExistingAKS || this.wizard.deploymentType === BdcDeploymentType.ExistingKubeAdm) {
const deploymentTargetSection = createSectionFunc(deploymentTargetSectionInfo);
const deploymentTargetSection = await createSectionFunc(deploymentTargetSectionInfo);
this.formItems.push(deploymentTargetSection);
}
const clusterSection = createSectionFunc(clusterSectionInfo);
const scaleSection = createSectionFunc(scaleSectionInfo);
const clusterSection = await createSectionFunc(clusterSectionInfo);
const scaleSection = await createSectionFunc(scaleSectionInfo);
const endpointSection = {
title: '',
component: this.createEndpointSection()
@@ -310,7 +310,7 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
component: this.createStorageSection()
};
if (this.wizard.model.getStringValue(VariableNames.AksName_VariableName)) {
const azureSection = createSectionFunc(azureSectionInfo);
const azureSection = await createSectionFunc(azureSectionInfo);
this.formItems.push(azureSection);
}

View File

@@ -51,7 +51,7 @@ export class TargetClusterContextPage extends WizardPageBase<DeployClusterWizard
});
}
public onEnter() {
public async onEnter(): Promise<void> {
if (this.loadDefaultKubeConfigFile) {
let defaultKubeConfigPath = this.wizard.kubeService.getDefaultConfigPath();
this.loadClusterContexts(defaultKubeConfigPath);