Skip to content

Commit

Permalink
Fix missing menu name (#241)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Sep 7, 2023
1 parent 5c15111 commit cab7e0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/menu/gallery_menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ func RenderGalleryMenu(kc client.Client, in *rsapi.Menu, opts *rsapi.RenderMenuR

for _, ref := range ed.Spec.Variants {
cp := mi
cp.Name = ref.Title
if len(ed.Spec.Variants) > 1 && ref.Title == "" {
return nil, fmt.Errorf("resource editor for %+v and variant %s is missing title", ed.Spec.Resource.GroupKind(), ref.Name)
}
if ref.Title != "" {
cp.Name = ref.Title
}
// cp.Path = u.String()
cp.Preset = ref.Name
if len(ref.Icons) > 0 {
Expand Down

0 comments on commit cab7e0d

Please sign in to comment.