mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Machine Learning Services Extension - Predict wizard (#9450)
*MLS extension - Added predict wizard
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user