Skip to content

Commit

Permalink
Merge pull request #373 from wilhelmguo/feature/pod_list_default_orde…
Browse files Browse the repository at this point in the history
…r_names

Pod list api default order by names
  • Loading branch information
wilhelmguo authored Mar 22, 2019
2 parents dca8bda + 8a601bf commit e3ae291
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit e3ae291

Please sign in to comment.