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,6 +125,11 @@ export class CleftbarComponent implements OnInit { ...@@ -137,6 +125,11 @@ 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;
this.login(host, userid);
}
}
login(host, userid) {
if (userid === '') { if (userid === '') {
return; return;
} }
...@@ -154,7 +147,6 @@ export class CleftbarComponent implements OnInit { ...@@ -154,7 +147,6 @@ export class CleftbarComponent implements OnInit {
this._term.TerminalConnect(host, userid); this._term.TerminalConnect(host, userid);
} }
} }
}
Search(q) { Search(q) {
this._search.Search(q); this._search.Search(q);
......
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