mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
CMS Extension - 2 (#4908)
* first set of changes to experiment the registration of cms related apis * Adding cms service entry to workbench * Adding basic functionality for add remove reg servers and group * Returning relative path as part of RegServerResult as string * initial extension * cleaned building with connecting to server * get list of registered servers * progress with registered servers tree * cms base node with server selection * removed unused services * replaced azure stuff with cms * removed cmsResourceService * list servers progress * Removing the cms apis from core. Having mssql extension expose them for cms extension * create server working fine * initial expansion and nodes * Propogating the backend name changes to apis * initial cms extension working * cached connection needs change in api * connect without dashboard in proposed * Fixing some missing sqlops references * add registered server bug found * added refresh context menu option * added payload * server description not disabled after reject connection * added more context actions and action icons * added empty resource and error when same name server is added * fixed connection issues with cms and normal connections * added initial tests * added cms icons * removed azure readme * test script revert * fix build tests * added more cms tests * fixed test script * fixed silent error when expanding servers * added more cms tests * removed cmsdialog from api * cms dialog without object * fixed theming issues * initial connection dialog done * can make connections * PM asks for strings and icons * removed search * removed unused code and fixed 1 test * fix connection management tests * changed icons * format file * fixed hygiene * initial cr comments * refactored cms connection dialog * fixed bug when switching dialogs * localized connection provider options * fixed cms provider name * code review comments * localized options in cms and mssql * localized more options
This commit is contained in:
@@ -61,7 +61,7 @@ export class ExtHostConnectionManagement extends ExtHostConnectionManagementShap
|
||||
return this._proxy.$getUriForConnection(connectionId);
|
||||
}
|
||||
|
||||
public $connect(connectionProfile: azdata.IConnectionProfile): Thenable<azdata.ConnectionResult> {
|
||||
return this._proxy.$connect(connectionProfile);
|
||||
public $connect(connectionProfile: azdata.IConnectionProfile, saveConnection: boolean = false, showDashboard: boolean = false): Thenable<azdata.ConnectionResult> {
|
||||
return this._proxy.$connect(connectionProfile, saveConnection, showDashboard);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,8 @@ export class MainThreadConnectionManagement implements MainThreadConnectionManag
|
||||
}
|
||||
|
||||
public async $openConnectionDialog(providers: string[], initialConnectionProfile?: IConnectionProfile, connectionCompletionOptions?: azdata.IConnectionCompletionOptions): Promise<azdata.connection.Connection> {
|
||||
let connectionProfile = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService, { connectionType: 1, providers: providers }, initialConnectionProfile);
|
||||
let connectionProfile = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,
|
||||
{ connectionType: 1, providers: providers }, initialConnectionProfile, undefined);
|
||||
const connection = connectionProfile ? {
|
||||
connectionId: connectionProfile.id,
|
||||
options: connectionProfile.options,
|
||||
@@ -110,12 +111,12 @@ export class MainThreadConnectionManagement implements MainThreadConnectionManag
|
||||
return connection;
|
||||
}
|
||||
|
||||
public $connect(connectionProfile: IConnectionProfile): Thenable<azdata.ConnectionResult> {
|
||||
public $connect(connectionProfile: IConnectionProfile, saveConnection: boolean = false, showDashboard: boolean = false): Thenable<azdata.ConnectionResult> {
|
||||
let profile = new ConnectionProfile(this._capabilitiesService, connectionProfile);
|
||||
profile.id = generateUuid();
|
||||
return this._connectionManagementService.connectAndSaveProfile(profile, undefined, {
|
||||
saveTheConnection: true,
|
||||
showDashboard: true,
|
||||
saveTheConnection: saveConnection,
|
||||
showDashboard: showDashboard,
|
||||
params: undefined,
|
||||
showConnectionDialogOnError: true,
|
||||
showFirewallRuleOnError: true
|
||||
|
||||
@@ -569,8 +569,8 @@ export function createApiFactory(
|
||||
getUriForConnection(connectionId: string): Thenable<string> {
|
||||
return extHostConnectionManagement.$getUriForConnection(connectionId);
|
||||
},
|
||||
connect(connectionProfile: sqlops.IConnectionProfile): Thenable<sqlops.ConnectionResult> {
|
||||
return extHostConnectionManagement.$connect(connectionProfile);
|
||||
connect(connectionProfile: sqlops.IConnectionProfile, saveConnection: boolean, showDashboard: boolean): Thenable<sqlops.ConnectionResult> {
|
||||
return extHostConnectionManagement.$connect(connectionProfile, saveConnection, showDashboard);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -956,7 +956,7 @@ export function createApiFactory(
|
||||
nb: nb,
|
||||
AzureResource: sqlExtHostTypes.AzureResource,
|
||||
extensions: extensions,
|
||||
TreeItem: sqlExtHostTypes.TreeItem,
|
||||
TreeItem: sqlExtHostTypes.TreeItem
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -577,7 +577,7 @@ export interface MainThreadConnectionManagementShape extends IDisposable {
|
||||
$listDatabases(connectionId: string): Thenable<string[]>;
|
||||
$getConnectionString(connectionId: string, includePassword: boolean): Thenable<string>;
|
||||
$getUriForConnection(connectionId: string): Thenable<string>;
|
||||
$connect(connectionProfile: azdata.IConnectionProfile): Thenable<azdata.ConnectionResult>;
|
||||
$connect(connectionProfile: azdata.IConnectionProfile, saveConnection: boolean, showDashboard: boolean): Thenable<azdata.ConnectionResult>;
|
||||
}
|
||||
|
||||
export interface MainThreadCredentialManagementShape extends IDisposable {
|
||||
|
||||
Reference in New Issue
Block a user