Skip to content

Commit

Permalink
fix(obcluster): sort results of listing obcluster
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Mar 27, 2024
1 parent edb051b commit 4519f6c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/dashboard/business/oceanbase/obcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ func ListOBClusters(ctx context.Context) ([]response.OBClusterOverview, error) {
if err != nil {
return obclusters, errors.Wrap(err, "failed to list obclusters")
}
sort.Slice(obclusterList.Items, func(i, j int) bool {
return obclusterList.Items[i].Name < obclusterList.Items[j].Name
})
for _, obcluster := range obclusterList.Items {
resp, err := buildOBClusterOverview(ctx, &obcluster)
if err != nil {
Expand Down

0 comments on commit 4519f6c

Please sign in to comment.