mirror of https://github.com/jumpserver/jumpserver
fix(webterminal): test
parent
b1f0297e82
commit
0e7a8c1a62
|
@ -5,9 +5,19 @@ var rowHeight = 1;
|
|||
var colWidth = 1;
|
||||
function WSSHClient() {
|
||||
}
|
||||
WSSHClient.prototype._generateEndpoint = function (options) {
|
||||
console.log(options);
|
||||
if (window.location.protocol == 'https:') {
|
||||
var protocol = 'wss://';
|
||||
} else {
|
||||
var protocol = 'ws://';
|
||||
}
|
||||
|
||||
var endpoint = protocol + window.location.host + ':8080' + '/terminal';
|
||||
return endpoint;
|
||||
};
|
||||
WSSHClient.prototype.connect = function (options) {
|
||||
var endpoint = '{{ web_terminal_url }}';
|
||||
var endpoint = this._generateEndpoint(options);
|
||||
|
||||
if (window.WebSocket) {
|
||||
this._connection = new WebSocket(endpoint);
|
||||
|
@ -83,8 +93,7 @@ var rowHeight = 1;
|
|||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
};
|
||||
var options = {};
|
||||
|
||||
$('#ssh').show();
|
||||
var term_client = openTerminal(options);
|
||||
|
|
Loading…
Reference in New Issue