mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 01:25:39 -05:00
Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)
* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 * Fix test build break * Update distro * Fix build errors * Update distro * Update REH build file * Update build task names for REL * Fix product build yaml * Fix product REH task name * Fix type in task name * Update linux build step * Update windows build tasks * Turn off server publish * Disable REH * Fix typo * Bump distro * Update vscode tests * Bump distro * Fix type in disto * Bump distro * Turn off docker build * Remove docker step from release Co-authored-by: ADS Merger <andresse@microsoft.com> Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
@@ -24,7 +24,6 @@ import { IFindNotebookController } from 'sql/workbench/contrib/notebook/browser/
|
||||
import { INotebookModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
|
||||
import { TreeUpdateUtils } from 'sql/workbench/services/objectExplorer/browser/treeUpdateUtils';
|
||||
import { find, firstIndex } from 'vs/base/common/arrays';
|
||||
import { INotebookService } from 'sql/workbench/services/notebook/browser/notebookService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { CellContext } from 'sql/workbench/contrib/notebook/browser/cellViews/codeActions';
|
||||
@@ -323,10 +322,10 @@ export class KernelsDropdown extends SelectBox {
|
||||
if (kernels) {
|
||||
let index;
|
||||
if (standardKernel) {
|
||||
index = firstIndex(kernels, kernel => kernel === standardKernel.displayName);
|
||||
index = kernels.findIndex(kernel => kernel === standardKernel.displayName);
|
||||
} else {
|
||||
let kernelSpec = this.model.specs.kernels.find(k => k.name === kernel.name);
|
||||
index = firstIndex(kernels, k => k === kernelSpec?.display_name);
|
||||
index = kernels.findIndex(k => k === kernelSpec?.display_name);
|
||||
}
|
||||
if (nbKernelAlias) {
|
||||
index = kernels.indexOf(nbKernelAlias);
|
||||
@@ -407,7 +406,7 @@ export class AttachToDropdown extends SelectBox {
|
||||
let kernelDisplayName: string;
|
||||
if (this.model.clientSession && this.model.clientSession.kernel && this.model.clientSession.kernel.name) {
|
||||
let currentKernelName = this.model.clientSession.kernel.name.toLowerCase();
|
||||
let currentKernelSpec = find(this.model.specs.kernels, kernel => kernel.name && kernel.name.toLowerCase() === currentKernelName);
|
||||
let currentKernelSpec = this.model.specs.kernels.find(kernel => kernel.name && kernel.name.toLowerCase() === currentKernelName);
|
||||
if (currentKernelSpec) {
|
||||
//KernelDisplayName should be Kusto when connecting to Kusto connection
|
||||
if ((this.model.context?.serverCapabilities.notebookKernelAlias && this.model.currentKernelAlias === this.model.context?.serverCapabilities.notebookKernelAlias) || (this.model.kernelAliases.includes(this.model.selectedKernelDisplayName) && this.model.selectedKernelDisplayName)) {
|
||||
@@ -427,7 +426,7 @@ export class AttachToDropdown extends SelectBox {
|
||||
this.setOptions([msgLocalHost]);
|
||||
} else {
|
||||
let connections: string[] = model.context && model.context.title && (connProviderIds.includes(this.model.context.providerName)) ? [model.context.title] : [msgSelectConnection];
|
||||
if (!find(connections, x => x === msgChangeConnection)) {
|
||||
if (!connections.find(x => x === msgChangeConnection)) {
|
||||
connections.push(msgChangeConnection);
|
||||
}
|
||||
this.setOptions(connections, 0);
|
||||
@@ -497,7 +496,7 @@ export class AttachToDropdown extends SelectBox {
|
||||
//To ignore n/a after we have at least one valid connection
|
||||
attachToConnections = attachToConnections.filter(val => val !== msgSelectConnection);
|
||||
|
||||
let index = firstIndex(attachToConnections, connection => connection === connectedServer);
|
||||
let index = attachToConnections.findIndex(connection => connection === connectedServer);
|
||||
this.setOptions([]);
|
||||
this.setOptions(attachToConnections);
|
||||
if (!index || index < 0 || index >= attachToConnections.length) {
|
||||
|
||||
Reference in New Issue
Block a user