From 3b3b055d4100ccf4495deeb3baa4b729a120d714 Mon Sep 17 00:00:00 2001 From: Binaek Sarkar Date: Wed, 20 Sep 2023 17:42:24 +0530 Subject: [PATCH] checking --- pkg/control/controlexecute/result_group.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/control/controlexecute/result_group.go b/pkg/control/controlexecute/result_group.go index 1d0682c5a8..7b5262e359 100644 --- a/pkg/control/controlexecute/result_group.go +++ b/pkg/control/controlexecute/result_group.go @@ -68,6 +68,12 @@ func NewGroupSummary() *GroupSummary { // NewRootResultGroup creates a ResultGroup to act as the root node of a control execution tree func NewRootResultGroup(ctx context.Context, executionTree *ExecutionTree, rootItems ...modconfig.ModTreeItem) *ResultGroup { + title := "" + if len(rootItems) == 1 { + // there's only one - use that title + title = rootItems[0].GetTitle() + } + root := &ResultGroup{ GroupId: RootResultGroupName, Groups: []*ResultGroup{}, @@ -76,7 +82,7 @@ func NewRootResultGroup(ctx context.Context, executionTree *ExecutionTree, rootI Severity: make(map[string]controlstatus.StatusSummary), updateLock: new(sync.Mutex), NodeType: modconfig.BlockTypeBenchmark, - Title: "", + Title: title, } for _, rootItem := range rootItems {