mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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
(cherry picked from commit 685a608518)
This commit is contained in:
committed by
Charles Gagnon
parent
441b57f3ca
commit
944a8f9c72
@@ -143,9 +143,6 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
|||||||
if (filteredKeys && filteredKeys.length > 0) {
|
if (filteredKeys && filteredKeys.length > 0) {
|
||||||
defaultProvider = filteredKeys[0];
|
defaultProvider = filteredKeys[0];
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
defaultProvider = keys[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!defaultProvider && this._configurationService) {
|
if (!defaultProvider && this._configurationService) {
|
||||||
@@ -304,18 +301,19 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
|||||||
private handleShowUiComponent(input: OnShowUIResponse) {
|
private handleShowUiComponent(input: OnShowUIResponse) {
|
||||||
if (input.selectedProviderType) {
|
if (input.selectedProviderType) {
|
||||||
// If the call is for specific providers
|
// If the call is for specific providers
|
||||||
let isParamProvider: boolean = false;
|
let isProviderInParams: boolean = false;
|
||||||
if (this._params && this._params.providers) {
|
if (this._params && this._params.providers) {
|
||||||
this._params.providers.forEach((provider) => {
|
this._params.providers.forEach((provider) => {
|
||||||
if (input.selectedProviderType === this._providerNameToDisplayNameMap[provider]) {
|
if (input.selectedProviderType === this._providerNameToDisplayNameMap[provider]) {
|
||||||
isParamProvider = true;
|
isProviderInParams = true;
|
||||||
this._currentProviderType = provider;
|
this._currentProviderType = provider;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!isParamProvider) {
|
if (!isProviderInParams) {
|
||||||
this._currentProviderType = Object.keys(this._providerNameToDisplayNameMap).find((key) =>
|
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