Added agent tag in meshctrl.js device info, #3935

This commit is contained in:
Ylian Saint-Hilaire 2022-05-05 16:49:00 -07:00
parent 5869782bdf
commit 1eb1195c7a
1 changed files with 5 additions and 0 deletions

View File

@ -2526,6 +2526,8 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) {
if (lastconnect != null) { node.lastconnect = lastconnect.time; node.lastaddr = lastconnect.addr; }
if (args.raw) { console.log(JSON.stringify(sysinfo, ' ', 2)); return; }
console.log(node);
// General
var output = {}, outputCount = 0;
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
}
}
if ((node.agent != null) && (node.agent.tag != null)) {
output["Tag"] = node.agent.tag; outputCount++;
}
if (outputCount > 0) { info["Mesh Agent"] = output; }
}