重写ssh前端组件,通用化
This commit is contained in:
parent
202d1b52e5
commit
743255d5c5
@ -117,7 +117,15 @@ export class SSHConnectionStrategy extends BaseConnectionStrategy {
|
|||||||
*/
|
*/
|
||||||
sendInput(data: string): void {
|
sendInput(data: string): void {
|
||||||
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
||||||
this.ws.send(data);
|
this.ws.send(JSON.stringify({
|
||||||
|
type: 'input',
|
||||||
|
data: {
|
||||||
|
request: {
|
||||||
|
type: 'input',
|
||||||
|
command: data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user