1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

New virual machine icon, MeshCtrl.js fixes.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-16 13:18:45 -07:00
parent 901bb6529e
commit 882c79ce16
11 changed files with 85 additions and 33 deletions

View file

@ -213,7 +213,8 @@ if (args['_'].length == 0) {
console.log(" MeshCtrl ListDevices");
console.log(" MeshCtrl ListDevices -id [groupid] --json");
console.log("\r\nOptional arguments:\r\n");
console.log(" --id [groupid] - Filter by device group identifier.");
console.log(" --id [groupid] - Filter by group identifier (or --group).");
console.log(" --group [groupname] - Filter by group name (or --id).");
console.log(" --count - Only return the device count.");
console.log(" --json - Show result as JSON.");
break;
@ -565,7 +566,9 @@ function serverConnect() {
case 'listdevicegroups': { ws.send(JSON.stringify({ action: 'meshes' })); break; }
case 'listusersofdevicegroup': { ws.send(JSON.stringify({ action: 'meshes' })); break; }
case 'listdevices': {
if (args.id) {
if (args.group) {
ws.send(JSON.stringify({ action: 'nodes', meshname: args.group, responseid: 'meshctrl' })); break;
} else if (args.id) {
ws.send(JSON.stringify({ action: 'nodes', meshid: args.id, responseid: 'meshctrl' })); break;
} else {
ws.send(JSON.stringify({ action: 'meshes' }));