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

Ylian Saint-Hilaire committed May 5, 2022 at 16:49 UTC 1eb1195c7aef84b7bff9d1423c12fb4ab86d6036
1 file changed +5
meshctrl.js
+5
@@ -2526,6 +2526,8 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) {
2526 if (lastconnect != null) { node.lastconnect = lastconnect.time; node.lastaddr = lastconnect.addr; }
2527 if (args.raw) { console.log(JSON.stringify(sysinfo, ' ', 2)); return; }
2528
2529 + console.log(node);
2530 +
2531 // General
2532 var output = {}, outputCount = 0;
2533 if (node.name) { output["Server Name"] = node.name; outputCount++; }
@@ -2588,6 +2590,9 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) {
2590 output["Last agent address"] = splitip[0]; outputCount++; // IPv4
2591 }
2592 }
2593 + if ((node.agent != null) && (node.agent.tag != null)) {
2594 + output["Tag"] = node.agent.tag; outputCount++;
2595 + }
2596 if (outputCount > 0) { info["Mesh Agent"] = output; }
2597 }
2598