Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod list api default order by names #373

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
backend: pod list api default order by names
  • Loading branch information
wilhelmguo committed Mar 22, 2019
commit 8a601bf017d8b50506bbf02e6a9324e74acac3ca
4 changes: 2 additions & 2 deletions src/backend/resources/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ func pageResult(relatePod []*v1.Pod, q *common.QueryParam) *common.Page {
}

sort.Slice(commonObjs, func(i, j int) bool {
return commonObjs[j].GetProperty(dataselector.CreationTimestampProperty).
Compare(commonObjs[i].GetProperty(dataselector.CreationTimestampProperty)) == -1
return commonObjs[j].GetProperty(dataselector.NameProperty).
Compare(commonObjs[i].GetProperty(dataselector.NameProperty)) == -1
})

return dataselector.DataSelectPage(commonObjs, q)
Expand Down