Move protocol client out (#643)

* close

* connection is working

* formatting

* adds all

* formatting

* formatting and changing how features are initialized

* formatting

* changed named of typings file

* update

* updated to use dataprotocol npm

* formatting

* removed unneeded logging

* readd npm shrinkwrap

* still not working

* removed unnecessary codfe

* addressed comments

* readded azure resource provider

* fix capabilities cacheing

* added backwards capat for older protocol

* update shrinkwrap

* update shrinkwrap

* updated shrinkwrap

* fixed tests

* removed dead code

* remove dead code

* fix compile

* remove backcompat stuff

* change location of npm

* vbump sqltools

* merge master

* fix imports

* fix build breaks

* update for sqlops

* update yarn dependencies
This commit is contained in:
Anthony Dresser
2018-02-20 13:38:16 -08:00
committed by GitHub
parent 8a9ee40524
commit 8570910a43
159 changed files with 4421 additions and 7180 deletions

View File

@@ -8,7 +8,7 @@ import { IProfilerSession, IProfilerService, ProfilerSessionID, IProfilerSession
import { ProfilerState } from './profilerState';
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
import * as data from 'data';
import * as sqlops from 'sqlops';
import { TPromise } from 'vs/base/common/winjs.base';
import { EditorInput } from 'vs/workbench/common/editor';
@@ -123,9 +123,9 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
return this._state;
}
public onMoreRows(eventMessage: data.ProfilerSessionEvents) {
public onMoreRows(eventMessage: sqlops.ProfilerSessionEvents) {
for (let i: number = 0; i < eventMessage.events.length && i < 500; ++i) {
let e: data.ProfilerEvent = eventMessage.events[i];
let e: sqlops.ProfilerEvent = eventMessage.events[i];
let data = {};
data['EventClass'] = e.name;
data['StartTime'] = e.timestamp;

View File

@@ -7,7 +7,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import * as data from 'data';
import * as sqlops from 'sqlops';
const PROFILER_SERVICE_ID = 'profilerService';
export const IProfilerService = createDecorator<IProfilerService>(PROFILER_SERVICE_ID);
@@ -24,7 +24,7 @@ export interface IProfilerSession {
/**
* Called by the service when more rows are available to render
*/
onMoreRows(events: data.ProfilerSessionEvents);
onMoreRows(events: sqlops.ProfilerSessionEvents);
}
/**
@@ -35,7 +35,7 @@ export interface IProfilerService {
/**
* Registers a backend provider for profiler session. ex: mssql
*/
registerProvider(providerId: string, provider: data.ProfilerProvider): void;
registerProvider(providerId: string, provider: sqlops.ProfilerProvider): void;
/**
* Registers a session with the service that acts as the UI for a profiler session
* @returns An unique id that should be used to make subsequent calls to this service
@@ -64,7 +64,7 @@ export interface IProfilerService {
/**
* The method called by the service provider for when more rows are available to render
*/
onMoreRows(params: data.ProfilerSessionEvents): void;
onMoreRows(params: sqlops.ProfilerSessionEvents): 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

@@ -12,7 +12,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { ProfilerColumnEditorDialog } from 'sql/parts/profiler/dialog/profilerColumnEditorDialog';
import * as data from 'data';
import * as sqlops from 'sqlops';
import { TPromise } from 'vs/base/common/winjs.base';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@@ -44,7 +44,7 @@ class TwoWayMap<T, K> {
export class ProfilerService implements IProfilerService {
public _serviceBrand: any;
private _providers = new Map<string, data.ProfilerProvider>();
private _providers = new Map<string, sqlops.ProfilerProvider>();
private _idMap = new TwoWayMap<ProfilerSessionID, string>();
private _sessionMap = new Map<ProfilerSessionID, IProfilerSession>();
private _dialog: ProfilerColumnEditorDialog;
@@ -55,7 +55,7 @@ export class ProfilerService implements IProfilerService {
@IInstantiationService private _instantiationService: IInstantiationService
) { }
public registerProvider(providerId: string, provider: data.ProfilerProvider): void {
public registerProvider(providerId: string, provider: sqlops.ProfilerProvider): void {
this._providers.set(providerId, provider);
}
@@ -77,7 +77,7 @@ export class ProfilerService implements IProfilerService {
return uri;
}
public onMoreRows(params: data.ProfilerSessionEvents): void {
public onMoreRows(params: sqlops.ProfilerSessionEvents): void {
this._sessionMap.get(this._idMap.reverseGet(params.sessionId)).onMoreRows(params);
}
@@ -102,7 +102,7 @@ export class ProfilerService implements IProfilerService {
return this._runAction(id, provider => provider.stopSession(this._idMap.get(id)));
}
private _runAction<T>(id: ProfilerSessionID, action: (handler: data.ProfilerProvider) => Thenable<T>): Thenable<T> {
private _runAction<T>(id: ProfilerSessionID, action: (handler: sqlops.ProfilerProvider) => Thenable<T>): Thenable<T> {
// let providerId = this._connectionService.getProviderIdFromUri(this._idMap.get(id));
let providerId = 'MSSQL';

View File

@@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import * as pfs from 'vs/base/node/pfs';
import * as path from 'path';
import * as data from 'data';
import * as sqlops from 'sqlops';
declare var __dirname;
@@ -30,7 +30,7 @@ const columns = [
'BinaryData'
];
export class ProfilerTestBackend implements data.ProfilerProvider {
export class ProfilerTestBackend implements sqlops.ProfilerProvider {
public readonly providerId = 'MSSQL';
private index = 0;
private timeOutMap = new Map<string, number>();
@@ -44,7 +44,7 @@ export class ProfilerTestBackend implements data.ProfilerProvider {
return TPromise.as(true);
}
registerOnSessionEventsAvailable(handler: (response: data.ProfilerSessionEvents) => any) {
registerOnSessionEventsAvailable(handler: (response: sqlops.ProfilerSessionEvents) => any) {
return;
}