Skip to content

Commit

Permalink
fix: sort extensions in the UI schematic generator
Browse files Browse the repository at this point in the history
In the UI, sort extensions alphabetically, so it doesn't matter which
order you click the checkboxes.

Fixes #99

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Apr 5, 2024
1 parent c2de13f commit ae1f0a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/frontend/http/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ func (f *Frontend) handleUISchematics(ctx context.Context, w http.ResponseWriter
extensions = append(extensions, name[4:])
}

slices.Sort(extensions)

overlayData := r.PostForm.Get("overlay")

overlayName, overlayImage, _ := strings.Cut(overlayData, "@")
Expand Down

0 comments on commit ae1f0a3

Please sign in to comment.