mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Make sure the first Connection Dialog has correct provider. (#5884)
* force a restart for cms * remove unneeded existing conditional * fix for random provider when opening a connection dialog
This commit is contained in:
@@ -143,9 +143,6 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
if (filteredKeys && filteredKeys.length > 0) {
|
||||
defaultProvider = filteredKeys[0];
|
||||
}
|
||||
else {
|
||||
defaultProvider = keys[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!defaultProvider && this._configurationService) {
|
||||
@@ -304,18 +301,19 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
private handleShowUiComponent(input: OnShowUIResponse) {
|
||||
if (input.selectedProviderType) {
|
||||
// If the call is for specific providers
|
||||
let isParamProvider: boolean = false;
|
||||
let isProviderInParams: boolean = false;
|
||||
if (this._params && this._params.providers) {
|
||||
this._params.providers.forEach((provider) => {
|
||||
if (input.selectedProviderType === this._providerNameToDisplayNameMap[provider]) {
|
||||
isParamProvider = true;
|
||||
isProviderInParams = true;
|
||||
this._currentProviderType = provider;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!isParamProvider) {
|
||||
if (!isProviderInParams) {
|
||||
this._currentProviderType = Object.keys(this._providerNameToDisplayNameMap).find((key) =>
|
||||
this._providerNameToDisplayNameMap[key] === input.selectedProviderType
|
||||
this._providerNameToDisplayNameMap[key] === input.selectedProviderType &&
|
||||
key !== Constants.cmsProviderName
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user