mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 09:35:39 -05:00
Allow data explorer to use connect (#5564)
* wip * handle save password; get correct profile * ensure resolve is being called * fix tests * fix more tests
This commit is contained in:
@@ -65,6 +65,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
private _connectionControllerMap: { [providerDisplayName: string]: IConnectionComponentController } = {};
|
||||
private _model: ConnectionProfile;
|
||||
private _params: INewConnectionParams;
|
||||
private _options: IConnectionCompletionOptions;
|
||||
private _inputModel: IConnectionProfile;
|
||||
private _providerNameToDisplayNameMap: { [providerDisplayName: string]: string } = {};
|
||||
private _providerTypes: string[] = [];
|
||||
@@ -239,7 +240,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
if (fromEditor && params && params.input) {
|
||||
uri = params.input.uri;
|
||||
}
|
||||
let options: IConnectionCompletionOptions = {
|
||||
let options: IConnectionCompletionOptions = this._options || {
|
||||
params: params,
|
||||
saveTheConnection: true,
|
||||
showDashboard: params && params.showDashboard !== undefined ? params.showDashboard : !fromEditor,
|
||||
@@ -393,10 +394,12 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
connectionManagementService: IConnectionManagementService,
|
||||
params?: INewConnectionParams,
|
||||
model?: IConnectionProfile,
|
||||
connectionResult?: IConnectionResult): Thenable<void> {
|
||||
connectionResult?: IConnectionResult,
|
||||
connectionOptions?: IConnectionCompletionOptions): Thenable<void> {
|
||||
|
||||
this._connectionManagementService = connectionManagementService;
|
||||
|
||||
this._options = connectionOptions;
|
||||
this._params = params;
|
||||
this._inputModel = model;
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { INewConnectionParams, IConnectionResult, IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { INewConnectionParams, IConnectionResult, IConnectionManagementService, IConnectionCompletionOptions } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
|
||||
export const IConnectionDialogService = createDecorator<IConnectionDialogService>('connectionDialogService');
|
||||
@@ -13,7 +13,7 @@ export interface IConnectionDialogService {
|
||||
/**
|
||||
* Opens the connection dialog and returns the promise for successfully opening the dialog
|
||||
*/
|
||||
showDialog(connectionManagementService: IConnectionManagementService, params: INewConnectionParams, model: IConnectionProfile, connectionResult?: IConnectionResult): Thenable<void>;
|
||||
showDialog(connectionManagementService: IConnectionManagementService, params: INewConnectionParams, model: IConnectionProfile, connectionResult?: IConnectionResult, connectionOptions?: IConnectionCompletionOptions): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Opens the connection dialog and returns the promise when connection is made
|
||||
|
||||
Reference in New Issue
Block a user