From 8a601bf017d8b50506bbf02e6a9324e74acac3ca Mon Sep 17 00:00:00 2001 From: wilhelmguo Date: Fri, 22 Mar 2019 11:48:42 +0800 Subject: [PATCH] backend: pod list api default order by names --- src/backend/resources/pod/pod.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/resources/pod/pod.go b/src/backend/resources/pod/pod.go index 426bdf199..32854c33a 100644 --- a/src/backend/resources/pod/pod.go +++ b/src/backend/resources/pod/pod.go @@ -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)