Added Assistant as agent download.
Ylian Saint-Hilaire committed
May 17, 2021 at 21:41 UTC
e8a3ceb5587c1b5e23f4f63631db95622894132a
5 files changed
+13
-3
agents/MeshCentralAssistant.exe
Binary files a/agents/MeshCentralAssistant.exe and b/agents/MeshCentralAssistant.exe differ
meshcentral.js
+2
-1
@@ -2520,7 +2520,8 @@ function CreateMeshCentralServer(config, args) {
2520
41: { id: 41, localname: 'meshagent_aarch64-cortex-a53', rname: 'meshagent', desc: 'ARMADA/CORTEX-A53/MUSL (OpenWRT)', update: true, amt: false, platform: 'linux', core: 'linux-noamt', rcore: 'linux-recovery', arcore: 'linux-agentrecovery', tcore: 'linux-tiny' }, // OpenWRT Routers
2521
10003: { id: 3, localname: 'MeshService.exe', rname: 'meshagent.exe', desc: 'Win x86-32 service, unsigned', update: true, amt: true, platform: 'win32', core: 'windows-amt', rcore: 'linux-recovery', arcore: 'linux-agentrecovery', tcore: 'linux-tiny' }, // Unsigned version of the Windows MeshAgent x86
2522
10004: { id: 4, localname: 'MeshService64.exe', rname: 'meshagent.exe', desc: 'Win x86-64 service, unsigned', update: true, amt: true, platform: 'win32', core: 'windows-amt', rcore: 'linux-recovery', arcore: 'linux-agentrecovery', tcore: 'linux-tiny' }, // Unsigned version of the Windows MeshAgent x64
2523
- 10005: { id: 10005, localname: 'meshagent_osx-universal-64', rname: 'meshagent', desc: 'Apple macOS Universal Binary', update: true, amt: false, platform: 'osx', core: 'linux-noamt', rcore: 'linux-recovery', arcore: 'linux-agentrecovery', tcore: 'linux-tiny' } // Apple Silicon + x86 universal binary
2523
+ 10005: { id: 10005, localname: 'meshagent_osx-universal-64', rname: 'meshagent', desc: 'Apple macOS Universal Binary', update: true, amt: false, platform: 'osx', core: 'linux-noamt', rcore: 'linux-recovery', arcore: 'linux-agentrecovery', tcore: 'linux-tiny' }, // Apple Silicon + x86 universal binary
2524
+ 10006: { id: 10006, localname: 'MeshCentralAssistant.exe', rname: 'MeshCentralAssistant.exe', desc: 'MeshCentral Assistant for Windows', update: false, amt: false, platform: 'win32' } // MeshCentral Assistant
2525
};
2526
2527
// Update the list of available mesh agents
public/images/assistant.png
Binary files /dev/null and b/public/images/assistant.png differ
views/default.handlebars
+10
-1
@@ -4700,7 +4700,10 @@
4700
var mesh = meshes[meshid], x = '', installType = 0, moreoptions = '';
4701
4702
var opts = '<select id=aginsSelect onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Windows" + '</option><option value=1>' + "Linux / BSD" + '</option><option value=5>' + "Linux / BSD / macOS Binary Installer" + '</option><option value=2>' + "Apple macOS" + '</option>';
4703
- if ((features & 2) == 0) { opts += '<option value=6>' + "Mobile device" + '</option>'; } // Don't display mobile setup in LAN mode.
4703
+ if ((features & 2) == 0) { // Don't display mobile or assistant setup in LAN mode.
4704
+ opts += '<option value=6>' + "Mobile device" + '</option>';
4705
+ opts += '<option value=7>' + "MeshCentral Assistant" + '</option>';
4706
+ }
4707
opts += '<option value=3>' + "Windows (UnInstall)" + '</option><option value=4>' + "Linux / BSD (UnInstall)" + '</option></select>';
4708
x += addHtmlValue("Operating System", opts);
4709
@@ -4746,6 +4749,11 @@
4749
// QR code agent install
4750
x += '<div id=agins_qrcode style=display:none;min-height:180px><a id=agins_qrimage_a rel=\"noreferrer noopener\" target=_blank><div id=agins_qrimage style=float:right;margin-left:10px;width:180px;height:180px;cursor:pointer></div></a><div>' + format("To add a mobile device to group \"{0}\", download the MeshAgent application and scan this QR code.", EscapeHtml(mesh.name)) + "</div><div><a rel=\"noreferrer noopener\" target=_blank href=\"https://play.google.com/store/apps/details?id=com.meshcentral.agent2\"><img style=margin-top:20px;margin-left:5px;cursor:pointer width=40 height=40 src=\"images/android-40.png\" srcset=\"images/android-80.png 2x\" /></a></div></div>";
4751
4752
+ // MeshCentral Assistant
4753
+ x += '<div id=agins_assistant style=display:none><table><tr><td style=vertical-align:top><div>' + format("MeshCentral Assistant is a Windows system tray tool that users can use to ask for help. Use the link below to download a version that will connect to device group \"{0}\" when requested by the user.", EscapeHtml(mesh.name)) + '</div><div></div><br />';
4754
+ x += '<a onclick=downloadFile("meshagents?id=10006&meshid=' + meshid.split('/')[2] + (urlargs.key?('&key=' + urlargs.key):'') + '") title="' + "MeshCentral Assistant for Windows" + '">' + "Assistant for Windows (.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="' + "Copy URL to clipboard" + '" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=10006&meshid=' + meshid.split('/')[2] + (urlargs.key?('&key=' + urlargs.key):'') + '")>';
4755
+ x += '</td><td><img src=images/assistant.png></td></tr></table></div>';
4756
+
4757
// Windows agent uninstall
4758
x += '<div id=agins_windows_un style=display:none>' + "To remove a mesh agent, download the file below, run it and click \"uninstall\"." + '<br /><br />';
4759
x += addHtmlValue("Mesh Agent", '<a onclick=downloadFile("meshagents?id=3' + (urlargs.key?('&key=' + urlargs.key):'') + '",null,true) title="' + "32bit version of the MeshAgent" + '">' + "Windows (.exe)" + '</a>');
@@ -4811,6 +4819,7 @@
4819
QV('agins_linux_inst', v == 5);
4820
QV('aginsSysTypeDiv', v == 5);
4821
QV('agins_qrcode', v == 6);
4822
+ QV('agins_assistant', v == 7);
4823
Q('aginsbinlnk').onclick = function() { downloadFile((Q('aginsbinlnk').name.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value + (urlargs.key?('&key=' + urlargs.key):'') + '&meshinstall=' + Q('aginsSysType').value); };
4824
Q('aginsbincmd').value = (Q('aginsbincmd').value.split('&installflags=')[0]) + '&installflags=' + Q('aginsType').value + (urlargs.key?('&key=' + urlargs.key):'') + '&meshinstall=' + Q('aginsSysType').value + '\"';
4825
QV('aginsTypeDiv', (v == 0) || (v == 5));
webserver.js
+1
-1
@@ -4636,7 +4636,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
4636
if (domain.agentcustomization.servicename != null) { meshsettings += 'meshServiceName=' + domain.agentcustomization.servicename + '\r\n'; }
4637
if (domain.agentcustomization.filename != null) { meshsettings += 'fileName=' + domain.agentcustomization.filename + '\r\n'; }
4638
}
4639
- if (parent.agentTranslations != null) { meshsettings += 'translation=' + parent.agentTranslations + '\r\n'; }
4639
+ if ((parent.agentTranslations != null) && (req.query.id != '10006')) { meshsettings += 'translation=' + parent.agentTranslations + '\r\n'; }
4640
setContentDispositionHeader(res, 'application/octet-stream', meshfilename, null, argentInfo.rname);
4641
obj.parent.exeHandler.streamExeWithMeshPolicy({ platform: 'win32', sourceFileName: obj.parent.meshAgentBinaries[req.query.id].path, destinationStream: res, msh: meshsettings, peinfo: obj.parent.meshAgentBinaries[req.query.id].pe });
4642
return;