update
This commit is contained in:
@@ -192,12 +192,10 @@ export class SshSuspendService extends EventEmitter {
|
||||
* @returns Promise<SuspendedSessionInfo[]> 挂起会话信息的数组。
|
||||
*/
|
||||
async listSuspendedSessions(userId: number): Promise<SuspendedSessionInfo[]> {
|
||||
console.log(`[SshSuspendService DEBUG] listSuspendedSessions: Called for userId=${userId}`);
|
||||
const userSessions = this.getUserSessions(userId);
|
||||
const sessionsInfo: SuspendedSessionInfo[] = [];
|
||||
|
||||
for (const [suspendSessionId, details] of userSessions.entries()) {
|
||||
console.log(`[SshSuspendService DEBUG] listSuspendedSessions: Processing suspendSessionId=${suspendSessionId}, status=${details.backendSshStatus}`);
|
||||
sessionsInfo.push({
|
||||
suspendSessionId,
|
||||
connectionName: details.connectionName,
|
||||
|
||||
@@ -23,7 +23,6 @@ export class SshSuspendController {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`[SshSuspendController] getSuspendedSshSessions called for user ID: ${userId}`);
|
||||
|
||||
const sessions: SuspendedSessionInfo[] = await sshSuspendService.listSuspendedSessions(userId);
|
||||
res.status(200).json(sessions);
|
||||
|
||||
@@ -256,7 +256,7 @@ export function createSshTerminalManager(sessionId: string, wsDeps: SshTerminalD
|
||||
return; // 忽略不属于此会话的消息
|
||||
}
|
||||
|
||||
console.log(`[会话 ${sessionId}][SSH终端模块] SSH 会话已连接。`);
|
||||
console.log(`[会话 ${sessionId}][SSH终端模块] SSH 会话已连接。 Payload:`, payload, 'Full message:', message); // 更详细的日志
|
||||
isSshConnected.value = true; // 更新状态
|
||||
// 连接成功后聚焦终端
|
||||
terminalInstance.value?.focus();
|
||||
|
||||
Reference in New Issue
Block a user