Renable Strict TSLint (#5018)

* removes more builder references

* remove builder from profiler

* formatting

* fix profiler dailog

* remove builder from oatuhdialog

* remove the rest of builder references

* formatting

* add more strict null checks to base

* enable strict tslint rules

* fix formatting

* fix compile error

* fix the rest of the hygeny issues and add pipeline step

* fix pipeline files
This commit is contained in:
Anthony Dresser
2019-04-18 00:34:53 -07:00
committed by GitHub
parent b852f032d3
commit ddd89fc52a
431 changed files with 3147 additions and 3789 deletions

View File

@@ -25,7 +25,7 @@ export class AdvancedPropertiesController {
public showDialog(providerOptions: azdata.ConnectionOption[], container: HTMLElement, options: { [name: string]: any }): void {
this._options = options;
var serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option));
let serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option));
this.advancedDialog.open(serviceOptions, this._options);
}

View File

@@ -109,7 +109,7 @@ export class RecentConnectionTreeController extends DefaultController {
}
public showContextMenu(tree: ITree, element: any, event: any): boolean {
var actionContext: any;
let actionContext: any;
if (element instanceof ConnectionProfile) {
actionContext = new RecentConnectionsActionsContext();

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Directive, ViewContainerRef, Inject, forwardRef } from '@angular/core';
@@ -9,5 +9,5 @@ import { Directive, ViewContainerRef, Inject, forwardRef } from '@angular/core';
selector: '[component-host]',
})
export class ComponentHostDirective {
constructor( @Inject(forwardRef(() => ViewContainerRef)) public viewContainerRef: ViewContainerRef) { }
constructor(@Inject(forwardRef(() => ViewContainerRef)) public viewContainerRef: ViewContainerRef) { }
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./dashboardControlHostContainer';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
dashboard-controlhost-container {
dashboard-controlhost-container {
height: 100%;
width : 100%;
display: block;

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
dashboard-home-tab {
dashboard-home-tab {
height: 100%;
width: 100%;
display: block;

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./dashboardWebviewContainer';

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./dashboardWebviewContainer';

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./controlHostContent';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
controlhost-content {
controlhost-content {
height: 100%;
width : 100%;
display: block;

View File

@@ -197,11 +197,6 @@ export class DashboardWidgetWrapper extends AngularDisposable implements OnInit
/**
* Attempts to get the selector for a given key, and if none is defined tries
* to load it from the widget registry and configure as needed
*
* @private
* @param {string} key
* @returns {Type<IDashboardWidget>}
* @memberof DashboardWidgetWrapper
*/
private getOrCreateSelector(key: string): Type<IDashboardWidget> {
let selector = componentMap[key];

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./webviewContent';

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./dashboard';

View File

@@ -293,7 +293,7 @@ function isValidData(data: IInsightData): boolean {
Chart.pluginService.register({
beforeDraw: function (chart) {
if (chart.config.options.viewArea && chart.config.options.viewArea.backgroundColor) {
var ctx = chart.chart.ctx;
let ctx = chart.chart.ctx;
ctx.fillStyle = chart.config.options.viewArea.backgroundColor;
ctx.fillRect(0, 0, chart.chart.width, chart.chart.height);
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ProviderProperties } from './propertiesWidget.component';
import * as nls from 'vs/nls';

View File

@@ -1,4 +1,3 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.

View File

@@ -1,71 +1,76 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.fullsize {
height: 100%;
width: 100%;
height: 100%;
width: 100%;
}
/* vertical box styles */
.vertBox {
display: flex;
flex-flow: column;
display: flex;
flex-flow: column;
}
.vertBox .boxRow.header {
flex: 0 0 auto;
flex: 0 0 auto;
}
.vertBox .boxRow.content {
flex: 1 1 0;
flex: 1 1 0;
}
.edgesPadding {
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
}
.messagesTopSpacing {
height: 5px;
height: 5px;
}
.results {
flex: 100 1 0;
flex: 100 1 0;
}
.scrollable {
overflow: auto;
overflow: auto;
}
.maxHeight {
max-height: fit-content;
max-height: fit-content;
}
.minHeight {
min-height: fit-content;
min-height: fit-content;
}
/* horizontal box style */
.horzBox {
display: flex;
flex-flow: row;
display: flex;
flex-flow: row;
}
.horzBox .boxCol.content {
flex: 1 1 1%;
overflow: auto;
max-width: fit-content;
flex: 1 1 1%;
overflow: auto;
max-width: fit-content;
}
.hidden {
display: none !important;
display: none !important;
}
/* testing
.vertBox {
border: 1px solid green;
border: 1px solid green;
}
.horzBox {
border: 1px solid red;
border: 1px solid red;
}
*/

View File

@@ -7,7 +7,7 @@
<div class="fullsize vertBox editdata-component">
<div id="results" *ngIf="renderedDataSets.length > 0" class="results vertBox scrollable"
(onScroll)="onScroll($event)" [class.hidden]="!resultActive">
(onScroll)="onScroll($event)" [class.hidden]="!resultActive">
<div class="boxRow content horzBox slickgrid editable" *ngFor="let dataSet of renderedDataSets; let i = index"
[style.max-height]="dataSet.maxHeight" [style.min-height]="dataSet.minHeight">
<slick-grid #slickgrid id="slickgrid_{{i}}" [columnDefinitions]="dataSet.columnDefinitions"

View File

@@ -370,7 +370,7 @@ export abstract class GridParentComponent {
}
protected _keybindingFor(action: IAction): ResolvedKeybinding {
var [kb] = this.keybindingService.lookupKeybindings(action.id);
let [kb] = this.keybindingService.lookupKeybindings(action.id);
return kb;
}
@@ -407,8 +407,6 @@ export abstract class GridParentComponent {
/**
* Returns a function that selects all elements of a grid. This needs to
* return a function in order to capture the scope for this component
* @private
* @returns {(gridIndex: number) => void}
*
* @memberOf QueryComponent
*/
@@ -559,11 +557,6 @@ export abstract class GridParentComponent {
* Called by keyEvent method to give child classes a chance to
* handle key events.
*
* @protected
* @abstract
* @param {StandardKeyboardEvent} e
* @returns {boolean}
*
* @memberOf GridParentComponent
*/
protected abstract tryHandleKeyEvent(e: StandardKeyboardEvent): boolean;

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ElementRef } from '@angular/core';
@@ -19,7 +19,7 @@ import { ToggleMoreWidgetAction } from 'sql/workbench/parts/dashboard/common/act
import { CellTypes, CellType } from 'sql/workbench/parts/notebook/models/contracts';
import { CellModel } from 'sql/workbench/parts/notebook/models/cell';
export const HIDDEN_CLASS ='actionhidden';
export const HIDDEN_CLASS = 'actionhidden';
export class CellToggleMoreActions {
private _actions: CellActionBase[] = [];
@@ -29,7 +29,7 @@ export class CellToggleMoreActions {
@IInstantiationService private instantiationService: IInstantiationService) {
this._actions.push(
instantiationService.createInstance(DeleteCellAction, 'delete', localize('delete', 'Delete')),
instantiationService.createInstance(AddCellFromContextAction,'codeBefore', localize('codeBefore', 'Insert Code before'), CellTypes.Code, false),
instantiationService.createInstance(AddCellFromContextAction, 'codeBefore', localize('codeBefore', 'Insert Code before'), CellTypes.Code, false),
instantiationService.createInstance(AddCellFromContextAction, 'codeAfter', localize('codeAfter', 'Insert Code after'), CellTypes.Code, true),
instantiationService.createInstance(AddCellFromContextAction, 'markdownBefore', localize('markdownBefore', 'Insert Text before'), CellTypes.Markdown, false),
instantiationService.createInstance(AddCellFromContextAction, 'markdownAfter', localize('markdownAfter', 'Insert Text after'), CellTypes.Markdown, true),
@@ -38,7 +38,7 @@ export class CellToggleMoreActions {
}
public onInit(elementRef: ElementRef, model: NotebookModel, cellModel: ICellModel) {
let context = new CellContext(model,cellModel);
let context = new CellContext(model, cellModel);
this._moreActionsElement = <HTMLElement>elementRef.nativeElement;
if (this._moreActionsElement.childNodes.length > 0) {
this._moreActionsElement.removeChild(this._moreActionsElement.childNodes[0]);

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./code';
import { OnInit, Component, Input, Inject, ElementRef, ViewChild, Output, EventEmitter, OnChanges, SimpleChange, forwardRef, ChangeDetectorRef } from '@angular/core';
@@ -160,7 +160,7 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
&& this.cellModel.cellUri;
}
private get destroyed(): boolean{
private get destroyed(): boolean {
return !!(this._changeRef['destroyed']);
}

View File

@@ -1,9 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { nb } from 'azdata';
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Action } from 'vs/base/common/actions';
import { localize } from 'vs/nls';
@@ -15,12 +13,12 @@ import { NotebookModel } from 'sql/workbench/parts/notebook/models/notebookModel
import { getErrorMessage } from 'sql/workbench/parts/notebook/notebookUtils';
import { ICellModel, CellExecutionState } from 'sql/workbench/parts/notebook/models/modelInterfaces';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { MultiStateAction, IMultiStateData, IActionStateData } from 'sql/workbench/parts/notebook/notebookActions';
import { MultiStateAction, IMultiStateData } from 'sql/workbench/parts/notebook/notebookActions';
let notebookMoreActionMsg = localize('notebook.failed', "Please select active cell and try again");
const emptyExecutionCountLabel = '[ ]';
function hasModelAndCell(context: CellContext, notificationService: INotificationService): boolean {
function hasModelAndCell(context: CellContext, notificationService: INotificationService): boolean {
if (!context || !context.model) {
return false;
}
@@ -71,11 +69,11 @@ export class RunCellAction extends MultiStateAction<CellExecutionState> {
constructor(context: CellContext, @INotificationService private notificationService: INotificationService,
@IConnectionManagementService private connectionManagementService: IConnectionManagementService) {
super(RunCellAction.ID, new IMultiStateData<CellExecutionState>([
{ key: CellExecutionState.Hidden, value: { label: emptyExecutionCountLabel, className: '', tooltip: '', hideIcon: true }},
{ key: CellExecutionState.Stopped, value: { label: '', className: 'toolbarIconRun', tooltip: localize('runCell', 'Run cell') }},
{ key: CellExecutionState.Running, value: { label: '', className: 'toolbarIconStop', tooltip: localize('stopCell', 'Cancel execution') }},
{ key: CellExecutionState.Error, value: { label: '', className: 'toolbarIconRunError', tooltip: localize('errorRunCell', 'Error on last run. Click to run again') }},
], CellExecutionState.Hidden ));
{ key: CellExecutionState.Hidden, value: { label: emptyExecutionCountLabel, className: '', tooltip: '', hideIcon: true } },
{ key: CellExecutionState.Stopped, value: { label: '', className: 'toolbarIconRun', tooltip: localize('runCell', 'Run cell') } },
{ key: CellExecutionState.Running, value: { label: '', className: 'toolbarIconStop', tooltip: localize('stopCell', 'Cancel execution') } },
{ key: CellExecutionState.Error, value: { label: '', className: 'toolbarIconRunError', tooltip: localize('errorRunCell', 'Error on last run. Click to run again') } },
], CellExecutionState.Hidden));
this.ensureContextIsUpdated(context);
}

View File

@@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OnInit, Component, Input, Inject, forwardRef, ElementRef, ChangeDetectorRef, OnDestroy, ViewChild, SimpleChange, OnChanges, AfterViewInit } from '@angular/core';
import { OnInit, Component, Input, Inject, forwardRef, ChangeDetectorRef, SimpleChange, OnChanges } from '@angular/core';
import { CellView } from 'sql/workbench/parts/notebook/cellViews/interfaces';
import { ICellModel } from 'sql/workbench/parts/notebook/models/modelInterfaces';
import { NotebookModel } from 'sql/workbench/parts/notebook/models/notebookModel';

View File

@@ -8,126 +8,126 @@
|----------------------------------------------------------------------------*/
output-component .jp-RenderedText {
text-align: left;
padding-left: var(--jp-code-padding);
font-size: var(--jp-code-font-size);
line-height: var(--jp-code-line-height);
font-family: var(--jp-code-font-family);
text-align: left;
padding-left: var(--jp-code-padding);
font-size: var(--jp-code-font-size);
line-height: var(--jp-code-line-height);
font-family: var(--jp-code-font-family);
}
output-component .jp-RenderedText pre,
.jp-RenderedJavaScript pre,
output-component .jp-RenderedHTMLCommon pre {
color: var(--jp-content-font-color1);
border: none;
margin: 0px;
padding: 0px;
color: var(--jp-content-font-color1);
border: none;
margin: 0px;
padding: 0px;
}
/* ansi_up creates classed spans for console foregrounds and backgrounds. */
output-component .jp-RenderedText pre .ansi-black-fg {
color: #3e424d;
color: #3e424d;
}
output-component .jp-RenderedText pre .ansi-red-fg {
color: #e75c58;
color: #e75c58;
}
output-component .jp-RenderedText pre .ansi-green-fg {
color: #00a250;
color: #00a250;
}
output-component .jp-RenderedText pre .ansi-yellow-fg {
color: #ddb62b;
color: #ddb62b;
}
output-component .jp-RenderedText pre .ansi-blue-fg {
color: #208ffb;
color: #208ffb;
}
output-component .jp-RenderedText pre .ansi-magenta-fg {
color: #d160c4;
color: #d160c4;
}
output-component .jp-RenderedText pre .ansi-cyan-fg {
color: #60c6c8;
color: #60c6c8;
}
output-component .jp-RenderedText pre .ansi-white-fg {
color: #c5c1b4;
color: #c5c1b4;
}
output-component .jp-RenderedText pre .ansi-black-bg {
background-color: #3e424d;
background-color: #3e424d;
}
output-component .jp-RenderedText pre .ansi-red-bg {
background-color: #e75c58;
background-color: #e75c58;
}
output-component .jp-RenderedText pre .ansi-green-bg {
background-color: #00a250;
background-color: #00a250;
}
output-component .jp-RenderedText pre .ansi-yellow-bg {
background-color: #ddb62b;
background-color: #ddb62b;
}
output-component .jp-RenderedText pre .ansi-blue-bg {
background-color: #208ffb;
background-color: #208ffb;
}
output-component .jp-RenderedText pre .ansi-magenta-bg {
background-color: #d160c4;
background-color: #d160c4;
}
output-component .jp-RenderedText pre .ansi-cyan-bg {
background-color: #60c6c8;
background-color: #60c6c8;
}
output-component .jp-RenderedText pre .ansi-white-bg {
background-color: #c5c1b4;
background-color: #c5c1b4;
}
output-component .jp-RenderedText pre .ansi-bright-black-fg {
color: #282c36;
color: #282c36;
}
output-component .jp-RenderedText pre .ansi-bright-red-fg {
color: #b22b31;
color: #b22b31;
}
output-component .jp-RenderedText pre .ansi-bright-green-fg {
color: #007427;
color: #007427;
}
output-component .jp-RenderedText pre .ansi-bright-yellow-fg {
color: #b27d12;
color: #b27d12;
}
output-component .jp-RenderedText pre .ansi-bright-blue-fg {
color: #0065ca;
color: #0065ca;
}
output-component .jp-RenderedText pre .ansi-bright-magenta-fg {
color: #a03196;
color: #a03196;
}
output-component .jp-RenderedText pre .ansi-bright-cyan-fg {
color: #258f8f;
color: #258f8f;
}
output-component .jp-RenderedText pre .ansi-bright-white-fg {
color: #a1a6b2;
color: #a1a6b2;
}
output-component .jp-RenderedText pre .ansi-bright-black-bg {
background-color: #282c36;
background-color: #282c36;
}
output-component .jp-RenderedText pre .ansi-bright-red-bg {
background-color: #b22b31;
background-color: #b22b31;
}
output-component .jp-RenderedText pre .ansi-bright-green-bg {
background-color: #007427;
background-color: #007427;
}
output-component .jp-RenderedText pre .ansi-bright-yellow-bg {
background-color: #b27d12;
background-color: #b27d12;
}
output-component .jp-RenderedText pre .ansi-bright-blue-bg {
background-color: #0065ca;
background-color: #0065ca;
}
output-component .jp-RenderedText pre .ansi-bright-magenta-bg {
background-color: #a03196;
background-color: #a03196;
}
output-component .jp-RenderedText pre .ansi-bright-cyan-bg {
background-color: #258f8f;
background-color: #258f8f;
}
output-component .jp-RenderedText pre .ansi-bright-white-bg {
background-color: #a1a6b2;
background-color: #a1a6b2;
}
output-component .jp-RenderedText[data-mime-type='application/vnd.jupyter.stderr'] {
background: var(--jp-rendermime-error-background);
padding-top: var(--jp-code-padding);
background: var(--jp-rendermime-error-background);
padding-top: var(--jp-code-padding);
}
/*-----------------------------------------------------------------------------
@@ -135,14 +135,14 @@ output-component .jp-RenderedText[data-mime-type='application/vnd.jupyter.stderr
|----------------------------------------------------------------------------*/
.jp-RenderedLatex {
color: var(--jp-content-font-color1);
font-size: var(--jp-content-font-size1);
line-height: var(--jp-content-line-height);
color: var(--jp-content-font-color1);
font-size: var(--jp-content-font-size1);
line-height: var(--jp-content-line-height);
}
/* Left-justify outputs.*/
.jp-OutputArea-output.jp-RenderedLatex {
text-align: left;
text-align: left;
}
/*-----------------------------------------------------------------------------
@@ -150,36 +150,36 @@ output-component .jp-RenderedText[data-mime-type='application/vnd.jupyter.stderr
|----------------------------------------------------------------------------*/
output-component .jp-RenderedHTMLCommon {
color: var(--jp-content-font-color1);
font-family: var(--jp-content-font-family);
font-size: var(--jp-content-font-size1);
line-height: var(--jp-content-line-height);
/* Give a bit more R padding on Markdown text to keep line lengths reasonable */
padding-right: 20px;
color: var(--jp-content-font-color1);
font-family: var(--jp-content-font-family);
font-size: var(--jp-content-font-size1);
line-height: var(--jp-content-line-height);
/* Give a bit more R padding on Markdown text to keep line lengths reasonable */
padding-right: 20px;
}
output-component .jp-RenderedHTMLCommon em {
font-style: italic;
font-style: italic;
}
output-component .jp-RenderedHTMLCommon strong {
font-weight: bold;
font-weight: bold;
}
output-component .jp-RenderedHTMLCommon u {
text-decoration: underline;
text-decoration: underline;
}
output-component .jp-RenderedHTMLCommon a:link {
text-decoration: none;
text-decoration: none;
}
output-component .jp-RenderedHTMLCommon a:hover {
text-decoration: underline;
text-decoration: underline;
}
output-component .jp-RenderedHTMLCommon a:visited {
text-decoration: none;
text-decoration: none;
}
/* Headings */
@@ -190,11 +190,11 @@ output-component .jp-RenderedHTMLCommon h3,
output-component .jp-RenderedHTMLCommon h4,
output-component .jp-RenderedHTMLCommon h5,
output-component .jp-RenderedHTMLCommon h6 {
line-height: var(--jp-content-heading-line-height);
font-weight: var(--jp-content-heading-font-weight);
font-style: normal;
margin: var(--jp-content-heading-margin-top) 0
var(--jp-content-heading-margin-bottom) 0;
line-height: var(--jp-content-heading-line-height);
font-weight: var(--jp-content-heading-font-weight);
font-style: normal;
margin: var(--jp-content-heading-margin-top) 0
var(--jp-content-heading-margin-bottom) 0;
}
output-component .jp-RenderedHTMLCommon h1:first-child,
@@ -203,7 +203,7 @@ output-component .jp-RenderedHTMLCommon h3:first-child,
output-component .jp-RenderedHTMLCommon h4:first-child,
output-component .jp-RenderedHTMLCommon h5:first-child,
output-component .jp-RenderedHTMLCommon h6:first-child {
margin-top: calc(0.5 * var(--jp-content-heading-margin-top));
margin-top: calc(0.5 * var(--jp-content-heading-margin-top));
}
output-component .jp-RenderedHTMLCommon h1:last-child,
@@ -212,194 +212,194 @@ output-component .jp-RenderedHTMLCommon h3:last-child,
output-component .jp-RenderedHTMLCommon h4:last-child,
output-component .jp-RenderedHTMLCommon h5:last-child,
output-component .jp-RenderedHTMLCommon h6:last-child {
margin-bottom: calc(0.5 * var(--jp-content-heading-margin-bottom));
margin-bottom: calc(0.5 * var(--jp-content-heading-margin-bottom));
}
output-component .jp-RenderedHTMLCommon h1 {
font-size: var(--jp-content-font-size5);
font-size: var(--jp-content-font-size5);
}
output-component .jp-RenderedHTMLCommon h2 {
font-size: var(--jp-content-font-size4);
font-size: var(--jp-content-font-size4);
}
output-component .jp-RenderedHTMLCommon h3 {
font-size: var(--jp-content-font-size3);
font-size: var(--jp-content-font-size3);
}
output-component .jp-RenderedHTMLCommon h4 {
font-size: var(--jp-content-font-size2);
font-size: var(--jp-content-font-size2);
}
output-component .jp-RenderedHTMLCommon h5 {
font-size: var(--jp-content-font-size1);
font-size: var(--jp-content-font-size1);
}
output-component .jp-RenderedHTMLCommon h6 {
font-size: var(--jp-content-font-size0);
font-size: var(--jp-content-font-size0);
}
/* Lists */
output-component .jp-RenderedHTMLCommon ul:not(.list-inline),
output-component .jp-RenderedHTMLCommon ol:not(.list-inline) {
padding-left: 2em;
padding-left: 2em;
}
output-component .jp-RenderedHTMLCommon ul {
list-style: disc;
list-style: disc;
}
output-component .jp-RenderedHTMLCommon ul ul {
list-style: square;
list-style: square;
}
output-component .jp-RenderedHTMLCommon ul ul ul {
list-style: circle;
list-style: circle;
}
output-component .jp-RenderedHTMLCommon ol {
list-style: decimal;
list-style: decimal;
}
output-component .jp-RenderedHTMLCommon ol ol {
list-style: upper-alpha;
list-style: upper-alpha;
}
output-component .jp-RenderedHTMLCommon ol ol ol {
list-style: lower-alpha;
list-style: lower-alpha;
}
output-component .jp-RenderedHTMLCommon ol ol ol ol {
list-style: lower-roman;
list-style: lower-roman;
}
output-component .jp-RenderedHTMLCommon ol ol ol ol ol {
list-style: decimal;
list-style: decimal;
}
output-component .jp-RenderedHTMLCommon ol,
output-component .jp-RenderedHTMLCommon ul {
margin-bottom: 1em;
margin-bottom: 1em;
}
output-component .jp-RenderedHTMLCommon ul ul,
output-component .jp-RenderedHTMLCommon ul ol,
output-component .jp-RenderedHTMLCommon ol ul,
output-component .jp-RenderedHTMLCommon ol ol {
margin-bottom: 0em;
margin-bottom: 0em;
}
output-component .jp-RenderedHTMLCommon hr {
color: var(--jp-border-color2);
background-color: var(--jp-border-color1);
margin-top: 1em;
margin-bottom: 1em;
color: var(--jp-border-color2);
background-color: var(--jp-border-color1);
margin-top: 1em;
margin-bottom: 1em;
}
output-component .jp-RenderedHTMLCommon > pre {
margin: 1.5em 2em;
margin: 1.5em 2em;
}
output-component .jp-RenderedHTMLCommon pre,
output-component .jp-RenderedHTMLCommon code {
border: 0;
background-color: var(--jp-layout-color0);
color: var(--jp-content-font-color1);
font-family: var(--jp-code-font-family);
font-size: inherit;
line-height: var(--jp-code-line-height);
padding: 0;
border: 0;
background-color: var(--jp-layout-color0);
color: var(--jp-content-font-color1);
font-family: var(--jp-code-font-family);
font-size: inherit;
line-height: var(--jp-code-line-height);
padding: 0;
}
output-component .jp-RenderedHTMLCommon p > code {
background-color: var(--jp-layout-color2);
padding: 1px 5px;
background-color: var(--jp-layout-color2);
padding: 1px 5px;
}
/* Tables */
output-component .jp-RenderedHTMLCommon table {
border-collapse: collapse;
border-spacing: 0;
border: none;
color: var(--jp-ui-font-color1);
font-size: 12px;
table-layout: auto;
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
border-spacing: 0;
border: none;
color: var(--jp-ui-font-color1);
font-size: 12px;
table-layout: auto;
margin-left: auto;
margin-right: auto;
}
output-component .jp-RenderedHTMLCommon thead {
border-bottom: var(--jp-border-width) solid var(--jp-border-color1);
vertical-align: bottom;
border-bottom: var(--jp-border-width) solid var(--jp-border-color1);
vertical-align: bottom;
}
output-component .jp-RenderedHTMLCommon td,
output-component .jp-RenderedHTMLCommon th,
output-component .jp-RenderedHTMLCommon tr {
text-align: left;
vertical-align: middle;
padding: 0.5em 0.5em;
line-height: normal;
white-space: normal;
max-width: none;
border: none;
text-align: left;
vertical-align: middle;
padding: 0.5em 0.5em;
line-height: normal;
white-space: normal;
max-width: none;
border: none;
}
.jp-RenderedMarkdown.jp-RenderedHTMLCommon td,
.jp-RenderedMarkdown.jp-RenderedHTMLCommon th {
max-width: none;
max-width: none;
}
output-component th {
font-weight: bold;
font-weight: bold;
}
output-component .jp-RenderedHTMLCommon tbody tr:nth-child(odd) {
background: var(--jp-layout-color0);
background: var(--jp-layout-color0);
}
output-component .jp-RenderedHTMLCommon tbody tr:nth-child(even) {
background: var(--jp-rendermime-table-row-background);
background: var(--jp-rendermime-table-row-background);
}
output-component .jp-RenderedHTMLCommon tbody tr:hover {
background: var(--jp-rendermime-table-row-hover-background);
background: var(--jp-rendermime-table-row-hover-background);
}
output-component .jp-RenderedHTMLCommon table {
margin-bottom: 1em;
display: table-row;
margin-bottom: 1em;
display: table-row;
}
output-component .jp-RenderedHTMLCommon p {
text-align: left;
margin: 0px;
text-align: left;
margin: 0px;
}
output-component .jp-RenderedHTMLCommon p {
margin-bottom: 1em;
margin-bottom: 1em;
}
output-component .jp-RenderedHTMLCommon img {
-moz-force-broken-image-icon: 1;
-moz-force-broken-image-icon: 1;
}
/* Restrict to direct children as other images could be nested in other content. */
output-component .jp-RenderedHTMLCommon > img {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 1em;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 1em;
}
/* Change color behind transparent images if they need it... */
[data-theme-light='false'] .jp-RenderedImage img.jp-needs-light-background {
background-color: var(--jp-inverse-layout-color1);
background-color: var(--jp-inverse-layout-color1);
}
[data-theme-light='true'] .jp-RenderedImage img.jp-needs-dark-background {
background-color: var(--jp-inverse-layout-color1);
background-color: var(--jp-inverse-layout-color1);
}
/* ...or leave it untouched if they don't */
[data-theme-light='false'] .jp-RenderedImage img.jp-needs-dark-background {
@@ -411,31 +411,31 @@ output-component .jp-RenderedHTMLCommon img,
.jp-RenderedImage img,
output-component .jp-RenderedHTMLCommon svg,
.jp-RenderedSVG svg {
max-width: 100%;
height: auto;
max-width: 100%;
height: auto;
}
output-component .jp-RenderedHTMLCommon img.jp-mod-unconfined,
.jp-RenderedImage img.jp-mod-unconfined,
output-component .jp-RenderedHTMLCommon svg.jp-mod-unconfined,
.jp-RenderedSVG svg.jp-mod-unconfined {
max-width: none;
max-width: none;
}
output-component .jp-RenderedHTMLCommon .alert {
margin-bottom: 1em;
margin-bottom: 1em;
}
output-component .jp-RenderedHTMLCommon blockquote {
margin: 1em 2em;
padding: 0 1em;
border-left: 5px solid var(--jp-border-color2);
margin: 1em 2em;
padding: 0 1em;
border-left: 5px solid var(--jp-border-color2);
}
a.jp-InternalAnchorLink {
visibility: hidden;
margin-left: 8px;
color: var(--md-blue-800);
visibility: hidden;
margin-left: 8px;
color: var(--md-blue-800);
}
h1:hover .jp-InternalAnchorLink,
@@ -444,7 +444,7 @@ h3:hover .jp-InternalAnchorLink,
h4:hover .jp-InternalAnchorLink,
h5:hover .jp-InternalAnchorLink,
h6:hover .jp-InternalAnchorLink {
visibility: visible;
visibility: visible;
}
/* Most direct children of .jp-RenderedHTMLCommon have a margin-bottom of 1.0.
@@ -453,7 +453,7 @@ h6:hover .jp-InternalAnchorLink {
* code cells.
*/
output-component .jp-RenderedHTMLCommon > *:last-child {
margin-bottom: 0.5em;
margin-bottom: 0.5em;
}
/*-----------------------------------------------------------------------------
@@ -461,5 +461,5 @@ output-component .jp-RenderedHTMLCommon > *:last-child {
|----------------------------------------------------------------------------*/
.jp-RenderedPDF {
font-size: var(--jp-ui-font-size1);
font-size: var(--jp-ui-font-size1);
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./code';
import 'vs/css!./media/output';
@@ -17,7 +17,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
import * as DOM from 'vs/base/browser/dom';
export const OUTPUT_SELECTOR: string = 'output-component';
const USER_SELECT_CLASS ='actionselect';
const USER_SELECT_CLASS = 'actionselect';
@Component({
selector: OUTPUT_SELECTOR,

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./code';
import 'vs/css!./outputArea';
import { OnInit, Component, Input, Inject, ElementRef, ViewChild, forwardRef, ChangeDetectorRef } from '@angular/core';

View File

@@ -18,5 +18,5 @@ output-area-component .notebook-output {
.output-userselect pre{
white-space: pre-wrap;
word-wrap: break-word;
}
word-wrap: break-word;
}

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
placeholder-cell-component {
placeholder-cell-component {
height: 50px;
width: 100%;
display: block;
@@ -12,7 +12,7 @@
placeholder-cell-component .text {
display: flex;
align-items: center;
align-items: center;
justify-content: center;
height: 50px;
-webkit-margin-before: 0em;

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./placeholder';
import { OnInit, Component, Input, Inject, forwardRef, ElementRef, ChangeDetectorRef, OnDestroy, ViewChild, SimpleChange, OnChanges } from '@angular/core';
@@ -49,7 +49,7 @@ export class PlaceholderCellComponent extends CellView implements OnInit, OnChan
}
get clickOn(): string {
return localize('clickOn','Click on');
return localize('clickOn', 'Click on');
}
get plusCode(): string {

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./textCell';
import { OnInit, Component, Input, Inject, forwardRef, ElementRef, ChangeDetectorRef, OnDestroy, ViewChild, OnChanges, SimpleChange } from '@angular/core';
@@ -25,7 +25,7 @@ import { NotebookModel } from 'sql/workbench/parts/notebook/models/notebookModel
import { CellToggleMoreActions } from 'sql/workbench/parts/notebook/cellToggleMoreActions';
export const TEXT_SELECTOR: string = 'text-cell-component';
const USER_SELECT_CLASS ='actionselect';
const USER_SELECT_CLASS = 'actionselect';
@Component({
selector: TEXT_SELECTOR,
@@ -165,7 +165,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
// If the asset is in the same folder or a subfolder, replace 'vscode-resource:' with 'file:', so the image is visible
if (!path.relative(path.dirname(this.cellModel.notebookModel.notebookUri.fsPath), filePath).includes('..')) {
// ok to change from vscode-resource: to file:
htmlContent = htmlContent.replace('vscode-resource:'+ filePath, 'file:' + filePath);
htmlContent = htmlContent.replace('vscode-resource:' + filePath, 'file:' + filePath);
}
htmlContentCopy = htmlContentCopy.slice(pathEndIndex);
}
@@ -190,7 +190,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
}
public toggleEditMode(editMode?: boolean): void {
this.isEditMode = editMode !== undefined? editMode : !this.isEditMode;
this.isEditMode = editMode !== undefined ? editMode : !this.isEditMode;
this.updateMoreActions();
this.updatePreview();
this._changeRef.detectChanges();

View File

@@ -1,11 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { nb, ServerInfo } from 'azdata';
import { Event, Emitter } from 'vs/base/common/event';

View File

@@ -1,16 +1,13 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ICellMagicMapper, ILanguageMagic } from 'sql/workbench/parts/notebook/models/modelInterfaces';
const defaultKernel = '*';
export class CellMagicMapper implements ICellMagicMapper {
private kernelToMagicMap = new Map<string,ILanguageMagic[]>();
private kernelToMagicMap = new Map<string, ILanguageMagic[]>();
constructor(languageMagics: ILanguageMagic[]) {
if (languageMagics) {

View File

@@ -1,13 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// This code is based on @jupyterlab/packages/apputils/src/clientsession.tsx
'use strict';
import { nb } from 'azdata';
import { URI } from 'vs/base/common/uri';
import { Event, Emitter } from 'vs/base/common/event';
@@ -274,7 +271,6 @@ export class ClientSession implements IClientSession {
/**
* Helper method to either call ChangeKernel on current session, or start a new session
* @param options
*/
private async doChangeKernel(options: nb.IKernelSpec): Promise<nb.IKernel> {
let kernel: nb.IKernel;

View File

@@ -1,10 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
export type CellType = 'code' | 'markdown' | 'raw';

View File

@@ -1,13 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// This code is based on @jupyterlab/packages/apputils/src/clientsession.tsx
'use strict';
import { nb } from 'azdata';
import { Event } from 'vs/base/common/event';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -417,9 +414,6 @@ export interface NotebookContentChange {
cellIndex?: number;
/**
* Optional value indicating if the notebook is in a dirty or clean state after this change
*
* @type {boolean}
* @memberof NotebookContentChange
*/
isDirty?: boolean;
}

View File

@@ -1,11 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { localize } from 'vs/nls';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
@@ -22,7 +19,6 @@ export namespace constants {
* Long term this should be refactored to an extension contribution
*
* @export
* @class NotebookConnection
*/
export class NotebookConnection {
private _host: string;

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OnInit, Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnDestroy } from '@angular/core';
@@ -185,7 +185,9 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
cell.trustedMode = isTrusted;
});
//Updates dirty state
this._notebookParams.input && this._notebookParams.input.updateModel();
if (this._notebookParams.input) {
this._notebookParams.input.updateModel();
}
this.detectChanges();
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';

View File

@@ -1,11 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
export namespace nbversion {
/**
* The major version of the notebook format.

View File

@@ -252,11 +252,11 @@ export class NotebookInput extends EditorInput {
return this.resource;
}
public get untitledEditorModel() : UntitledEditorModel {
public get untitledEditorModel(): UntitledEditorModel {
return this._untitledEditorModel;
}
public set untitledEditorModel(value : UntitledEditorModel) {
public set untitledEditorModel(value: UntitledEditorModel) {
this._untitledEditorModel = value;
}

View File

@@ -41,7 +41,7 @@ export class MimeModel implements IRenderMime.IMimeModel {
}
get themeService(): IThemeService {
return this._themeService;
return this._themeService;
}
/**

View File

@@ -90,11 +90,11 @@ export namespace URLExt {
return (
'?' +
keys
.map(key => {
const content = encodeURIComponent(String(value[key]));
return key + (content ? '=' + content : '');
})
.join('&')
.map(key => {
const content = encodeURIComponent(String(value[key]));
return key + (content ? '=' + content : '');
})
.join('&')
);
}

View File

@@ -13,7 +13,7 @@ export const htmlRendererFactory: IRenderMime.IRendererFactory = {
safe: true,
mimeTypes: ['text/html'],
defaultRank: 50,
createRenderer: options => new widgets.RenderedHTML(options)
createRenderer: options => new widgets.RenderedHTML(options)
};
/**

View File

@@ -1,4 +1,3 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

View File

@@ -41,7 +41,7 @@ export class RefreshAction extends Action {
this._tree = tree;
}
public run(): Promise<boolean> {
var treeNode: TreeNode;
let treeNode: TreeNode;
if (this.element instanceof ConnectionProfile) {
let connection: ConnectionProfile = this.element;
if (this._connectionManagementService.isConnected(undefined, connection)) {

View File

@@ -183,10 +183,10 @@ export class OEScriptSelectAction extends ScriptSelectAction {
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
}
this._treeSelectionHandler.onTreeActionStateChange(true);
var connectionProfile = TreeUpdateUtils.getConnectionProfile(this._objectExplorerTreeNode);
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
let connectionProfile = TreeUpdateUtils.getConnectionProfile(this._objectExplorerTreeNode);
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
var metadata = this._objectExplorerTreeNode.metadata;
let metadata = this._objectExplorerTreeNode.metadata;
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
this._treeSelectionHandler.onTreeActionStateChange(false);
@@ -218,8 +218,8 @@ export class OEEditDataAction extends EditDataAction {
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
}
this._treeSelectionHandler.onTreeActionStateChange(true);
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
this._treeSelectionHandler.onTreeActionStateChange(false);
@@ -252,9 +252,9 @@ export class OEScriptCreateAction extends ScriptCreateAction {
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
}
this._treeSelectionHandler.onTreeActionStateChange(true);
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
@@ -288,9 +288,9 @@ export class OEScriptExecuteAction extends ScriptExecuteAction {
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
}
this._treeSelectionHandler.onTreeActionStateChange(true);
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
@@ -324,9 +324,9 @@ export class OEScriptAlterAction extends ScriptAlterAction {
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
}
this._treeSelectionHandler.onTreeActionStateChange(true);
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
@@ -360,9 +360,9 @@ export class OEScriptDeleteAction extends ScriptDeleteAction {
this._objectExplorerTreeNode = await getTreeNode(actionContext, this._objectExplorerService);
}
this._treeSelectionHandler.onTreeActionStateChange(true);
var connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
var metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
var ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
let connectionProfile = TreeUpdateUtils.getConnectionProfile(<TreeNode>this._objectExplorerTreeNode);
let metadata = (<TreeNode>this._objectExplorerTreeNode).metadata;
let ownerUri = this._connectionManagementService.getConnectionUri(connectionProfile);
ownerUri = this._connectionManagementService.getFormattedUri(ownerUri, connectionProfile);
return super.run({ profile: connectionProfile, object: metadata }).then((result) => {
@@ -410,4 +410,3 @@ export class ObjectExplorerActionUtilities {
return scriptMap;
}
}

View File

@@ -68,7 +68,7 @@ export class ServerTreeController extends treedefaults.DefaultController {
tree.setFocus(element);
var actionContext: any;
let actionContext: any;
if (element instanceof TreeNode) {
let context = new ObjectExplorerActionsContext();
context.nodeInfo = element.toNodeInfo();
@@ -103,4 +103,4 @@ export class ServerTreeController extends treedefaults.DefaultController {
return true;
}
}
}

View File

@@ -67,7 +67,7 @@ export class ServerTreeDataSource implements IDataSource {
} else if (element instanceof ConnectionProfileGroup) {
resolve((<ConnectionProfileGroup>element).getChildren());
} else if (element instanceof TreeNode) {
var node = element;
let node = element;
if (node.children) {
resolve(node.children);
} else {

View File

@@ -69,12 +69,6 @@ export class TreeSelectionHandler {
/**
*
* @param connectionManagementService
* @param objectExplorerService
* @param isDoubleClick
* @param isKeyboard
* @param selection
* @param tree
* @param connectionCompleteCallback A function that gets called after a connection is established due to the selection, if needed
*/
private handleTreeItemSelected(connectionManagementService: IConnectionManagementService, objectExplorerService: IObjectExplorerService, isDoubleClick: boolean, isKeyboard: boolean, selection: any[], tree: ITree, connectionCompleteCallback: () => void): void {
@@ -117,4 +111,4 @@ export class TreeSelectionHandler {
tree.toggleExpansion(selection[0]);
}
}
}
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
import { NodeType, SqlThemeIcon } from 'sql/workbench/parts/objectExplorer/common/nodeType';
@@ -107,7 +107,7 @@ export class TreeNode {
this.nodeStatus = nodeStatus;
}
public getConnectionProfile(): ConnectionProfile {
var currentNode: TreeNode = this;
let currentNode: TreeNode = this;
while (!currentNode.connection && currentNode.parent) {
currentNode = currentNode.parent;
}
@@ -118,7 +118,7 @@ export class TreeNode {
if (this.connection) {
return undefined;
}
var currentNode: TreeNode = this;
let currentNode: TreeNode = this;
while (currentNode.nodeTypeId !== NodeType.Database && currentNode.nodeTypeId !== NodeType.Server && currentNode.parent) {
currentNode = currentNode.parent;
}
@@ -130,7 +130,7 @@ export class TreeNode {
}
public getSession(): azdata.ObjectExplorerSession {
var currentNode: TreeNode = this;
let currentNode: TreeNode = this;
while (!currentNode.session && currentNode.parent) {
currentNode = currentNode.parent;
}
@@ -172,4 +172,4 @@ export class TreeNode {
public setSelected(selected: boolean, clearOtherSelections?: boolean): Thenable<void> {
return this._objectExplorerCallbacks.setNodeSelected(this, selected, clearOtherSelections);
}
}
}

View File

@@ -1,79 +1,85 @@
div.qp-node {
margin: 2px;
padding: 2px;
border: 1px solid;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
div.qp-node {
margin: 2px;
padding: 2px;
border: 1px solid;
}
div.qp-statement-header {
margin: 2px;
padding: 2px;
font-size: 12px;
line-height: normal;
}
margin: 2px;
padding: 2px;
font-size: 12px;
line-height: normal;
}
div.qp-node,
div.qp-tt {
font-size: 11px;
line-height: normal;
font-size: 11px;
line-height: normal;
}
.qp-node>div {
font-family: Monospace;
text-align: center;
font-family: Monospace;
text-align: center;
}
div[class|='qp-icon'] {
height: 32px;
width: 32px;
margin-left: auto;
margin-right: auto;
background-repeat: no-repeat;
height: 32px;
width: 32px;
margin-left: auto;
margin-right: auto;
background-repeat: no-repeat;
}
.qp-tt {
top: 4em;
left: 2em;
border: 1px solid;
padding: 2px;
width: 30em;
top: 4em;
left: 2em;
border: 1px solid;
padding: 2px;
width: 30em;
}
.qp-tt div,
.qp-tt table {
font-family: Sans-Serif;
text-align: left;
font-family: Sans-Serif;
text-align: left;
}
.qp-tt table {
border-width: 0px;
border-spacing: 0px;
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
border-width: 0px;
border-spacing: 0px;
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
}
.qp-tt td,
.qp-tt th {
font-size: 11px;
border-bottom: solid 1px;
padding: 1px;
font-size: 11px;
border-bottom: solid 1px;
padding: 1px;
}
.qp-tt td {
text-align: right;
padding-left: 10px;
text-align: right;
padding-left: 10px;
}
.qp-tt th {
text-align: left;
text-align: left;
}
.qp-bold,
.qp-tt-header {
font-weight: bold;
font-weight: bold;
}
.qp-tt-header {
text-align: center;
text-align: center;
}
/* Icons */
@@ -165,54 +171,54 @@ div[class|='qp-icon'] {
/* Layout - can't touch this */
.qp-tt {
position: absolute;
z-index: 1;
white-space: normal;
-webkit-transition-delay: 0.5s;
transition-delay: 0.5s;
position: absolute;
z-index: 1;
white-space: normal;
-webkit-transition-delay: 0.5s;
transition-delay: 0.5s;
}
div.qp-node .qp-tt,
.qp-noCssTooltip div.qp-node:hover .qp-tt {
visibility: hidden;
position: absolute;
overflow: hidden;
visibility: hidden;
position: absolute;
overflow: hidden;
}
div.qp-node:hover .qp-tt {
visibility: visible;
visibility: visible;
}
.qp-tt table {
white-space: nowrap;
white-space: nowrap;
}
.qp-node {
position: relative;
white-space: nowrap;
position: relative;
white-space: nowrap;
}
.qp-tr {
display: table;
display: table;
}
.qp-tr>div {
display: table-cell;
padding-left: 15px;
display: table-cell;
padding-left: 15px;
}
.qp-root {
display: table;
position: relative;
position: relative;
}
.qp-root svg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0;
background: transparent;
pointer-events: none;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0;
background: transparent;
pointer-events: none;
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./media/qp';

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { NgModule, Inject, forwardRef, ApplicationRef, ComponentFactoryResolver, Type } from '@angular/core';
import { APP_BASE_HREF, CommonModule } from '@angular/common';

View File

@@ -43,7 +43,7 @@ export class TaskHistoryActionProvider extends ContributableActionProvider {
* Return actions for history task
*/
public getTaskHistoryActions(tree: ITree, element: TaskNode): IAction[] {
var actions = [];
let actions = [];
// get actions for tasks in progress
if (element.status === TaskStatus.InProgress && element.isCancelable) {

View File

@@ -55,7 +55,7 @@ export class TaskHistoryRenderer implements IRenderer {
const taskTemplate: ITaskHistoryTemplateData = Object.create(null);
taskTemplate.root = dom.append(container, $('.task-group'));
taskTemplate.icon = dom.append(taskTemplate.root, $('img.task-icon'));
var titleContainer = dom.append(taskTemplate.root, $('div.task-details'));
let titleContainer = dom.append(taskTemplate.root, $('div.task-details'));
taskTemplate.title = dom.append(titleContainer, $('div.title'));
taskTemplate.description = dom.append(titleContainer, $('div.description'));
taskTemplate.time = dom.append(titleContainer, $('div.time'));
@@ -147,7 +147,5 @@ export class TaskHistoryRenderer implements IRenderer {
public disposeTemplate(tree: ITree, templateId: string, templateData: any): void {
// no op
// InputBox disposed in wrapUp
}
}

View File

@@ -142,7 +142,7 @@ export class TaskHistoryView {
let isDoubleClick = isMouseOrigin && event.payload.originalEvent && event.payload.originalEvent.detail === 2;
if (isDoubleClick) {
if (task.status === TaskStatus.Failed) {
var err = task.taskName + ': ' + task.message;
let err = task.taskName + ': ' + task.message;
this._errorMessageService.showDialog(Severity.Error, localize('taskError', 'Task error'), err);
}
}

View File

@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { StopWatch } from 'vs/base/common/stopwatch';
import { generateUuid } from 'vs/base/common/uuid';