mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(logger): export limit (#17825)
This commit is contained in:
@@ -573,6 +573,12 @@ func ListItems(manager IModelManager, ctx context.Context, userCred mcclient.Tok
|
||||
pagingOrderStr, _ := query.GetString("paging_order")
|
||||
pagingOrder := sqlchemy.QueryOrderType(strings.ToUpper(pagingOrderStr))
|
||||
|
||||
// export data only
|
||||
exportLimit, err := query.Int("export_limit")
|
||||
if query.Contains("export_keys") && err == nil {
|
||||
limit = exportLimit
|
||||
}
|
||||
|
||||
var (
|
||||
q *sqlchemy.SQuery
|
||||
useRawQuery bool
|
||||
@@ -703,12 +709,6 @@ func ListItems(manager IModelManager, ctx context.Context, userCred mcclient.Tok
|
||||
limit = maxLimit
|
||||
}
|
||||
|
||||
// export data only
|
||||
exportLimit, err := query.Int("export_limit")
|
||||
if query.Contains("export_keys") && err == nil {
|
||||
limit = exportLimit
|
||||
}
|
||||
|
||||
// orders defined in pagingConf should have the highest priority
|
||||
if pagingConf != nil {
|
||||
for _, f := range pagingConf.MarkerFields {
|
||||
|
||||
Reference in New Issue
Block a user