mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
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
This commit is contained in:
committed by
GitHub
parent
e686fed209
commit
520cfb780a
@@ -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
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
|
||||
@@ -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++];
|
||||
|
||||
Reference in New Issue
Block a user