Skip to content

Commit 5da5a48

Browse files
authored
Improve node list console command format (#1434)
Signed-off-by: Chris Jackson <[email protected]>
1 parent ab65181 commit 5da5a48

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

com.zsmartsystems.zigbee.console/src/main/java/com/zsmartsystems/zigbee/console/ZigBeeConsoleNodeListCommand.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStr
6060
}
6161

6262
Collections.sort(nodeIds);
63-
String tableHeader = String.format("%-7s %-4s %-16s %-12s %-9s %-3s %-25s %-25s %-15s %-15s",
63+
String tableHeader = String.format("%-7s %-4s %-16s %-12s %-10s %-3s %-25s %-35s %-20s %-15s",
6464
"Network", "Addr", "IEEE Address", "Logical Type", "State", "EP", "Profile", "Device Type",
6565
"Manufacturer", "Model");
6666

@@ -73,9 +73,9 @@ public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStr
7373
}
7474

7575
private void printNode(ZigBeeNode node, PrintStream out) {
76-
String nodeInfo = String.format("%7d %04X %-16s %-12s %-9s", node.getNetworkAddress(),
76+
String nodeInfo = String.format("%7d %04X %-16s %-12s %-10s", node.getNetworkAddress(),
7777
node.getNetworkAddress(), node.getIeeeAddress(), node.getLogicalType(), node.getNodeState());
78-
String nodeInfoPadding = String.format("%7s %4s %16s %12s %9s", "", "", "", "", "");
78+
String nodeInfoPadding = String.format("%7s %4s %16s %12s %10s", "", "", "", "", "");
7979

8080
List<ZigBeeEndpoint> endpoints = new ArrayList<>(node.getEndpoints());
8181
Collections.sort(endpoints, (ep1, ep2) -> ep1.getEndpointId() - ep2.getEndpointId());
@@ -98,7 +98,7 @@ private void printNode(ZigBeeNode node, PrintStream out) {
9898
.toString();
9999
}
100100
boolean showManufacturerAndModel = endpoint.getParentNode().getNetworkAddress() != 0;
101-
String endpointInfo = String.format("%3d %-25s %-25s %-15s %-15s", endpoint.getEndpointId(),
101+
String endpointInfo = String.format("%3d %-25s %-35s %-20s %-15s", endpoint.getEndpointId(),
102102
profileType, deviceType, showManufacturerAndModel ? getManufacturer(endpoint) : "",
103103
showManufacturerAndModel ? getModel(endpoint) : "");
104104

0 commit comments

Comments
 (0)