Compare commits

...

12 Commits

Author SHA1 Message Date
Karl Burtram
bc09fb30d8 Updaet readme for June release (#1684) 2018-06-19 22:27:32 -07:00
Leila Lali
c13f219318 form should not default to100% by default (#1679) 2018-06-19 14:12:04 -07:00
Madeline MacDonald
6b018c5d06 Profiler toolbar fixes + creating connections (#1677)
* Fixing button enabling, connection selection

* Fixing spacing
2018-06-19 13:54:47 -07:00
Anthony Dresser
e69158d9b2 Swallow error on context view when disposing children (#1663)
* swallow error on context view  when disposing children

* fix edit comment
2018-06-19 12:22:25 -07:00
Madeline MacDonald
520cfb780a Profiler notifications (#1648)
* adding lost events flag to events available notification

* Initial changes to support notifications for stopped session and lost events

* Updated localized strings & send stop notification box

* reordering imports

* vbump sqltools & dataprotocolclient, fix notification wording
2018-06-19 11:23:01 -07:00
Leila Lali
e686fed209 fixing the table, form dialog tab layout issues (#1671) 2018-06-19 10:55:23 -07:00
Karl Burtram
80ab19ac23 Add screenshot to Profiler extension readme (#1670)
* Add screenshot to Profiler extension readme

* Fix up the readme text a little
2018-06-19 10:09:34 -07:00
Matt Irvine
25228fa58e Fix edit data limit dropdown position (#1667) 2018-06-18 20:27:25 -04:00
Karl Burtram
676d35090f Fix Release Notes link to refer to correct location (#1665)
* Fix Release Notes link to refer to correct location

* Fix typo
2018-06-18 20:18:24 -04:00
Karl Burtram
e1a36a356c Add Profiler extension to recommended list (#1662) 2018-06-18 19:30:16 -04:00
Matt Irvine
3274c0b734 Make height and width optional for model view components (#1657) 2018-06-18 16:27:57 -07:00
Karl Burtram
9c95e1289f Bump SQL Ops to 0.30.6 2018-06-18 15:37:17 -07:00
34 changed files with 191 additions and 75 deletions

View File

@@ -1,5 +1,18 @@
# Change Log
## Version 0.30.6
* Release date: June 20, 2018
* Release status: Public Preview
## What's new in this version
* **SQL Server Profiler for SQL Operations Studio *Preview*** extension initial release
* The new **SQL Data Warehouse** extension includes rich customizable dashboard widgets surfacing insights to your data warehouse. This unlocks key scenarios around managing and tuning your data warehouse to ensure it is optimized for consistent performance.
* **Edit Data "Filtering and Sorting"** support
* **SQL Server Agent for SQL Operations Studio *Preview*** extension enhancements for Jobs and Job History views
* Improved **Wizard & Dialog UI Builder Framework** extensibility APIs
* Update VS Code Platform source code integrating [March 2018 (1.22)](https://code.visualstudio.com/updates/v1_22) and [April 2018 (1.23)](https://code.visualstudio.com/updates/v1_23) releases
* Fix GitHub Issues
## Version 0.29.3
* Release date: May 7, 2018
* Release status: Public Preview

View File

@@ -4,16 +4,16 @@
SQL Operations Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.
**Download SQL Operations Studio May Public Preview**
**Download SQL Operations Studio June Public Preview**
Platform | Link
-- | --
Windows Setup Installer | https://go.microsoft.com/fwlink/?linkid=873386
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=873387
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=873388
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=873389
Linux RPM | https://go.microsoft.com/fwlink/?linkid=873390
Linux DEB | https://go.microsoft.com/fwlink/?linkid=873391
Windows Setup Installer | https://go.microsoft.com/fwlink/?linkid=875602
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=875603
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=875604
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=875605
Linux RPM | https://go.microsoft.com/fwlink/?linkid=875606
Linux DEB | https://go.microsoft.com/fwlink/?linkid=875607
Go to our [download page](https://aka.ms/sqlopsstudio) for more specific instructions.
@@ -61,6 +61,7 @@ The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.micro
## Contributions and "thank you"
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
* lanceklinger `Fix for double clicking column handle in results table #1504`
* westerncj for `Removed duplicate contribution from README.md (#753)`
* ntovas for `Fix for duplicate extensions shown in "Save File" dialog. (#779)`
* SebastianPfliegel for `Add cursor snippet (#475)`

View File

@@ -658,7 +658,7 @@
}
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#0.1.8.2",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#0.1.9",
"opener": "^1.4.3",
"service-downloader": "github:anthonydresser/service-downloader#0.1.2",
"vscode-extension-telemetry": "^0.0.15"

View File

@@ -1,6 +1,6 @@
{
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
"version": "1.4.0-alpha.45",
"version": "1.4.0-alpha.46",
"downloadFileNames": {
"Windows_86": "win-x86-netcoreapp2.1.zip",
"Windows_64": "win-x64-netcoreapp2.1.zip",

View File

@@ -10,6 +10,13 @@ Common SQL Profiler use-cases taken from https://docs.microsoft.com/en-us/sql/to
- Monitoring the performance of SQL Server to tune workloads.
- Correlating performance counters to diagnose problems.
## SQL Server Profiler 0.1.1 Release
The SQL Server Profiler for SQL Operations Studio *Preview* extension is now available. This is the initial preview release for a new lightweight XEvent-based profiler. The SQL Server Profiler extension tries to make it simple to quickly trace server activity for troubleshooting and monitoring.
We'll continue to enhance this extension over the next couple releases. Take a look at the below screenshot to see what's currently available.
<img width="850" src="https://user-images.githubusercontent.com/599935/41578613-fa10e8bc-7347-11e8-8b97-9fb7d186c9f6.png">
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

View File

@@ -2,7 +2,7 @@
"name": "profiler",
"displayName": "SQL Server Profiler",
"description": "SQL Server Profiler for SQL Operations Studio",
"version": "0.30.0",
"version": "0.1.1",
"publisher": "Microsoft",
"preview": true,
"license": "https://raw.githubusercontent.com/Microsoft/sqlopsstudio/master/LICENSE.txt",

View File

@@ -1,6 +1,6 @@
{
"name": "sqlops",
"version": "0.30.5",
"version": "0.30.6",
"distro": "8c3e97e3425cc9814496472ab73e076de2ba99ee",
"author": {
"name": "Microsoft Corporation"

View File

@@ -27,14 +27,16 @@
"reportIssueUrl": "https://github.com/Microsoft/sqlopsstudio/issues/new?labels=customer%20reported%20issue",
"requestFeatureUrl": "https://github.com/Microsoft/sqlopsstudio/issues/new?labels=feature-request"
},
"releaseNotesUrl": "https://go.microsoft.com/fwlink/?linkid=862039",
"gettingStartedUrl": "https://go.microsoft.com/fwlink/?linkid=862039",
"releaseNotesUrl": "https://go.microsoft.com/fwlink/?linkid=875578",
"documentationUrl": "https://go.microsoft.com/fwlink/?linkid=862277",
"commit": "9ca6200018fc206d67a47229f991901a8a453781",
"date": "2017-12-15T12:00:00.000Z",
"recommendedExtensions": [
"Microsoft.agent",
"Microsoft.whoisactive",
"Microsoft.profiler",
"Microsoft.server-report",
"Microsoft.whoisactive",
"Redgate.sql-search"
],
"extensionsGallery": {

View File

@@ -5,4 +5,9 @@
.editdata-component * {
box-sizing: border-box;
}
#workbench\.editor\.editDataEditor .monaco-toolbar .monaco-select-box {
margin-top: 4px;
margin-bottom: 4px;
}

View File

@@ -93,10 +93,10 @@ export default class ButtonComponent extends ComponentBase implements IComponent
this._button.enabled = this.enabled;
this._button.label = this.label;
if (this.width) {
this._button.setWidth(this.width.toString());
this._button.setWidth(this.convertSize(this.width.toString()));
}
if (this.height) {
this._button.setWidth(this.height.toString());
this._button.setWidth(this.convertSize(this.height.toString()));
}
this.updateIcon();
}

View File

@@ -20,7 +20,7 @@ import { attachInputBoxStyler, attachListStyler } from 'vs/platform/theme/common
@Component({
selector: 'modelview-checkbox',
template: `
<div #input style="width: 100%"></div>
<div #input [style.width]="getWidth()"></div>
`
})
export default class CheckBoxComponent extends ComponentBase implements IComponent, OnDestroy, AfterViewInit {

View File

@@ -146,11 +146,12 @@ export abstract class ComponentBase extends Disposable implements IComponent, On
return this.height ? this.convertSize(this.height) : '';
}
protected convertSize(size: number | string): string {
protected convertSize(size: number | string, defaultValue?: string): string {
defaultValue = defaultValue || '';
if (types.isUndefinedOrNull(size)) {
return '100%';
return defaultValue;
}
let convertedSize: string = size ? size.toString() : '100%';
let convertedSize: string = size ? size.toString() : defaultValue;
if (!convertedSize.toLowerCase().endsWith('px') && !convertedSize.toLowerCase().endsWith('%')) {
convertedSize = convertedSize + 'px';
}

View File

@@ -145,18 +145,26 @@ export default class DropDownComponent extends ComponentBase implements ICompone
}
private getSelectedValue(): string {
if (this.values && this.valuesHaveDisplayName()) {
let valueCategory = (<sqlops.CategoryValue[]>this.values).find(v => v.name === this.value);
if (this.values && this.values.length > 0 && this.valuesHaveDisplayName()) {
let selectedValue = <sqlops.CategoryValue>this.value || <sqlops.CategoryValue>this.values[0];
if (!this.value) {
this.value = selectedValue;
}
let valueCategory = (<sqlops.CategoryValue[]>this.values).find(v => v.name === selectedValue.name);
return valueCategory && valueCategory.displayName;
} else {
return this.value;
if (!this.value && this.values && this.values.length > 0) {
this.value = <string>this.values[0];
}
return <string>this.value;
}
}
private setSelectedValue(newValue: string): void {
if (this.values && this.valuesHaveDisplayName()) {
let valueCategory = (<sqlops.CategoryValue[]>this.values).find(v => v.displayName === newValue);
this.value = valueCategory && valueCategory.name;
this.value = valueCategory;
} else {
this.value = newValue;
}
@@ -164,8 +172,8 @@ export default class DropDownComponent extends ComponentBase implements ICompone
// CSS-bound properties
private get value(): string {
return this.getPropertyOrDefault<sqlops.DropDownProperties, string>((props) => props.value, '');
private get value(): string | sqlops.CategoryValue {
return this.getPropertyOrDefault<sqlops.DropDownProperties, string | sqlops.CategoryValue>((props) => props.value, '');
}
private get editable(): boolean {
@@ -180,8 +188,8 @@ export default class DropDownComponent extends ComponentBase implements ICompone
return !this.editable ? '' : 'none';
}
private set value(newValue: string) {
this.setPropertyFromUI<sqlops.DropDownProperties, string>(this.setValueProperties, newValue);
private set value(newValue: string | sqlops.CategoryValue) {
this.setPropertyFromUI<sqlops.DropDownProperties, string | sqlops.CategoryValue>(this.setValueProperties, newValue);
}
private get values(): string[] | sqlops.CategoryValue[] {

View File

@@ -26,7 +26,7 @@ class FlexItem {
template: `
<div *ngIf="items" class="flexContainer" [style.flexFlow]="flexFlow" [style.justifyContent]="justifyContent"
[style.alignItems]="alignItems" [style.alignContent]="alignContent" [style.height]="height" [style.width]="width">
<div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.order]="getItemOrder(item)" >
<div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.textAlign]="textAlign" [style.order]="getItemOrder(item)" >
<model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore">
</model-component-wrapper>
</div>
@@ -40,6 +40,7 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
private _justifyContent: string;
private _alignItems: string;
private _alignContent: string;
private _textAlign: string;
private _height: string;
private _width: string;
@@ -65,6 +66,7 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
this._justifyContent = layout.justifyContent ? layout.justifyContent : '';
this._alignItems = layout.alignItems ? layout.alignItems : '';
this._alignContent = layout.alignContent ? layout.alignContent : '';
this._textAlign = layout.textAlign ? layout.textAlign : '';
this._height = this.convertSize(layout.height);
this._width = this.convertSize(layout.width);
@@ -96,6 +98,10 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
return this._alignContent;
}
public get textAlign(): string {
return this._textAlign;
}
private getItemFlex(item: FlexItem): string {
return item.config ? item.config.flex : '1 1 auto';
}

View File

@@ -16,13 +16,15 @@ import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboar
import { ContainerBase } from 'sql/parts/modelComponents/componentBase';
import { ModelComponentWrapper } from 'sql/parts/modelComponents/modelComponentWrapper.component';
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
import { getContentHeight, getContentWidth, Dimension } from 'vs/base/browser/dom';
export interface TitledFormItemLayout {
title: string;
actions?: string[];
isFormComponent: Boolean;
horizontal: boolean;
componentWidth: number;
componentWidth?: number | string;
componentHeight?: number | string;
}
export interface FormLayout {
@@ -37,7 +39,7 @@ class FormItem {
template: `
<div #container *ngIf="items" class="form-table" [style.width]="getFormWidth()" [style.height]="getFormHeight()">
<ng-container *ngFor="let item of items">
<div class="form-row" *ngIf="isFormComponent(item)">
<div class="form-row" *ngIf="isFormComponent(item)" [style.height]="getRowHeight(item)">
<ng-container *ngIf="isHorizontal(item)">
<div class="form-cell">{{getItemTitle(item)}}</div>
@@ -56,10 +58,10 @@ class FormItem {
</div>
</div>
</ng-container>
<div class="form-vertical-container" *ngIf="isVertical(item)">
<div class="form-vertical-container" *ngIf="isVertical(item)" [style.height]="getRowHeight(item)">
<div class="form-item-row">{{getItemTitle(item)}}</div>
<div class="form-item-row" [style.width]="getComponentWidth(item)">
<model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore" [style.width]="getComponentWidth(item)">
<div class="form-item-row" [style.width]="getComponentWidth(item)" [style.height]="getRowHeight(item)">
<model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore" [style.width]="getComponentWidth(item)" [style.height]="getRowHeight(item)">
</model-component-wrapper>
</div>
<div *ngIf="itemHasActions(item)" class="form-item-row form-actions-table form-item-last-row">
@@ -101,6 +103,10 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
ngAfterViewInit(): void {
}
public layout(): void {
super.layout();
}
/// IComponent implementation
public get alignItems(): string {
@@ -112,16 +118,21 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
}
private getFormWidth(): string {
return this.convertSize(this._formLayout && this._formLayout.width);
return this.convertSize(this._formLayout && this._formLayout.width, '');
}
private getFormHeight(): string {
return this.convertSize(this._formLayout && this._formLayout.height);
return this.convertSize(this._formLayout && this._formLayout.height, '');
}
private getComponentWidth(item: FormItem): string {
let itemConfig = item.config;
return (itemConfig && itemConfig.componentWidth) ? itemConfig.componentWidth + 'px' : '';
return (itemConfig && itemConfig.componentWidth) ? this.convertSize(itemConfig.componentWidth, '') : '';
}
private getRowHeight(item: FormItem): string {
let itemConfig = item.config;
return (itemConfig && itemConfig.componentHeight) ? this.convertSize(itemConfig.componentHeight, '') : '';
}
private getItemTitle(item: FormItem): string {

View File

@@ -23,7 +23,7 @@ import { RowSelectionModel } from 'sql/base/browser/ui/table/plugins/rowSelectio
@Component({
selector: 'modelview-table',
template: `
<div #table style="width: 100%"></div>
<div #table style="width: 100%;height:100%"></div>
`
})
export default class TableComponent extends ComponentBase implements IComponent, OnDestroy, AfterViewInit {
@@ -92,9 +92,8 @@ export default class TableComponent extends ComponentBase implements IComponent,
let options = <Slick.GridOptions<any>>{
syncColumnCellResize: true,
enableColumnReorder: false,
rowHeight: 45,
enableCellNavigation: true,
forceFitColumns: true
forceFitColumns: true,
};
this._table = new Table<Slick.SlickData>(this._inputContainer.nativeElement, this._tableData, this._tableColumns, options);

View File

@@ -19,8 +19,10 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
import { IObjectExplorerService } from '../../objectExplorer/common/objectExplorerService';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { TPromise } from 'vs/base/common/winjs.base';
import * as TaskUtilities from 'sql/workbench/common/taskUtilities';
// Contribute Global Actions
const category = nls.localize('profilerCategory', "Profiler");
@@ -37,20 +39,9 @@ CommandsRegistry.registerCommand({
let editorService: IWorkbenchEditorService = accessor.get(IWorkbenchEditorService);
let instantiationService: IInstantiationService = accessor.get(IInstantiationService);
let connectionService: IConnectionManagementService = accessor.get(IConnectionManagementService);
let objectExplorerService: IObjectExplorerService = accessor.get(IObjectExplorerService);
// TODO: for test-only, grab the first MSSQL active connection for the profiler session
// TODO: when finishing the feature the connection should come from the launch context
let connectionProfile: IConnectionProfile;
let activeConnections = connectionService.getActiveConnections();
if (activeConnections) {
for (let i = 0; i < activeConnections.length; ++i) {
if (activeConnections[i].providerName === 'MSSQL') {
connectionProfile = activeConnections[i];
break;
}
}
}
let connectionProfile = TaskUtilities.getCurrentGlobalConnection(objectExplorerService, connectionService, editorService);
let profilerInput = instantiationService.createInstance(ProfilerInput, connectionProfile);
return editorService.openEditor(profilerInput, { pinned: true }, false).then(() => TPromise.as(true));
}

View File

@@ -202,8 +202,6 @@ export class ProfilerEditor extends BaseEditor {
this._register(attachSelectBoxStyler(this._sessionTemplateSelector, this.themeService));
this._actionBar.setContent([
{ action: this._connectAction },
{ element: Taskbar.createTaskbarSeparator() },
{ action: this._startAction },
{ action: this._stopAction },
{ element: dropdownContainer },
@@ -386,21 +384,20 @@ export class ProfilerEditor extends BaseEditor {
if (e.isConnected) {
this._connectAction.connected = this.input.state.isConnected;
this._startAction.enabled = this.input.state.isConnected;
this._stopAction.enabled = false;
this._pauseAction.enabled = false;
if (this.input.state.isConnected) {
this._sessionTemplateSelector.disable();
} else {
this._sessionTemplateSelector.enable();
this._startAction.enabled = this.input.state.isConnected;
this._stopAction.enabled = false;
this._pauseAction.enabled = false;
return;
}
return;
}
if (e.isPaused){
this._pauseAction.paused = this.input.state.isPaused;
this._pauseAction.enabled = !this.input.state.isStopped && (this.input.state.isRunning || this.input.state.isPaused);
}
if (e.isStopped || e.isRunning) {

View File

@@ -14,6 +14,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import { EditorInput } from 'vs/workbench/common/editor';
import { IEditorModel } from 'vs/platform/editor/common/editor';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { Event, Emitter } from 'vs/base/common/event';
import { generateUuid } from 'vs/base/common/uuid';
@@ -35,14 +36,15 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
constructor(
private _connection: IConnectionProfile,
@IInstantiationService private _instantiationService: IInstantiationService,
@IProfilerService private _profilerService: IProfilerService
@IProfilerService private _profilerService: IProfilerService,
@INotificationService private _notificationService: INotificationService
) {
super();
this._state = new ProfilerState();
// set inital state
this.state.change({
isConnected: true,
isStopped: false,
isStopped: true,
isPaused: false,
isRunning: false,
autoscroll: true
@@ -123,7 +125,21 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
return this._state;
}
public onSessionStopped(notification: sqlops.ProfilerSessionStoppedParams) {
this._notificationService.error(nls.localize("profiler.sessionStopped", "XEvent Profiler Session stopped unexpectedly on the server {0}.", this._connection.serverName));
this.state.change({
isStopped: true,
isPaused: false,
isRunning: false
});
}
public onMoreRows(eventMessage: sqlops.ProfilerSessionEvents) {
if (eventMessage.eventsLost){
this._notificationService.warn(nls.localize("profiler.eventsLost", "The XEvent Profiler session for {0} has lost events.", this._connection.serverName));
}
for (let i: number = 0; i < eventMessage.events.length && i < 500; ++i) {
let e: sqlops.ProfilerEvent = eventMessage.events[i];
let data = {};

View File

@@ -25,6 +25,10 @@ export interface IProfilerSession {
* Called by the service when more rows are available to render
*/
onMoreRows(events: sqlops.ProfilerSessionEvents);
/**
* Called by the service when the session is closed unexpectedly
*/
onSessionStopped(events: sqlops.ProfilerSessionStoppedParams);
}
/**
@@ -65,6 +69,10 @@ export interface IProfilerService {
* The method called by the service provider for when more rows are available to render
*/
onMoreRows(params: sqlops.ProfilerSessionEvents): void;
/**
* The method called by the service provider for when more rows are available to render
*/
onSessionStopped(params: sqlops.ProfilerSessionStoppedParams): void;
/**
* Gets a list of the session templates that are specified in the settings
* @param provider An optional string to limit the session template to a specific

View File

@@ -82,6 +82,11 @@ export class ProfilerService implements IProfilerService {
this._sessionMap.get(this._idMap.reverseGet(params.sessionId)).onMoreRows(params);
}
public onSessionStopped(params: sqlops.ProfilerSessionStoppedParams): void {
this._sessionMap.get(this._idMap.reverseGet(params.ownerUri)).onSessionStopped(params);
}
public connectSession(id: ProfilerSessionID): Thenable<boolean> {
return this._runAction(id, provider => provider.connectSession(this._idMap.get(id)));
}

View File

@@ -48,6 +48,10 @@ export class ProfilerTestBackend implements sqlops.ProfilerProvider {
return;
}
registerOnSessionStopped(handler: (response: sqlops.ProfilerSessionStoppedParams) => any) {
return;
}
private intervalFn(guid: string): number {
return setTimeout(() => {
let data = this.testData[this.index++];

View File

@@ -67,6 +67,7 @@ export class DialogPane extends Disposable implements IThemable {
this._body.appendChild(tabContainer);
this.initializeModelViewContainer(tabContainer, tab.content, tab);
this._tabbedPanel.onTabChange(e => {
tabContainer.style.height = (this.getTabDimension().height - this._tabbedPanel.headersize) + 'px';
this._onTabChange.fire(tab.content);
});
this._tabbedPanel.pushTab({
@@ -91,7 +92,7 @@ export class DialogPane extends Disposable implements IThemable {
}
private getTabDimension(): DOM.Dimension {
return new DOM.Dimension(DOM.getContentWidth(this._body), DOM.getContentHeight(this._body))
return new DOM.Dimension(DOM.getContentWidth(this._body), DOM.getContentHeight(this._body));
}
public layout(): void {

10
src/sql/sqlops.d.ts vendored
View File

@@ -1409,6 +1409,7 @@ declare module 'sqlops' {
disconnectSession(sessionId: string): Thenable<boolean>;
registerOnSessionEventsAvailable(handler: (response: ProfilerSessionEvents) => any): void;
registerOnSessionStopped(handler: (response: ProfilerSessionStoppedParams) => any): void;
}
export interface IProfilerTableRow {
@@ -1449,6 +1450,15 @@ declare module 'sqlops' {
sessionId: string;
events: ProfilerEvent[];
eventsLost: boolean;
}
export interface ProfilerSessionStoppedParams {
ownerUri: string;
sessionId: number;
}
// File browser interfaces -----------------------------------------------------------------------

View File

@@ -216,6 +216,11 @@ declare module 'sqlops' {
* Container Width
*/
width?: number | string;
/**
*
*/
textAlign?: string
}
export interface FlexItemLayout {
@@ -232,7 +237,8 @@ declare module 'sqlops' {
export interface FormItemLayout {
horizontal?: boolean;
componentWidth?: number;
componentWidth?: number | string;
componentHeight?: number | string;
}
export interface FormLayout {
@@ -304,8 +310,8 @@ declare module 'sqlops' {
export type InputBoxInputType = 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'range' | 'search' | 'text' | 'time' | 'url' | 'week';
export interface ComponentProperties {
height: number | string;
width: number | string;
height?: number | string;
width?: number | string;
}
export interface InputBoxProperties extends ComponentProperties {
@@ -354,7 +360,7 @@ declare module 'sqlops' {
}
export interface DropDownProperties extends ComponentProperties {
value?: string;
value?: string | CategoryValue;
values?: string[] | CategoryValue[];
editable?: boolean;
}
@@ -418,7 +424,7 @@ declare module 'sqlops' {
}
export interface DropDownComponent extends Component, DropDownProperties {
value: string;
value: string | CategoryValue;
values: string[] | CategoryValue[];
onValueChanged: vscode.Event<any>;
}

View File

@@ -518,6 +518,13 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
this._proxy.$onSessionEventsAvailable(handle, response);
}
/**
* Profiler session stopped unexpectedly notification
*/
public $onSessionStopped(handle: number, response: sqlops.ProfilerSessionStoppedParams): void {
this._proxy.$onSessionStopped(handle, response);
}
/**
* Agent Job Provider methods

View File

@@ -771,10 +771,10 @@ class DropDownWrapper extends ComponentWrapper implements sqlops.DropDownCompone
this._emitterMap.set(ComponentEventType.onDidChange, new Emitter<any>());
}
public get value(): string {
public get value(): string | sqlops.CategoryValue {
return this.properties['value'];
}
public set value(v: string) {
public set value(v: string | sqlops.CategoryValue) {
this.setProperty('value', v);
}

View File

@@ -432,6 +432,10 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
this._profilerService.onMoreRows(response);
}
public $onSessionStopped(handle: number, response: sqlops.ProfilerSessionStoppedParams): void {
this._profilerService.onSessionStopped(response);
}
public $unregisterProvider(handle: number): TPromise<any> {
let capabilitiesRegistration = this._capabilitiesRegistrations[handle];
if (capabilitiesRegistration) {

View File

@@ -237,6 +237,10 @@ export function createApiFactory(
extHostDataProvider.$onSessionEventsAvailable(provider.handle, response);
});
provider.registerOnSessionStopped((response: sqlops.ProfilerSessionStoppedParams) => {
extHostDataProvider.$onSessionStopped(provider.handle, response);
});
return extHostDataProvider.$registerProfilerProvider(provider);
};

View File

@@ -416,6 +416,7 @@ export interface MainThreadDataProtocolShape extends IDisposable {
$onFilePathsValidated(handle: number, response: sqlops.FileBrowserValidatedParams): void;
$onScriptingComplete(handle: number, message: sqlops.ScriptingCompleteResult): void;
$onSessionEventsAvailable(handle: number, response: sqlops.ProfilerSessionEvents): void;
$onSessionStopped(handle: number, response: sqlops.ProfilerSessionStoppedParams): void;
/**
* Callback when a session has completed initialization

View File

@@ -29,14 +29,14 @@ export class OpenGettingStartedInBrowserAction extends Action {
}
run(): TPromise<any> {
const uri = URI.parse(product.releaseNotesUrl);
const uri = URI.parse(product.gettingStartedUrl);
return this.openerService.open(uri);
}
}
export class ShowCurrentReleaseNotesAction extends AbstractShowReleaseNotesAction {
static ID = 'update.showCurrentCarbonReleaseNotes';
static ID = 'update.showGettingStarted';
static LABEL = nls.localize('showReleaseNotes', "Show Getting Started");
constructor(

View File

@@ -397,8 +397,16 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio
container.appendChild(this.selectDropDownContainer);
this.layoutSelectDropDown();
// {{SQL CARBON EDIT}}
return {
dispose: () => container.removeChild(this.selectDropDownContainer) // remove to take out the CSS rules we add
dispose: () => {
try {
container.removeChild(this.selectDropDownContainer); // remove to take out the CSS rules we add
} catch(e) {
// if this fails it means it is already removed
}
}
};
}

View File

@@ -999,8 +999,8 @@ export class CodeMenu {
arrays.coalesce([
// new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showWelcomePage') }),
// {{SQL CARBON EDIT}}
product.releaseNotesUrl ?
this.createMenuItem(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "Getting &&Started"), 'update.showCurrentCarbonReleaseNotes')
product.gettingStartedUrl ?
this.createMenuItem(nls.localize({ key: 'miGettingStarted', comment: ['&& denotes a mnemonic'] }, "Getting &&Started"), 'update.showGettingStarted')
: null,
product.documentationUrl ?
this.createMenuItem(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation"), 'workbench.action.openDocumentationUrl')

View File

@@ -52,6 +52,7 @@ export interface IProductConfiguration {
};
documentationUrl: string;
releaseNotesUrl: string;
gettingStartedUrl: string;
keyboardShortcutsUrlMac: string;
keyboardShortcutsUrlLinux: string;
keyboardShortcutsUrlWin: string;