Skip to content

Commit 70730ab

Browse files
committed
feat(halpi): show device_id in status output
The device unique ID is already exposed by halpid at /values/device_id, but the halpi CLI had no way to display it. Add it to the version block of `halpi status` so it sits alongside hardware_version and firmware_version. Widen the value column from 15 to 16 chars to fit the 16-char hex ID without misaligning the rest of the table.
1 parent 97017ce commit 70730ab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

halpi/src/commands/status.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ fn print_status_table(values: &HashMap<String, Value>) {
3131
&get_value_str(values, "firmware_version"),
3232
"",
3333
);
34+
print_row("device_id", &get_value_str(values, "device_id"), "");
3435
println!();
3536

3637
// State and outputs
@@ -93,9 +94,9 @@ fn print_status_table(values: &HashMap<String, Value>) {
9394
/// Print a formatted table row
9495
fn print_row(key: &str, value: &str, unit: &str) {
9596
if unit.is_empty() {
96-
println!("{:<24} {:>15}", key, value);
97+
println!("{:<24} {:>16}", key, value);
9798
} else {
98-
println!("{:<24} {:>15} {}", key, value, unit);
99+
println!("{:<24} {:>16} {}", key, value, unit);
99100
}
100101
}
101102

0 commit comments

Comments
 (0)