Skip to content

Commit

Permalink
feat(cdk): hub list should include release date
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoBorai committed Oct 2, 2024
1 parent 134b057 commit f72d62a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/fluvio-hub-util/src/cmd/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ mod output {
use fluvio_extension_common::Terminal;
use fluvio_extension_common::output::TableOutputHandler;
use fluvio_extension_common::t_println;
use crate::PackageMeta;

use crate::{PackageMeta, PackageMetaExt};

#[derive(Serialize)]
struct ListConnectors(Vec<PackageMeta>);
Expand Down Expand Up @@ -78,7 +79,7 @@ mod output {
impl TableOutputHandler for ListConnectors {
/// table header implementation
fn header(&self) -> Row {
Row::from(["CONNECTOR", "Visibility"])
Row::from(["Connector", "Visibility", "Released"])
}

/// return errors in string format
Expand All @@ -94,6 +95,13 @@ mod output {
Row::from([
Cell::new(e.pkg_name()).set_alignment(CellAlignment::Left),
Cell::new(&e.visibility).set_alignment(CellAlignment::Left),
Cell::new(
e.published_at()
.map(|date| {
date.format("%Y-%m-%d %H:%M:%S").to_string()
})
.unwrap_or(String::from("N/A")),
),
])
})
.collect()
Expand Down

0 comments on commit f72d62a

Please sign in to comment.