mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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);
|
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);
|
this._updateSessionSelector(previousSessionName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -581,7 +581,7 @@ export class ProfilerEditor extends EditorPane {
|
|||||||
}
|
}
|
||||||
if (this.input.state.isStopped) {
|
if (this.input.state.isStopped) {
|
||||||
this._updateToolbar();
|
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();
|
this._updateSessionSelector();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export class ProfilerService implements IProfilerService {
|
|||||||
this.updateMemento(id, { previousSessionName: sessionName });
|
this.updateMemento(id, { previousSessionName: sessionName });
|
||||||
try {
|
try {
|
||||||
await this._runAction(id, provider => provider.startSession(this._idMap.get(id)!, sessionName, sessionType));
|
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 });
|
this._sessionMap.get(this._idMap.reverseGet(id)!)!.onSessionStateChanged({ isRunning: isRunning, isStopped: false, isPaused: false });
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user