mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added support for meshctrl --details, #2933
This commit is contained in:
parent
e9e24e13dc
commit
821464ae08
2 changed files with 75 additions and 2 deletions
10
meshctrl.js
10
meshctrl.js
|
@ -380,6 +380,7 @@ if (args['_'].length == 0) {
|
|||
console.log(" --json - Show result as JSON.");
|
||||
console.log(" --csv - Show result as comma seperated values.");
|
||||
console.log(" --filterid [id,id...] - Show only results for devices with included id.");
|
||||
console.log(" --details - Show all device details.");
|
||||
break;
|
||||
}
|
||||
case 'listusersofdevicegroup': {
|
||||
|
@ -1110,7 +1111,10 @@ function serverConnect() {
|
|||
case 'listdevicegroups': { ws.send(JSON.stringify({ action: 'meshes', responseid: 'meshctrl' })); break; }
|
||||
case 'listusersofdevicegroup': { ws.send(JSON.stringify({ action: 'meshes', responseid: 'meshctrl' })); break; }
|
||||
case 'listdevices': {
|
||||
if (args.group) {
|
||||
if (args.details) {
|
||||
// Get list of devices with lots of details
|
||||
ws.send(JSON.stringify({ action: 'getDeviceDetails', type: (args.csv)?'csv':'json' }));
|
||||
} else if (args.group) {
|
||||
ws.send(JSON.stringify({ action: 'nodes', meshname: args.group, responseid: 'meshctrl' }));
|
||||
} else if (args.id) {
|
||||
ws.send(JSON.stringify({ action: 'nodes', meshid: args.id, responseid: 'meshctrl' }));
|
||||
|
@ -2038,6 +2042,10 @@ function serverConnect() {
|
|||
process.exit();
|
||||
break;
|
||||
}
|
||||
case 'getDeviceDetails': {
|
||||
console.log(data.data);
|
||||
process.exit();
|
||||
}
|
||||
default: { break; }
|
||||
}
|
||||
//console.log('Data', data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue