mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-22 12:50:29 -04:00
Improving profiler controls and toolbar (#1931)
* Profiler toolbar improvements * Fixing formatting issues
This commit is contained in:
committed by
GitHub
parent
4d67eca8bb
commit
7b23ca8ee7
@@ -77,7 +77,6 @@ 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));
|
||||
}
|
||||
@@ -127,7 +126,6 @@ export class ProfilerStop extends Action {
|
||||
}
|
||||
|
||||
public run(input: ProfilerInput): TPromise<boolean> {
|
||||
this.enabled = false;
|
||||
return TPromise.wrap(this._profilerService.stopSession(input.id));
|
||||
}
|
||||
}
|
||||
@@ -137,7 +135,7 @@ export class ProfilerClear extends Action {
|
||||
public static LABEL = nls.localize('profiler.clear', "Clear Data");
|
||||
|
||||
constructor(id: string, label: string) {
|
||||
super(id, label, 'stop');
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
run(input: ProfilerInput): TPromise<void> {
|
||||
@@ -148,14 +146,15 @@ export class ProfilerClear extends Action {
|
||||
|
||||
export class ProfilerAutoScroll extends Action {
|
||||
public static ID = 'profiler.autoscroll';
|
||||
public static LABEL = nls.localize('profiler.toggleAutoscroll', "Toggle Auto Scroll");
|
||||
public static LABEL = nls.localize('profiler.autoscrollOn', "Auto Scroll: On");
|
||||
|
||||
constructor(id: string, label: string) {
|
||||
super(id, label, 'stop');
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
run(input: ProfilerInput): TPromise<boolean> {
|
||||
this.checked = !this.checked;
|
||||
this._setLabel(this.checked ? nls.localize('profilerAction.autoscrollOn', "Auto Scroll: On") : nls.localize('profilerAction.autoscrollOff', "Auto Scroll: Off"));
|
||||
input.state.change({ autoscroll: this.checked });
|
||||
return TPromise.as(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user