mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Update session dropdown and fix running state info (#24019)
* Update session dropdown and fix running state info * Update comment
This commit is contained in:
@@ -553,7 +553,7 @@ export class ProfilerEditor extends EditorPane {
|
||||
this._profilerService.launchCreateSessionDialog(this.input);
|
||||
}
|
||||
|
||||
if (previousSessionName) { // skip updating session selector if there is no previous session name
|
||||
if (!this.input.isFileSession) { // skip updating session selector for File session to block starting another session from a non-connected file session
|
||||
this._updateSessionSelector(previousSessionName);
|
||||
}
|
||||
} else {
|
||||
@@ -581,7 +581,7 @@ export class ProfilerEditor extends EditorPane {
|
||||
}
|
||||
if (this.input.state.isStopped) {
|
||||
this._updateToolbar();
|
||||
if (!this.input.isFileSession) { // skip updating session selector for File sessions
|
||||
if (!this.input.isFileSession) { // skip updating session selector for File sessions to block starting another session from a non-connected file session
|
||||
this._updateSessionSelector();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ export class ProfilerService implements IProfilerService {
|
||||
this.updateMemento(id, { previousSessionName: sessionName });
|
||||
try {
|
||||
await this._runAction(id, provider => provider.startSession(this._idMap.get(id)!, sessionName, sessionType));
|
||||
let isRunning = sessionType === ProfilingSessionType.RemoteSession ? true : false; // Reading session stops when the file reading completes
|
||||
let isRunning = sessionType === ProfilingSessionType.LocalFile ? false : true; // Reading session stops when the file reading completes
|
||||
this._sessionMap.get(this._idMap.reverseGet(id)!)!.onSessionStateChanged({ isRunning: isRunning, isStopped: false, isPaused: false });
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user