Machine Learning Model Registry - Iteration1 (#9105)

* Machine learning services extension - model registration wizard
This commit is contained in:
Leila Lali
2020-02-26 09:19:48 -08:00
committed by GitHub
parent 067fcc8dfb
commit ff207859d6
46 changed files with 3990 additions and 210 deletions

View File

@@ -0,0 +1,45 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import { ApiWrapper } from '../common/apiWrapper';
import { IPageView } from './interfaces';
/**
* Base class for dialog and wizard
*/
export class MainViewBase {
protected _pages: IPageView[] = [];
/**
*
*/
constructor(protected _apiWrapper: ApiWrapper) {
}
protected registerContent(viewPanel: azdata.window.DialogTab | azdata.window.WizardPage, componentView: IPageView) {
viewPanel.registerContent(async view => {
if (componentView) {
let component = componentView.registerComponent(view.modelBuilder);
await view.initializeModel(component);
await componentView.refresh();
}
});
}
protected addPage(page: IPageView, index?: number): void {
if (index) {
this._pages[index] = page;
} else {
this._pages.push(page);
}
}
public async refresh(): Promise<void> {
if (this._pages) {
await Promise.all(this._pages.map(p => p.refresh()));
}
}
}