mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
fix: sort containers by name and backup uploads by time (#13770)
This commit is contained in:
@@ -159,6 +159,10 @@ func (f *FileService) SearchUploadWithPage(req request.SearchUploadWithPage) (in
|
||||
})
|
||||
}
|
||||
|
||||
sort.SliceStable(files, func(i, j int) bool {
|
||||
return files[i].CreatedAt > files[j].CreatedAt
|
||||
})
|
||||
|
||||
total, start, end := len(files), (req.Page-1)*req.PageSize, req.Page*req.PageSize
|
||||
if start > total {
|
||||
backData = make([]response.UploadInfo, 0)
|
||||
|
||||
@@ -530,8 +530,8 @@ const paginationConfig = reactive({
|
||||
pageSize: Number(localStorage.getItem('container-page-size')) || 20,
|
||||
total: 0,
|
||||
state: 'all',
|
||||
orderBy: 'createdAt',
|
||||
order: 'null',
|
||||
orderBy: 'name',
|
||||
order: 'ascending',
|
||||
});
|
||||
const searchName = ref();
|
||||
const dialogUpgradeRef = ref();
|
||||
|
||||
Reference in New Issue
Block a user