diff --git a/src/commands/snapshots.rs b/src/commands/snapshots.rs index 41483b5..0ead111 100644 --- a/src/commands/snapshots.rs +++ b/src/commands/snapshots.rs @@ -18,19 +18,19 @@ pub(super) fn execute(be: &impl DecryptReadBackend, _opts: Opts) -> Result<()> { .map(|sn| { let paths = sn.paths.into_iter().map(|p| p + "\n").collect::(); let time = sn.time.format("%Y-%m-%d %H:%M:%S"); + let nodes = sn + .node_count + .map(|c| c.to_string()) + .unwrap_or("?".to_string()); let size = sn .size .map(|b| ByteSize(b).to_string_as(true)) .unwrap_or("?".to_string()); - let files = sn - .file_count - .map(|c| c.to_string()) - .unwrap_or("?".to_string()); - row![sn.id, time, sn.hostname, "", paths, r->files, r->size] + row![sn.id, time, sn.hostname, "", paths, r->nodes, r->size] }) .collect(); table.set_titles( - row![b->"ID", b->"Time", b->"Host", b->"Tags", b->"Paths", br->"Files", br->"Size"], + row![b->"ID", b->"Time", b->"Host", b->"Tags", b->"Paths", br->"Nodes", br->"Size"], ); table.set_format(*format::consts::FORMAT_NO_BORDER_LINE_SEPARATOR); table.printstd(); diff --git a/src/repo/snapshot.rs b/src/repo/snapshot.rs index 476361f..3756ddb 100644 --- a/src/repo/snapshot.rs +++ b/src/repo/snapshot.rs @@ -20,7 +20,7 @@ pub struct SnapshotFile { pub gid: u32, #[serde(default)] pub tags: TagList, - pub file_count: Option, + pub node_count: Option, pub size: Option, #[serde(skip)] @@ -36,7 +36,7 @@ impl SnapshotFile { uid: u32, gid: u32, tags: TagList, - file_count: Option, + node_count: Option, size: Option, ) -> Self { Self { @@ -48,7 +48,7 @@ impl SnapshotFile { uid, gid, tags, - file_count, + node_count, size, id: Id::default(), }