Commit 94a4d68b authored by liuzheng712's avatar liuzheng712

fix(webterminal.js): send bug

parent b879e724
......@@ -72,7 +72,7 @@ function openTerminal(options) {
});
term.open();
term.on('data', function (data) {
sock.send(data)
sock.send(JSON.stringify({'data': data}))
});
$('.terminal').detach().appendTo('#term');
term.resize(80, 24);
......@@ -131,7 +131,7 @@ $(document).ready(function () {
var geom = resize();
console.log(geom);
term_client.term.resize(geom.cols, geom.rows);
term_client.client.send({'resize': {'rows': geom.rows, 'cols': geom.cols}});
term_client.client.send(JSON.stringify({'data':{'resize': {'rows': geom.rows, 'cols': geom.cols}}}));
$('#ssh').show();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment