Commit 2bd3fdb4 authored by liuzheng712's avatar liuzheng712

fix(webterminal): url bug

parent 94a4d68b
......@@ -61,7 +61,7 @@ function openTerminal(options) {
var protocol = 'ws://';
}
var endpoint = protocol + document.URL.match(RegExp('//(.*?)/'))[1] + '/ws/terminal' + document.URL.match(/(\?.*)/);
var endpoint = protocol + document.URL.match(RegExp('//(.*?)/'))[1] + '/ws/terminal' + document.URL.match(/(\?.*)/)[1];
var sock = new WebSocket(endpoint);
//var client = new WSSHClient();
var term = new Terminal({
......@@ -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(JSON.stringify({'data':{'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