mirror of https://github.com/jumpserver/jumpserver
fix(webterminal): url bug
parent
94a4d68be2
commit
2bd3fdb4e7
|
@ -61,7 +61,7 @@ function openTerminal(options) {
|
||||||
var protocol = 'ws://';
|
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 sock = new WebSocket(endpoint);
|
||||||
//var client = new WSSHClient();
|
//var client = new WSSHClient();
|
||||||
var term = new Terminal({
|
var term = new Terminal({
|
||||||
|
@ -131,7 +131,7 @@ $(document).ready(function () {
|
||||||
var geom = resize();
|
var geom = resize();
|
||||||
console.log(geom);
|
console.log(geom);
|
||||||
term_client.term.resize(geom.cols, geom.rows);
|
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();
|
$('#ssh').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue