ML - model source type page (#13077)

* Initial checkin

* Style adjustments.

* addressed PR comments

Co-authored-by: Hale Rankin <harankin@microsoft.com>
This commit is contained in:
Leila Lali
2020-10-28 11:57:59 -07:00
committed by GitHub
parent 429d8fe584
commit 5c474d8614
6 changed files with 163 additions and 75 deletions

View File

@@ -28,9 +28,14 @@ export interface PredictModelEventArgs extends PredictParameters {
export enum ModelSourceType {
Local,
Azure,
RegisteredModels
Local = 'Local',
Azure = 'Azure',
RegisteredModels = 'RegisteredModels'
}
export enum ModelActionType {
Import,
Predict
}
export interface ModelViewData {
@@ -74,6 +79,7 @@ export abstract class ModelViewBase extends ViewBase {
private _modelSourceType: ModelSourceType = ModelSourceType.Local;
private _modelsViewData: ModelViewData[] = [];
private _importTable: DatabaseTable | undefined;
private _modelActionType: ModelActionType = ModelActionType.Import;
constructor(apiWrapper: ApiWrapper, root?: string, parent?: ModelViewBase) {
super(apiWrapper, root, parent);
@@ -245,6 +251,28 @@ export abstract class ModelViewBase extends ViewBase {
return await this.sendDataRequest(ListGroupsEventName, args);
}
/**
* Sets model action type
*/
public set modelActionType(value: ModelActionType) {
if (this.parent) {
this.parent.modelActionType = value;
} else {
this._modelActionType = value;
}
}
/**
* Returns model action type
*/
public get modelActionType(): ModelActionType {
if (this.parent) {
return this.parent.modelActionType;
} else {
return this._modelActionType;
}
}
/**
* Sets model source type
*/