From e6051ac328c2f7c117054e76d66d9c3371e4bc14 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 9 Dec 2021 16:06:18 +0800 Subject: [PATCH] fix issue --- routers/repo/ai_model_manage.go | 6 +- templates/repo/modelmanage/index.tmpl | 82 +----------------------- templates/repo/modelmanage/showinfo.tmpl | 59 +++++------------ web_src/js/components/Model.vue | 10 +-- web_src/js/index.js | 8 ++- web_src/less/openi.less | 13 ++++ 6 files changed, 49 insertions(+), 129 deletions(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 5103c2a5e..32cb5b2cf 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -474,12 +474,16 @@ func ShowModelPageInfo(ctx *context.Context) { if page <= 0 { page = 1 } + pageSize := ctx.QueryInt("pageSize") + if pageSize <= 0 { + pageSize = setting.UI.IssuePagingNum + } repoId := ctx.Repo.Repository.ID Type := -1 modelResult, count, err := models.QueryModel(&models.AiModelQueryOptions{ ListOptions: models.ListOptions{ Page: page, - PageSize: setting.UI.IssuePagingNum, + PageSize: pageSize, }, RepoID: repoId, Type: Type, diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index c260d1f37..e7180081e 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -1,20 +1,5 @@ {{template "base/head" .}} -
@@ -34,7 +19,7 @@
{{template "base/alert" .}} -
+