diff --git a/pkg/output/tables/compliance.go b/pkg/output/tables/compliance.go index 5fa44ea..c935e73 100644 --- a/pkg/output/tables/compliance.go +++ b/pkg/output/tables/compliance.go @@ -91,10 +91,14 @@ func PrintBenchmarksTable(rows [][]string) { style.Width(40) case col == 2: style.Width(10) + case col == 3: + style.Width(10) + case col == 4: + style.Width(10) } return style }). - Headers("BENCHMARK ID", "BENCHMARK TITLE", "# OF PRIMARY TABLES"). + Headers("BENCHMARK ID", "BENCHMARK TITLE", "# OF CONTROLS", "# OF PRIMARY TABLES", "CONNECTORS"). Rows(rows...) fmt.Println(t) diff --git a/pkg/types/benchmarks.go b/pkg/types/benchmarks.go index 877f269..079ce24 100644 --- a/pkg/types/benchmarks.go +++ b/pkg/types/benchmarks.go @@ -6,6 +6,8 @@ type Metadata struct { ID string `json:"id"` Title string `json:"title"` Description string `json:"description"` + Connectors []string `json:"connectors"` + NumberOfControls int `json:"number_of_controls"` Enabled bool `json:"enabled"` TrackDriftEvents bool `json:"track_drift_events"` PrimaryTables []string `json:"primary_tables"` diff --git a/pkg/utils/table_rows.go b/pkg/utils/table_rows.go index bcecc9d..4370879 100644 --- a/pkg/utils/table_rows.go +++ b/pkg/utils/table_rows.go @@ -3,6 +3,7 @@ package utils import ( "encoding/json" "strconv" + "strings" "github.com/adorigi/opengovernance/pkg/types" ) @@ -33,7 +34,9 @@ func GenerateBenchmarkRows(benchmarks []types.BenchMark) [][]string { row := []string{ benchmark.Metadata.ID, benchmark.Metadata.Title, + strconv.Itoa(benchmark.Metadata.NumberOfControls), strconv.Itoa(len(benchmark.Metadata.PrimaryTables)), + strings.Join(benchmark.Metadata.Connectors, ","), } rows = append(rows, row) }