Machine Learning Services Extension - Predict wizard (#9450)

*MLS extension - Added predict wizard
This commit is contained in:
Leila Lali
2020-03-09 15:40:05 -07:00
committed by GitHub
parent b017634431
commit 3be3563b0d
37 changed files with 1501 additions and 219 deletions

View File

@@ -45,6 +45,19 @@ export class WizardView extends MainViewBase {
}
}
/**
* Adds wizard page
* @param page page
* @param index page index
*/
public removeWizardPage(page: IPageView, index: number): void {
if (this._wizard && this._pages[index] === page) {
this._pages = this._pages.splice(index);
this._wizard.removePage(index);
}
}
/**
*
* @param title Creates anew wizard
@@ -57,9 +70,21 @@ export class WizardView extends MainViewBase {
this._wizard.onPageChanged(async (info) => {
this.onWizardPageChanged(info);
});
return this._wizard;
}
public async validate(pageInfo: azdata.window.WizardPageChangeInfo): Promise<boolean> {
if (pageInfo.lastPage !== undefined) {
let idxLast = pageInfo.lastPage;
let lastPage = this._pages[idxLast];
if (lastPage && lastPage.validate) {
return await lastPage.validate();
}
}
return true;
}
private onWizardPageChanged(pageInfo: azdata.window.WizardPageChangeInfo) {
let idxLast = pageInfo.lastPage;
let lastPage = this._pages[idxLast];
@@ -73,4 +98,8 @@ export class WizardView extends MainViewBase {
page.onEnter();
}
}
public get wizard(): azdata.window.Wizard | undefined {
return this._wizard;
}
}