mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 09:35:38 -05:00
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:
@@ -593,8 +593,10 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
let providers = this._capabilitiesService.providers;
|
||||
for (const server in providers) {
|
||||
let alias = providers[server].connection.notebookKernelAlias;
|
||||
// Add Notebook Kernel Alias to kernelAliases
|
||||
if (alias && this._kernelAliases.indexOf(alias) === -1) {
|
||||
this._kernelAliases.push(providers[server].connection.notebookKernelAlias);
|
||||
this._kernelDisplayNameToConnectionProviderIds.set(alias, [providers[server].connection.providerId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -640,7 +642,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
let standardKernels = find(this._standardKernels, kernel => this._defaultKernel && kernel.displayName === this._defaultKernel.display_name);
|
||||
let connectionProviderIds = standardKernels ? standardKernels.connectionProviderIds : undefined;
|
||||
let providerFeatures = this._capabilitiesService.getCapabilities(profile.providerName);
|
||||
if (connectionProviderIds.length > 0) {
|
||||
if (connectionProviderIds.length > 0 && this._currentKernelAlias) {
|
||||
this._currentKernelAlias = providerFeatures?.connection.notebookKernelAlias;
|
||||
this._kernelDisplayNameToConnectionProviderIds.set(this._currentKernelAlias, [profile.providerName]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user