Fixed Kusto change connections for previous notebooks (#12207)

* fix connection dialog for change connection on notebook

* Better way to show all connections for providers

* minor change
This commit is contained in:
Vasu Bhog
2020-09-10 13:20:35 -05:00
committed by GitHub
parent 773ff0e62a
commit ff61eae164
2 changed files with 9 additions and 2 deletions

View File

@@ -455,10 +455,15 @@ export class AttachToDropdown extends SelectBox {
**/
public async openConnectionDialog(useProfile: boolean = false): Promise<boolean> {
try {
// Get all providers to show all available connections in connection dialog
let providers = this.model.getApplicableConnectionProviderIds(this.model.clientSession.kernel.name);
for (let alias of this.model.kernelAliases) {
providers = providers.concat(this.model.getApplicableConnectionProviderIds(alias));
}
let connection = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,
{
connectionType: ConnectionType.temporary,
providers: this.model.getApplicableConnectionProviderIds(this.model.clientSession.kernel.name)
providers: providers
},
useProfile ? this.model.connectionProfile : undefined);