fix: sort containers by name and backup uploads by time (#13770)

This commit is contained in:
ssongliu
2026-09-09 16:58:53 +08:00
committed by GitHub
parent 7c1ddb5b4c
commit 033cc7c2d1
2 changed files with 6 additions and 2 deletions

View File

@@ -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)

View File

@@ -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();