Skip to content

Commit

Permalink
Add rule display name to profile status table
Browse files Browse the repository at this point in the history
Also, remove the rule ID from this view to make more room.

Ref #4251
  • Loading branch information
eleftherias committed Aug 28, 2024
1 parent 345b8e8 commit 01f0696
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cli/app/profile/table_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ func RenderRuleEvaluationStatusTable(
) {
for _, eval := range statuses {
t.AddRowWithColor(
layouts.NoColor(eval.RuleId),
layouts.NoColor(eval.RuleDescriptionName),
layouts.NoColor(eval.RuleDisplayName),
layouts.NoColor(eval.Entity),
common.GetEvalStatusColor(eval.Status),
common.GetRemediateStatusColor(eval.RemediationStatus),
Expand Down
1 change: 1 addition & 0 deletions internal/controlplane/handlers_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ func (s *Server) getRuleEvalStatus(
RuleName: dbRuleEvalStat.RuleTypeName,
RuleTypeName: dbRuleEvalStat.RuleTypeName,
RuleDescriptionName: dbRuleEvalStat.RuleName,
RuleDisplayName: dbRuleEvalStat.RuleTypeDisplayName,
Entity: string(dbRuleEvalStat.EntityType),
Status: string(dbRuleEvalStat.EvalStatus),
Details: dbRuleEvalStat.EvalDetails,
Expand Down
2 changes: 1 addition & 1 deletion internal/util/cli/table/simple/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func profileStatusLayout(table *tablewriter.Table) {
func ruleEvaluationsLayout(table *tablewriter.Table) {
defaultLayout(table)
table.SetHeader([]string{
"Rule Type ID", "Rule Name", "Entity", "Status", "Remediation", "Entity Info"})
"Rule Name", "Display Name", "Entity", "Status", "Remediation", "Entity Info"})
table.SetAutoMergeCellsByColumnIndex([]int{0})
// This is needed for the rule definition and rule parameters
table.SetAutoWrapText(true)
Expand Down

0 comments on commit 01f0696

Please sign in to comment.