完善支持多行指令
This commit is contained in:
@ -167,7 +167,7 @@ class Access extends Component {
|
||||
};
|
||||
|
||||
updateSessionStatus = async (sessionId) => {
|
||||
let result = await request.post(`/sessions/${sessionId}/content`);
|
||||
let result = await request.post(`/sessions/${sessionId}/connect`);
|
||||
if (result.code !== 1) {
|
||||
message.error(result.message);
|
||||
}
|
||||
|
@ -101,7 +101,10 @@ class Console extends Component {
|
||||
if (command !== '') {
|
||||
let webSocket = this.state.webSocket;
|
||||
if (webSocket !== undefined && webSocket.readyState === WebSocket.OPEN) {
|
||||
webSocket.send(JSON.stringify({type: 'data', content: command + String.fromCharCode(13)}));
|
||||
webSocket.send(JSON.stringify({
|
||||
type: 'data',
|
||||
content: command + String.fromCharCode(13)
|
||||
}));
|
||||
}
|
||||
}
|
||||
executedCommand = true;
|
||||
@ -142,7 +145,7 @@ class Console extends Component {
|
||||
}
|
||||
|
||||
term.focus();
|
||||
if(webSocket.readyState === WebSocket.OPEN){
|
||||
if (webSocket.readyState === WebSocket.OPEN) {
|
||||
webSocket.send(JSON.stringify({type: 'resize', content: JSON.stringify({height, width})}));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user