mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 09:35:38 -05:00
Add changes for flavor selection (#8419)
* Add changes for flavor selection * Use getDefaultProviderId method * Update default engine user setting description * Add back check for codeEditor * Add test for multiple providers * Removing extra merge line * Add an attribute to ConnectionProviderProperties for language flavor Adding a boolean property to ConnectionProviderProperties for providers that are language flavors. When it is set to true, the provider will be part of drop down for changing SQL language flavor. * Update variable name * Put logic for removing CMS at one place and remove flag for flavor provider * Using keys instead of entries Using Object.keys instead of entries as doing [0] can be error prone if no provider matches. * Adding logic to check from params * Updating variable names * Rename dedup map * Fix action
This commit is contained in:
@@ -14,6 +14,7 @@ import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
|
||||
export class TestCapabilitiesService implements ICapabilitiesService {
|
||||
|
||||
private pgsqlProviderName = 'PGSQL';
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
public capabilities: { [id: string]: ProviderFeatures } = {};
|
||||
@@ -99,7 +100,13 @@ export class TestCapabilitiesService implements ICapabilitiesService {
|
||||
displayName: 'MSSQL',
|
||||
connectionOptions: connectionProvider,
|
||||
};
|
||||
let pgSQLCapabilities = {
|
||||
providerId: this.pgsqlProviderName,
|
||||
displayName: this.pgsqlProviderName,
|
||||
connectionOptions: connectionProvider,
|
||||
};
|
||||
this.capabilities[mssqlProviderName] = { connection: msSQLCapabilities };
|
||||
this.capabilities[this.pgsqlProviderName] = { connection: pgSQLCapabilities };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,6 +74,9 @@ export interface IConnectionManagementService {
|
||||
onConnectionChanged: Event<IConnectionParams>;
|
||||
onLanguageFlavorChanged: Event<azdata.DidChangeLanguageFlavorParams>;
|
||||
|
||||
// Properties
|
||||
providerNameToDisplayNameMap: { [providerDisplayName: string]: string };
|
||||
|
||||
/**
|
||||
* Opens the connection dialog to create new connection
|
||||
*/
|
||||
@@ -180,6 +183,8 @@ export interface IConnectionManagementService {
|
||||
|
||||
getDefaultProviderId(): string;
|
||||
|
||||
getUniqueConnectionProvidersByNameMap(providerNameToDisplayNameMap: { [providerDisplayName: string]: string }): { [providerDisplayName: string]: string };
|
||||
|
||||
/**
|
||||
* Cancels the connection
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,10 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
return conEvent.event;
|
||||
}
|
||||
|
||||
public get providerNameToDisplayNameMap(): { [providerDisplayName: string]: string } {
|
||||
return {};
|
||||
}
|
||||
|
||||
registerProvider(providerId: string, provider: azdata.ConnectionProvider): void {
|
||||
|
||||
}
|
||||
@@ -213,9 +217,14 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
getUniqueConnectionProvidersByNameMap(providerNameToDisplayNameMap: { [providerDisplayName: string]: string }): { [providerDisplayName: string]: string } {
|
||||
return {};
|
||||
}
|
||||
|
||||
getProviderIdFromUri(ownerUri: string): string {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
hasRegisteredServers(): boolean {
|
||||
return true;
|
||||
}
|
||||
@@ -235,10 +244,6 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
|
||||
}
|
||||
|
||||
public getProviderNames(): string[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
connectIfNotConnected(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection', saveConnection: boolean = false): Promise<string> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user