mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 09:42:34 -05:00
Machine Learning Services - Enabling external script for package management only (#9519)
* Machine learning services extension - removed config table and added config update to package manager
This commit is contained in:
@@ -13,8 +13,7 @@ import { ApiWrapper } from '../common/apiWrapper';
|
||||
import { QueryRunner } from '../common/queryRunner';
|
||||
import { ProcessService } from '../common/processService';
|
||||
import { Config } from '../configurations/config';
|
||||
import { ServerConfigWidget } from '../widgets/serverConfigWidgets';
|
||||
import { ServerConfigManager } from '../serverConfig/serverConfigManager';
|
||||
import { PackageManagementService } from '../packageManagement/packageManagementService';
|
||||
import { HttpClient } from '../common/httpClient';
|
||||
import { LanguageController } from '../views/externalLanguages/languageController';
|
||||
import { LanguageService } from '../externalLanguage/languageService';
|
||||
@@ -38,7 +37,7 @@ export default class MainController implements vscode.Disposable {
|
||||
private _queryRunner: QueryRunner,
|
||||
private _processService: ProcessService,
|
||||
private _packageManager?: PackageManager,
|
||||
private _serverConfigManager?: ServerConfigManager,
|
||||
private _packageManagementService?: PackageManagementService,
|
||||
private _httpClient?: HttpClient
|
||||
) {
|
||||
this._outputChannel = this._apiWrapper.createOutputChannel(constants.extensionOutputChannel);
|
||||
@@ -91,9 +90,6 @@ export default class MainController implements vscode.Disposable {
|
||||
let nbApis = await this.getNotebookExtensionApis();
|
||||
await this._config.load();
|
||||
|
||||
let tasks = new ServerConfigWidget(this._apiWrapper, this.serverConfigManager);
|
||||
tasks.register();
|
||||
|
||||
let packageManager = this.getPackageManager(nbApis);
|
||||
this._apiWrapper.registerCommand(constants.mlManagePackagesCommand, (async () => {
|
||||
await packageManager.managePackages();
|
||||
@@ -145,10 +141,10 @@ export default class MainController implements vscode.Disposable {
|
||||
await modelManagementController.predictModel();
|
||||
});
|
||||
this._apiWrapper.registerTaskHandler(constants.mlOdbcDriverCommand, async () => {
|
||||
await this.serverConfigManager.openOdbcDriverDocuments();
|
||||
await this.packageManagementService.openOdbcDriverDocuments();
|
||||
});
|
||||
this._apiWrapper.registerTaskHandler(constants.mlsDocumentsCommand, async () => {
|
||||
await this.serverConfigManager.openDocuments();
|
||||
await this.packageManagementService.openDocuments();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -157,7 +153,7 @@ export default class MainController implements vscode.Disposable {
|
||||
*/
|
||||
public getPackageManager(nbApis: nbExtensionApis.IExtensionApi): PackageManager {
|
||||
if (!this._packageManager) {
|
||||
this._packageManager = new PackageManager(this._outputChannel, this._rootPath, this._apiWrapper, this._queryRunner, this._processService, this._config, this.httpClient);
|
||||
this._packageManager = new PackageManager(this._outputChannel, this._rootPath, this._apiWrapper, this.packageManagementService, this._processService, this._config, this.httpClient);
|
||||
this._packageManager.init();
|
||||
this._packageManager.packageManageProviders.forEach(provider => {
|
||||
nbApis.registerPackageManager(provider.providerId, provider);
|
||||
@@ -169,11 +165,11 @@ export default class MainController implements vscode.Disposable {
|
||||
/**
|
||||
* Returns the server config manager instance
|
||||
*/
|
||||
public get serverConfigManager(): ServerConfigManager {
|
||||
if (!this._serverConfigManager) {
|
||||
this._serverConfigManager = new ServerConfigManager(this._apiWrapper, this._queryRunner);
|
||||
public get packageManagementService(): PackageManagementService {
|
||||
if (!this._packageManagementService) {
|
||||
this._packageManagementService = new PackageManagementService(this._apiWrapper, this._queryRunner);
|
||||
}
|
||||
return this._serverConfigManager;
|
||||
return this._packageManagementService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user