feat: update

parent ac55d7bf
...@@ -113,19 +113,7 @@ export class CleftbarComponent implements OnInit { ...@@ -113,19 +113,7 @@ export class CleftbarComponent implements OnInit {
content: '<select id="selectuser">' + options + '</select>', content: '<select id="selectuser">' + options + '</select>',
yes: function (index, layero) { yes: function (index, layero) {
userid = jQuery('#selectuser').val(); userid = jQuery('#selectuser').val();
if (host.plantform === 'Linux') { that.login(host, userid);
jQuery('app-ssh').show();
jQuery('app-rdp').hide();
that._term.TerminalConnect(host, userid);
} else if (host.plantform === 'Windows') {
jQuery('app-ssh').hide();
jQuery('app-rdp').show();
that._rdp.Connect(host, userid);
} else {
jQuery('app-ssh').show();
jQuery('app-rdp').hide();
that._term.TerminalConnect(host, userid);
}
layer.close(index); layer.close(index);
}, },
btn2: function (index, layero) { btn2: function (index, layero) {
...@@ -137,22 +125,26 @@ export class CleftbarComponent implements OnInit { ...@@ -137,22 +125,26 @@ export class CleftbarComponent implements OnInit {
}); });
} else if (host.system_users_granted.length === 1) { } else if (host.system_users_granted.length === 1) {
userid = host.system_users_granted[0].id; userid = host.system_users_granted[0].id;
if (userid === '') { this.login(host, userid);
return; }
} }
if (host.plantform === 'Linux') {
jQuery('app-ssh').show(); login(host, userid) {
jQuery('app-rdp').hide(); if (userid === '') {
this._term.TerminalConnect(host, userid); return;
} else if (host.plantform === 'Windows') { }
jQuery('app-ssh').hide(); if (host.plantform === 'Linux') {
jQuery('app-rdp').show(); jQuery('app-ssh').show();
this._rdp.Connect(host, userid); jQuery('app-rdp').hide();
} else { this._term.TerminalConnect(host, userid);
jQuery('app-ssh').show(); } else if (host.plantform === 'Windows') {
jQuery('app-rdp').hide(); jQuery('app-ssh').hide();
this._term.TerminalConnect(host, userid); jQuery('app-rdp').show();
} this._rdp.Connect(host, userid);
} else {
jQuery('app-ssh').show();
jQuery('app-rdp').hide();
this._term.TerminalConnect(host, userid);
} }
} }
......
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