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

Commit

Permalink
fix(app): display deployed version in app list
Browse files Browse the repository at this point in the history
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
  • Loading branch information
brooksmtownsend committed Sep 14, 2023
1 parent 3351e0a commit 70785b5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,27 @@ pub(crate) fn list_models_table(models: Vec<ModelSummary>) -> String {
table.add_row(Row::new(vec![
TableCell::new_with_alignment("Name", 1, Alignment::Left),
TableCell::new_with_alignment("Latest Version", 1, Alignment::Left),
TableCell::new_with_alignment("Description", 1, Alignment::Left),
TableCell::new_with_alignment("Deployed Version", 1, Alignment::Left),
TableCell::new_with_alignment("Deploy Status", 1, Alignment::Right),
TableCell::new_with_alignment("Description", 1, Alignment::Left),
]));
models.iter().for_each(|m| {
table.add_row(Row::new(vec![
TableCell::new_with_alignment(m.name.clone(), 1, Alignment::Left),
TableCell::new_with_alignment(m.version.clone(), 1, Alignment::Left),
TableCell::new_with_alignment(
m.description.clone().unwrap_or_else(|| "N/A".to_string()),
m.deployed_version
.clone()
.unwrap_or_else(|| "N/A".to_string()),
1,
Alignment::Left,
),
TableCell::new_with_alignment(format!("{:?}", m.status), 1, Alignment::Right),
TableCell::new_with_alignment(
m.description.clone().unwrap_or_else(|| "N/A".to_string()),
1,
Alignment::Left,
),
]))
});

Expand Down

0 comments on commit 70785b5

Please sign in to comment.