mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-14 12:01:52 +00:00
Added agent tag in meshctrl.js device info, #3935
This commit is contained in:
parent
5869782bdf
commit
1eb1195c7a
1 changed files with 5 additions and 0 deletions
|
@ -2526,6 +2526,8 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) {
|
||||||
if (lastconnect != null) { node.lastconnect = lastconnect.time; node.lastaddr = lastconnect.addr; }
|
if (lastconnect != null) { node.lastconnect = lastconnect.time; node.lastaddr = lastconnect.addr; }
|
||||||
if (args.raw) { console.log(JSON.stringify(sysinfo, ' ', 2)); return; }
|
if (args.raw) { console.log(JSON.stringify(sysinfo, ' ', 2)); return; }
|
||||||
|
|
||||||
|
console.log(node);
|
||||||
|
|
||||||
// General
|
// General
|
||||||
var output = {}, outputCount = 0;
|
var output = {}, outputCount = 0;
|
||||||
if (node.name) { output["Server Name"] = node.name; outputCount++; }
|
if (node.name) { output["Server Name"] = node.name; outputCount++; }
|
||||||
|
@ -2588,6 +2590,9 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) {
|
||||||
output["Last agent address"] = splitip[0]; outputCount++; // IPv4
|
output["Last agent address"] = splitip[0]; outputCount++; // IPv4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((node.agent != null) && (node.agent.tag != null)) {
|
||||||
|
output["Tag"] = node.agent.tag; outputCount++;
|
||||||
|
}
|
||||||
if (outputCount > 0) { info["Mesh Agent"] = output; }
|
if (outputCount > 0) { info["Mesh Agent"] = output; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue