mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
New MeshAgents, much improved Linux terminal.
This commit is contained in:
parent
be59454ca3
commit
d6a1138205
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.4.8-m",
|
"version": "0.4.8-o",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
@ -73,7 +73,7 @@ var CreateAmtRemoteTerminal = function (divid, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
obj.xxStateChange = function (newstate) {
|
obj.xxStateChange = function (newstate) {
|
||||||
if ((newstate == 3) && (options != null) && (options.xterm == true)) { obj.TermSendKeys(' stty rows ' + obj.height + ' cols ' + obj.width + '\n clear\n'); }
|
//if ((newstate == 3) && (options != null) && (options.xterm == true)) { obj.TermSendKeys(' stty rows ' + obj.height + ' cols ' + obj.width + '\n clear\n'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.ProcessData = function (str) {
|
obj.ProcessData = function (str) {
|
||||||
|
@ -10434,6 +10434,13 @@
|
|||||||
"login.handlebars->container->column_l->centralTable->1->0->logincell->tokenpanel->1->7->1->4->1->1"
|
"login.handlebars->container->column_l->centralTable->1->0->logincell->tokenpanel->1->7->1->4->1->1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"en": "Login Shell",
|
||||||
|
"xloc": [
|
||||||
|
"default.handlebars->termShellContextMenuLinux->cxtermps",
|
||||||
|
"xterm.handlebars->termShellContextMenuLinux->cxtermps"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cs": "Neplatné přihlášení, zkontrolujte uživatelské jméno a heslo.",
|
"cs": "Neplatné přihlášení, zkontrolujte uživatelské jméno a heslo.",
|
||||||
"de": "Anmeldung fehlgeschlagen, Benutzername und Passwort prüfen.",
|
"de": "Anmeldung fehlgeschlagen, Benutzername und Passwort prüfen.",
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
<div id="termShellContextMenuLinux" class="contextMenu noselect" style="display:none;min-width:0px">
|
<div id="termShellContextMenuLinux" class="contextMenu noselect" style="display:none;min-width:0px">
|
||||||
<div id="cxtermnorm" class="cmtext" onclick="cmtermaction(1,event)"><b>Root Shell</b></div>
|
<div id="cxtermnorm" class="cmtext" onclick="cmtermaction(1,event)"><b>Root Shell</b></div>
|
||||||
<div id="cxtermps" class="cmtext" onclick="cmtermaction(8,event)">User Shell</div>
|
<div id="cxtermps" class="cmtext" onclick="cmtermaction(8,event)">User Shell</div>
|
||||||
|
<div id="cxtermps" class="cmtext" onclick="cmtermaction(100,event)">Login Shell</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="altPortContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
|
<div id="altPortContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
|
||||||
<div id="cxaltport" class="cmtext" onclick="cmaltportaction(1,event)"><b>Alternate Port</b></div>
|
<div id="cxaltport" class="cmtext" onclick="cmaltportaction(1,event)"><b>Alternate Port</b></div>
|
||||||
@ -4014,7 +4015,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cmtermaction(action) {
|
function cmtermaction(action) {
|
||||||
connectTerminal(null, 1, { protocol: action });
|
if (action < 100) {
|
||||||
|
connectTerminal(null, 1, { protocol: action });
|
||||||
|
} else if (action == 100) {
|
||||||
|
connectTerminal(null, 1, { protocol: 1, requireLogin: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cmaltportaction(action) {
|
function cmaltportaction(action) {
|
||||||
@ -6343,6 +6348,7 @@
|
|||||||
} else {
|
} else {
|
||||||
// Setup a mesh agent terminal
|
// Setup a mesh agent terminal
|
||||||
var termoptions = { protocol: ((options != null) && (typeof options.protocol == 'number'))?options.protocol:1 };
|
var termoptions = { protocol: ((options != null) && (typeof options.protocol == 'number'))?options.protocol:1 };
|
||||||
|
if (options && options.requireLogin) { termoptions.requireLogin = true; }
|
||||||
if ([1, 2, 3, 4, 21, 22].indexOf(currentNode.agent.id) == -1) {
|
if ([1, 2, 3, 4, 21, 22].indexOf(currentNode.agent.id) == -1) {
|
||||||
if (Q('termSizeList').value == 2) { termoptions.width = 100; termoptions.height = 30; termoptions.xterm = true; }
|
if (Q('termSizeList').value == 2) { termoptions.width = 100; termoptions.height = 30; termoptions.xterm = true; }
|
||||||
if (Q('termSizeList').value == 3) {
|
if (Q('termSizeList').value == 3) {
|
||||||
@ -6363,6 +6369,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
terminal = CreateAgentRedirect(meshserver, CreateAmtRemoteTerminal('Term', termoptions), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
|
terminal = CreateAgentRedirect(meshserver, CreateAmtRemoteTerminal('Term', termoptions), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
|
||||||
|
terminal.options = termoptions;
|
||||||
terminal.debugmode = debugmode;
|
terminal.debugmode = debugmode;
|
||||||
terminal.m.debugmode = debugmode;
|
terminal.m.debugmode = debugmode;
|
||||||
terminal.m.onTitleChange = function (sender, title) { QH('termtitle', ' - ' + EscapeHtml(title)); }
|
terminal.m.onTitleChange = function (sender, title) { QH('termtitle', ' - ' + EscapeHtml(title)); }
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<div id="termShellContextMenuLinux" class="contextMenu noselect" style="display:none;min-width:0px">
|
<div id="termShellContextMenuLinux" class="contextMenu noselect" style="display:none;min-width:0px">
|
||||||
<div id="cxtermnorm" class="cmtext" onclick="cmtermaction(1,event)"><b>Root Shell</b></div>
|
<div id="cxtermnorm" class="cmtext" onclick="cmtermaction(1,event)"><b>Root Shell</b></div>
|
||||||
<div id="cxtermps" class="cmtext" onclick="cmtermaction(8,event)">User Shell</div>
|
<div id="cxtermps" class="cmtext" onclick="cmtermaction(8,event)">User Shell</div>
|
||||||
|
<div id="cxtermps" class="cmtext" onclick="cmtermaction(100,event)">Login Shell</div>
|
||||||
</div>
|
</div>
|
||||||
<div id=p11 class="noselect" style="overflow:hidden">
|
<div id=p11 class="noselect" style="overflow:hidden">
|
||||||
<div id=deskarea0 style="position:relative">
|
<div id=deskarea0 style="position:relative">
|
||||||
@ -161,11 +162,12 @@
|
|||||||
if (resizeTimer) clearTimeout(resizeTimer);
|
if (resizeTimer) clearTimeout(resizeTimer);
|
||||||
resizeTimer = setTimeout(sendResize, 200);
|
resizeTimer = setTimeout(sendResize, 200);
|
||||||
});
|
});
|
||||||
term.setOption('convertEol', true); // Consider \n to be \r\n, this should be taken care of by "termios"
|
//term.setOption('convertEol', true); // Consider \n to be \r\n, this should be taken care of by "termios"
|
||||||
|
|
||||||
// Setup a terminal tunnel to the agent
|
// Setup a terminal tunnel to the agent
|
||||||
tunnel = CreateAgentRedirect(meshserver, CreateRemoteTunnel(tunnelUpdate, options), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
|
tunnel = CreateAgentRedirect(meshserver, CreateRemoteTunnel(tunnelUpdate, options), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
|
||||||
tunnel.options = { cols: term.cols, rows: term.rows };
|
tunnel.options = { cols: term.cols, rows: term.rows };
|
||||||
|
if (options && options.requireLogin) { tunnel.options.requireLogin = true; }
|
||||||
tunnel.Start(args.nodeid);
|
tunnel.Start(args.nodeid);
|
||||||
tunnel.onStateChanged = onTunnelStateChange;
|
tunnel.onStateChanged = onTunnelStateChange;
|
||||||
tunnel.onConsoleMessageChange = function (server, msg) { setConsoleMsg(msg); };
|
tunnel.onConsoleMessageChange = function (server, msg) { setConsoleMsg(msg); };
|
||||||
@ -245,9 +247,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cmtermaction(action) {
|
function cmtermaction(action) {
|
||||||
//console.log('cmtermaction', action);
|
if (action < 100) {
|
||||||
connectButton({ protocol: action })
|
connectButton({ protocol: action })
|
||||||
//connectTerminal(null, 1, { protocol: action });
|
} else if (action == 100) {
|
||||||
|
connectButton({ protocol: 1, requireLogin: true })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideContextMenu() {
|
function hideContextMenu() {
|
||||||
|
Loading…
Reference in New Issue
Block a user