mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix for issue 3065 (#3067)
* fix for 3065 * remove the parameter, no need to save connection
This commit is contained in:
@@ -17,18 +17,17 @@ import { IObjectExplorerService } from 'sql/parts/objectExplorer/common/objectEx
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
|
||||
export class CommandLineService implements ICommandLineProcessing {
|
||||
private _connectionProfile : ConnectionProfile;
|
||||
private _connectionProfile: ConnectionProfile;
|
||||
private _showConnectionDialog: boolean;
|
||||
|
||||
constructor(
|
||||
@IConnectionManagementService private _connectionManagementService : IConnectionManagementService,
|
||||
@ICapabilitiesService private _capabilitiesService : ICapabilitiesService,
|
||||
@IEnvironmentService private _environmentService : IEnvironmentService,
|
||||
@IQueryEditorService private _queryEditorService : IQueryEditorService,
|
||||
@IObjectExplorerService private _objectExplorerService : IObjectExplorerService,
|
||||
@IEditorService private _editorService : IEditorService,
|
||||
)
|
||||
{
|
||||
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
|
||||
@ICapabilitiesService private _capabilitiesService: ICapabilitiesService,
|
||||
@IEnvironmentService private _environmentService: IEnvironmentService,
|
||||
@IQueryEditorService private _queryEditorService: IQueryEditorService,
|
||||
@IObjectExplorerService private _objectExplorerService: IObjectExplorerService,
|
||||
@IEditorService private _editorService: IEditorService,
|
||||
) {
|
||||
let profile = null;
|
||||
if (this._environmentService && this._environmentService.args.server) {
|
||||
profile = new ConnectionProfile(_capabilitiesService, null);
|
||||
@@ -46,14 +45,13 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
}
|
||||
this._connectionProfile = profile;
|
||||
const registry = platform.Registry.as<IConnectionProviderRegistry>(ConnectionProviderExtensions.ConnectionProviderContributions);
|
||||
let sqlProvider = registry.getProperties( Constants.mssqlProviderName);
|
||||
let sqlProvider = registry.getProperties(Constants.mssqlProviderName);
|
||||
// We can't connect to object explorer until the MSSQL connection provider is registered
|
||||
if (sqlProvider) {
|
||||
this.processCommandLine();
|
||||
} else {
|
||||
registry.onNewProvider(e => {
|
||||
if (e.id === Constants.mssqlProviderName)
|
||||
{
|
||||
if (e.id === Constants.mssqlProviderName) {
|
||||
this.processCommandLine();
|
||||
}
|
||||
});
|
||||
@@ -71,7 +69,7 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
this._queryEditorService,
|
||||
this._objectExplorerService,
|
||||
this._editorService))
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -381,12 +381,11 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
resolve(this._connectionStatusManager.getOriginalOwnerUri(ownerUri));
|
||||
} else {
|
||||
const options: IConnectionCompletionOptions = {
|
||||
// Should saving the connection be a command line switch?
|
||||
saveTheConnection : true,
|
||||
showConnectionDialogOnError : true,
|
||||
showDashboard : purpose === 'dashboard',
|
||||
params : undefined,
|
||||
showFirewallRuleOnError : true,
|
||||
saveTheConnection: false,
|
||||
showConnectionDialogOnError: true,
|
||||
showDashboard: purpose === 'dashboard',
|
||||
params: undefined,
|
||||
showFirewallRuleOnError: true,
|
||||
};
|
||||
this.connect(connection, ownerUri, options).then(connectionResult => {
|
||||
if (connectionResult && connectionResult.connected) {
|
||||
|
||||
Reference in New Issue
Block a user