Skip to content

Commit

Permalink
bugfix/nanocl: table title output
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s committed Oct 5, 2023
1 parent 88b0aad commit 17eeaf2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions bin/nanocl/src/models/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,10 @@ pub struct CargoRow {
/// Config version of the cargo
pub(crate) version: String,
/// When the cargo was created
#[tabled(rename = "CREATED AT")]
pub(crate) created_at: String,
/// When the cargo was last updated
#[tabled(rename = "CREATED AT")]
pub(crate) updated_at: String,
}

Expand Down
4 changes: 2 additions & 2 deletions bin/nanocl/src/models/cargo_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub struct CargoImageRow {
/// Image ID
pub(crate) id: String,
/// Repository name
pub(crate) repositories: String,
pub(crate) repository: String,
/// Tag name
pub(crate) tag: String,
/// Size of the image
Expand Down Expand Up @@ -169,7 +169,7 @@ impl From<ImageSummary> for CargoImageRow {

Self {
id,
repositories: vals.first().unwrap_or(&"<none>").to_string(),
repository: vals.first().unwrap_or(&"<none>").to_string(),
tag: vals.get(1).unwrap_or(&"<none>").to_string(),
size: convert_size(value.size),
created_at: created,
Expand Down
5 changes: 3 additions & 2 deletions bin/nanocl/src/models/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ pub struct ProcessRow {
/// IP address of the cargo or the vm
ip: String,
/// When the cargo or the vm was created
created: String,
#[tabled(rename = "CREATED AT")]
created_at: String,
}

/// Convert NodeContainerSummary to ProcessRow
Expand Down Expand Up @@ -170,7 +171,7 @@ impl From<NodeContainerSummary> for ProcessRow {
image: container.image.unwrap_or_default(),
status: container.status.unwrap_or_default(),
ip: ipaddr,
created: format!("{created_at}"),
created_at: format!("{created_at}"),

Check warning on line 174 in bin/nanocl/src/models/system.rs

View check run for this annotation

Codecov / codecov/patch

bin/nanocl/src/models/system.rs#L174

Added line #L174 was not covered by tests
}
}
}

0 comments on commit 17eeaf2

Please sign in to comment.