Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #874 from connorsmith256/feat/add-friendly-name
Browse files Browse the repository at this point in the history
feat: add friendly name to host table output
  • Loading branch information
connorsmith256 authored Oct 13, 2023
2 parents 2b0c1a8 + c418ccd commit 208e4d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ctl/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ pub(crate) fn hosts_table(hosts: Vec<Host>) -> String {
table.add_row(Row::new(vec![
TableCell::new_with_alignment("Host ID", 1, Alignment::Left),
TableCell::new_with_alignment("Uptime (seconds)", 1, Alignment::Left),
TableCell::new_with_alignment("Friendly name", 1, Alignment::Left),
]));
hosts.iter().for_each(|h| {
table.add_row(Row::new(vec![
TableCell::new_with_alignment(h.id.clone(), 1, Alignment::Left),
TableCell::new_with_alignment(format!("{}", h.uptime_seconds), 1, Alignment::Left),
TableCell::new_with_alignment(h.friendly_name.clone(), 1, Alignment::Left),
]))
});

Expand Down

0 comments on commit 208e4d1

Please sign in to comment.