Commit 56223dd6 authored by liuzheng712's avatar liuzheng712

feat(update):

parent 834d6a81
...@@ -49,7 +49,7 @@ export class SshComponent implements OnInit { ...@@ -49,7 +49,7 @@ export class SshComponent implements OnInit {
} }
TerminalConnect(host, username) { TerminalConnect(host, username) {
const socket = io.connect(); const socket = io.connect('/ssh');
let cols = '80'; let cols = '80';
let rows = '24'; let rows = '24';
if (Cookie.get('cols')) { if (Cookie.get('cols')) {
...@@ -98,8 +98,7 @@ export class SshComponent implements OnInit { ...@@ -98,8 +98,7 @@ export class SshComponent implements OnInit {
NavList.List[id].Term.term.write('\x1b[31mWelcome to Jumpserver!\x1b[m\r\n'); NavList.List[id].Term.term.write('\x1b[31mWelcome to Jumpserver!\x1b[m\r\n');
socket.on('connect', function () { socket.on('connect', function () {
socket.emit('login', 'root'); socket.emit('host', {'uuid': host.uuid, 'user': username});
socket.emit('machine', host.uuid);
NavList.List[id].Term.term.on('data', function (data) { NavList.List[id].Term.term.on('data', function (data) {
socket.emit('data', data); socket.emit('data', data);
......
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