Skip to content

Commit

Permalink
checking
Browse files Browse the repository at this point in the history
  • Loading branch information
binaek committed Sep 20, 2023
1 parent c1d3dd3 commit 3b3b055
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/control/controlexecute/result_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand All @@ -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 {
Expand Down

0 comments on commit 3b3b055

Please sign in to comment.