mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-22 12:50:29 -04:00
Profiler toolbar changes (#1615)
* Clear event view pane when starting new session * Removing debug logging * Handling pause button * Cleaning up comments from previous commit * Fixing comments from PR * Fixing a comment I forgot to delete * Bumping dataprotocolclient version * Bumping sqltoolsservice & sqlops-dataprotocolclient version
This commit is contained in:
committed by
GitHub
parent
8e72fdaa52
commit
af2bc859d1
@@ -57,7 +57,7 @@ export class ProfilerConnect extends Action {
|
||||
public set connected(value: boolean) {
|
||||
this._connected = value;
|
||||
this._setClass(value ? 'disconnect' : 'connect');
|
||||
this._setLabel(value ? nls.localize('profilerAction.disconnect', 'Disconnected') : nls.localize('profilerAction.connect', "Connect"));
|
||||
this._setLabel(value ? nls.localize('profilerAction.disconnect', 'Disconnect') : nls.localize('profilerAction.connect', "Connect"));
|
||||
}
|
||||
|
||||
public get connected(): boolean {
|
||||
@@ -78,17 +78,19 @@ export class ProfilerStart extends Action {
|
||||
|
||||
public run(input: ProfilerInput): TPromise<boolean> {
|
||||
this.enabled = false;
|
||||
input.data.clear();
|
||||
return TPromise.wrap(this._profilerService.startSession(input.id).then(() => {
|
||||
input.state.change({ isRunning: true, isStopped: false, isPaused: false });
|
||||
return true;
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class ProfilerPause extends Action {
|
||||
public static ID = 'profiler.pause';
|
||||
public static LABEL = nls.localize('pause', "Pause");
|
||||
public static LABEL = nls.localize('profiler.capture', "Pause Capture");
|
||||
|
||||
private _paused: boolean = false;
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -98,12 +100,22 @@ export class ProfilerPause extends Action {
|
||||
}
|
||||
|
||||
public run(input: ProfilerInput): TPromise<boolean> {
|
||||
this.enabled = false;
|
||||
return TPromise.wrap(this._profilerService.pauseSession(input.id).then(() => {
|
||||
input.state.change({ isPaused: true, isStopped: false, isRunning: false });
|
||||
this.paused = !this._paused;
|
||||
input.state.change({ isPaused: this.paused, isStopped: false, isRunning: !this.paused });
|
||||
return true;
|
||||
}));
|
||||
}
|
||||
|
||||
public set paused(value: boolean) {
|
||||
this._paused = value;
|
||||
this._setClass(value ? 'start' : 'stop');
|
||||
this._setLabel(value ? nls.localize('profilerAction.resumeCapture', "Resume Capture") : nls.localize('profilerAction.pauseCapture', "Pause Capture"));
|
||||
}
|
||||
|
||||
public get paused(): boolean {
|
||||
return this._paused;
|
||||
}
|
||||
}
|
||||
|
||||
export class ProfilerStop extends Action {
|
||||
|
||||
Reference in New Issue
Block a user