mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -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:
@@ -50,7 +50,6 @@ import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { isUndefinedOrNull } from 'vs/base/common/types';
|
||||
import { IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
|
||||
import { getErrorMessage, onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { find, firstIndex } from 'vs/base/common/arrays';
|
||||
import { CodeCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/codeCell.component';
|
||||
import { TextCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/textCell.component';
|
||||
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
|
||||
@@ -364,7 +363,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
|
||||
if (DEFAULT_NOTEBOOK_PROVIDER === providerInfo.providerId) {
|
||||
let providers = notebookUtils.getProvidersForFileName(this._notebookParams.notebookUri.fsPath, this.notebookService);
|
||||
let tsqlProvider = find(providers, provider => provider === SQL_NOTEBOOK_PROVIDER);
|
||||
let tsqlProvider = providers.find(provider => provider === SQL_NOTEBOOK_PROVIDER);
|
||||
providerInfo.providerId = tsqlProvider ? SQL_NOTEBOOK_PROVIDER : providers[0];
|
||||
}
|
||||
}
|
||||
@@ -411,7 +410,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
}
|
||||
|
||||
findCellIndex(cellModel: ICellModel): number {
|
||||
return firstIndex(this._model.cells, (cell) => cell.id === cellModel.id);
|
||||
return this._model.cells.findIndex((cell) => cell.id === cellModel.id);
|
||||
}
|
||||
|
||||
private setViewInErrorState(error: any): any {
|
||||
@@ -607,7 +606,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
private addPrimaryContributedActions(primary: IAction[]) {
|
||||
for (let action of primary) {
|
||||
// Need to ensure that we don't add the same action multiple times
|
||||
let foundIndex = firstIndex(this._providerRelatedActions, act => act.id === action.id);
|
||||
let foundIndex = this._providerRelatedActions.findIndex(act => act.id === action.id);
|
||||
if (foundIndex < 0) {
|
||||
this._actionBar.addAction(action);
|
||||
this._providerRelatedActions.push(action);
|
||||
@@ -658,7 +657,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
public async runCell(cell: ICellModel): Promise<boolean> {
|
||||
await this.modelReady;
|
||||
let uriString = cell.cellUri.toString();
|
||||
if (firstIndex(this._model.cells, c => c.cellUri.toString() === uriString) > -1) {
|
||||
if (this._model.cells.findIndex(c => c.cellUri.toString() === uriString) > -1) {
|
||||
this.selectCell(cell);
|
||||
return cell.runCell(this.notificationService, this.connectionManagementService);
|
||||
} else {
|
||||
@@ -674,10 +673,10 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
let startIndex = 0;
|
||||
let endIndex = codeCells.length;
|
||||
if (!isUndefinedOrNull(startCell)) {
|
||||
startIndex = firstIndex(codeCells, c => c.id === startCell.id);
|
||||
startIndex = codeCells.findIndex(c => c.id === startCell.id);
|
||||
}
|
||||
if (!isUndefinedOrNull(endCell)) {
|
||||
endIndex = firstIndex(codeCells, c => c.id === endCell.id);
|
||||
endIndex = codeCells.findIndex(c => c.id === endCell.id);
|
||||
}
|
||||
for (let i = startIndex; i < endIndex; i++) {
|
||||
let cellStatus = await this.runCell(codeCells[i]);
|
||||
@@ -693,7 +692,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
try {
|
||||
await this.modelReady;
|
||||
let uriString = cell.cellUri.toString();
|
||||
if (firstIndex(this._model.cells, c => c.cellUri.toString() === uriString) > -1) {
|
||||
if (this._model.cells.findIndex(c => c.cellUri.toString() === uriString) > -1) {
|
||||
this.selectCell(cell);
|
||||
// Clear outputs of the requested cell if cell type is code cell.
|
||||
// If cell is markdown cell, clearOutputs() is a no-op
|
||||
@@ -767,7 +766,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
let elBody: HTMLElement = document.body;
|
||||
let tabBar = elBody.querySelector('.title.tabs') as HTMLElement;
|
||||
let actionBar = elBody.querySelector('.editor-toolbar.actionbar-container') as HTMLElement;
|
||||
let section = find(this.getSectionElements(), s => s.relativeUri && s.relativeUri.toLowerCase() === id);
|
||||
let section = this.getSectionElements().find(s => s.relativeUri && s.relativeUri.toLowerCase() === id);
|
||||
if (section) {
|
||||
// Scroll this section to the top of the header instead of just bringing header into view.
|
||||
if (tabBar && actionBar) {
|
||||
|
||||
Reference in New Issue
Block a user