use crate::{
nns::topology::report::NnsTopologySummaryReport,
table::{ColumnAlign, render_table},
};
pub(super) fn render_count_table(report: &NnsTopologySummaryReport) -> String {
let headers = ["METRIC", "COUNT"];
let rows = [
["subnets".to_string(), report.subnet_count.to_string()],
[
"routing_ranges".to_string(),
report.routing_range_count.to_string(),
],
["nodes".to_string(), report.node_count.to_string()],
[
"node_operators".to_string(),
report.node_operator_count.to_string(),
],
[
"node_providers".to_string(),
report.node_provider_count.to_string(),
],
[
"data_centers".to_string(),
report.data_center_count.to_string(),
],
];
let alignments = [ColumnAlign::Left, ColumnAlign::Right];
render_table(&headers, &rows, &alignments)
}