mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
@@ -39,8 +39,15 @@ export class CurrentModelsComponent extends ModelViewBase implements IPageView {
|
||||
* @param modelBuilder register the components
|
||||
*/
|
||||
public registerComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
this._tableSelectionComponent = new TableSelectionComponent(this._apiWrapper, this, { editable: false, preSelected: true });
|
||||
this._tableSelectionComponent.registerComponent(modelBuilder, constants.databaseName, constants.tableName);
|
||||
this._tableSelectionComponent = new TableSelectionComponent(this._apiWrapper, this, {
|
||||
editable: false,
|
||||
preSelected: true,
|
||||
databaseTitle: constants.databaseName,
|
||||
tableTitle: constants.tableName,
|
||||
databaseInfo: constants.modelDatabaseInfo,
|
||||
tableInfo: constants.modelTableInfo
|
||||
});
|
||||
this._tableSelectionComponent.registerComponent(modelBuilder);
|
||||
this._tableSelectionComponent.onSelectedChanged(async () => {
|
||||
await this.onTableSelected();
|
||||
});
|
||||
|
||||
@@ -34,12 +34,12 @@ export class ManageModelsDialog extends ModelViewBase {
|
||||
selectable: false
|
||||
});
|
||||
|
||||
let registerModelButton = this._apiWrapper.createButton(constants.importModelTitle);
|
||||
let registerModelButton = this._apiWrapper.createButton(constants.registerModelTitle);
|
||||
registerModelButton.onClick(async () => {
|
||||
await this.sendDataRequest(RegisterModelEventName, this.currentLanguagesTab?.modelTable?.importTable);
|
||||
});
|
||||
|
||||
let dialog = this.dialogView.createDialog(constants.registerModelTitle, [this.currentLanguagesTab]);
|
||||
let dialog = this.dialogView.createDialog(constants.importedModelTitle, [this.currentLanguagesTab]);
|
||||
dialog.isWide = true;
|
||||
dialog.customButtons = [registerModelButton];
|
||||
this.mainViewPanel = dialog;
|
||||
|
||||
@@ -35,7 +35,15 @@ export class ModelImportLocationPage extends ModelViewBase implements IPageView,
|
||||
public registerComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
|
||||
this._formBuilder = modelBuilder.formContainer();
|
||||
this.tableSelectionComponent = new TableSelectionComponent(this._apiWrapper, this, { editable: true, preSelected: true });
|
||||
this.tableSelectionComponent = new TableSelectionComponent(this._apiWrapper, this,
|
||||
{
|
||||
editable: true,
|
||||
preSelected: true,
|
||||
databaseTitle: constants.databaseName,
|
||||
tableTitle: constants.tableName,
|
||||
databaseInfo: constants.databaseToStoreInfo,
|
||||
tableInfo: constants.tableToStoreInfo
|
||||
});
|
||||
this._descriptionComponent = modelBuilder.text().withProperties({
|
||||
width: 200
|
||||
}).component();
|
||||
@@ -74,7 +82,7 @@ export class ModelImportLocationPage extends ModelViewBase implements IPageView,
|
||||
this.tableSelectionComponent.onSelectedChanged(async () => {
|
||||
await this.onTableSelected();
|
||||
});
|
||||
this.tableSelectionComponent.registerComponent(modelBuilder, constants.databaseName, constants.tableName);
|
||||
this.tableSelectionComponent.registerComponent(modelBuilder);
|
||||
this.tableSelectionComponent.addComponents(this._formBuilder);
|
||||
|
||||
this._formBuilder.addFormItem({
|
||||
|
||||
@@ -35,8 +35,16 @@ export class InputColumnsComponent extends ModelViewBase implements IDataCompone
|
||||
* @param modelBuilder model builder
|
||||
*/
|
||||
public registerComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
this._tableSelectionComponent = new TableSelectionComponent(this._apiWrapper, this, { editable: false, preSelected: false });
|
||||
this._tableSelectionComponent.registerComponent(modelBuilder, constants.columnDatabase, constants.columnTable);
|
||||
this._tableSelectionComponent = new TableSelectionComponent(this._apiWrapper, this,
|
||||
{
|
||||
editable: false,
|
||||
preSelected: false,
|
||||
databaseTitle: constants.columnDatabase,
|
||||
tableTitle: constants.columnTable,
|
||||
databaseInfo: constants.columnDatabaseInfo,
|
||||
tableInfo: constants.columnTableInfo
|
||||
});
|
||||
this._tableSelectionComponent.registerComponent(modelBuilder);
|
||||
this._tableSelectionComponent.onSelectedChanged(async () => {
|
||||
await this.onTableSelected();
|
||||
});
|
||||
|
||||
@@ -13,7 +13,11 @@ import * as constants from '../../common/constants';
|
||||
|
||||
export interface ITableSelectionSettings {
|
||||
editable: boolean,
|
||||
preSelected: boolean
|
||||
preSelected: boolean,
|
||||
databaseTitle: string,
|
||||
tableTitle: string,
|
||||
databaseInfo: string,
|
||||
tableInfo: string
|
||||
}
|
||||
/**
|
||||
* View to render filters to pick an azure resource
|
||||
@@ -47,7 +51,7 @@ export class TableSelectionComponent extends ModelViewBase implements IDataCompo
|
||||
* Register components
|
||||
* @param modelBuilder model builder
|
||||
*/
|
||||
public registerComponent(modelBuilder: azdata.ModelBuilder, databaseTitle: string, tableTitle: string): azdata.Component {
|
||||
public registerComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
this._databases = modelBuilder.dropDown().withProperties({
|
||||
width: this.componentMaxLength,
|
||||
}).component();
|
||||
@@ -111,23 +115,23 @@ export class TableSelectionComponent extends ModelViewBase implements IDataCompo
|
||||
});
|
||||
|
||||
const databaseForm = modelBuilder.formContainer().withFormItems([{
|
||||
title: databaseTitle,
|
||||
title: this._settings.databaseTitle,
|
||||
component: this._databases,
|
||||
}], { info: databaseTitle }).withLayout({
|
||||
}], { info: this._settings.databaseInfo }).withLayout({
|
||||
padding: '0px'
|
||||
}).component();
|
||||
|
||||
const tableForm = modelBuilder.formContainer();
|
||||
if (this._settings.editable) {
|
||||
tableForm.addFormItem({
|
||||
title: tableTitle,
|
||||
title: this._settings.tableTitle,
|
||||
component: group
|
||||
}, { info: tableTitle });
|
||||
}, { info: this._settings.tableInfo });
|
||||
} else {
|
||||
tableForm.addFormItem({
|
||||
title: tableTitle,
|
||||
title: this._settings.tableTitle,
|
||||
component: this._tables
|
||||
}, { info: tableTitle });
|
||||
}, { info: this._settings.tableInfo });
|
||||
}
|
||||
|
||||
this._dbTableComponent = modelBuilder.flexContainer().withItems([
|
||||
|
||||
@@ -339,6 +339,10 @@ export class DashboardWidget {
|
||||
}).component();
|
||||
|
||||
const links = [{
|
||||
title: constants.sqlMlExtDocTitle,
|
||||
description: constants.sqlMlExtDocDesc,
|
||||
link: constants.mlExtDocLink
|
||||
}, {
|
||||
title: constants.sqlMlDocTitle,
|
||||
description: constants.sqlMlDocDesc,
|
||||
link: constants.mlDocLink
|
||||
@@ -461,7 +465,7 @@ export class DashboardWidget {
|
||||
dark: this.asAbsolutePath('images/makePredictions.svg'),
|
||||
light: this.asAbsolutePath('images/makePredictions.svg'),
|
||||
},
|
||||
link: '',
|
||||
link: 'https://go.microsoft.com/fwlink/?linkid=2129795',
|
||||
command: constants.mlsPredictModelCommand
|
||||
};
|
||||
const predictionButton = this.createTaskButton(view, predictionMetadata);
|
||||
@@ -472,7 +476,7 @@ export class DashboardWidget {
|
||||
dark: this.asAbsolutePath('images/manageModels.svg'),
|
||||
light: this.asAbsolutePath('images/manageModels.svg'),
|
||||
},
|
||||
link: '',
|
||||
link: 'https://go.microsoft.com/fwlink/?linkid=2129796',
|
||||
command: constants.mlManageModelsCommand
|
||||
};
|
||||
const importModelsButton = this.createTaskButton(view, importMetadata);
|
||||
@@ -483,7 +487,7 @@ export class DashboardWidget {
|
||||
dark: this.asAbsolutePath('images/createNotebook.svg'),
|
||||
light: this.asAbsolutePath('images/createNotebook.svg'),
|
||||
},
|
||||
link: '',
|
||||
link: 'https://go.microsoft.com/fwlink/?linkid=2129920',
|
||||
command: constants.notebookCommandNew
|
||||
};
|
||||
const notebookModelsButton = this.createTaskButton(view, notebookMetadata);
|
||||
@@ -551,7 +555,7 @@ export class DashboardWidget {
|
||||
CSSStyles: {
|
||||
'padding': '0px',
|
||||
'padding-bottom': '5px',
|
||||
'width': '180px',
|
||||
'width': '200px',
|
||||
'margin': '0px',
|
||||
'color': '#006ab1'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user