From 41569b669268ba23bc933aed865a93dcd8d747be Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Nov 2021 16:52:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index cb9b15a8c..86cab3d5d 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -277,7 +277,6 @@ func QueryTrainJobList(ctx *context.Context) { repoId := ctx.QueryInt64("repoId") VersionListTasks, count, err := models.QueryModelTrainJobList(repoId) - log.Info("query return count=" + fmt.Sprint(count)) if err != nil { @@ -393,13 +392,10 @@ func ShowModelPageInfo(ctx *context.Context) { return } - pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - ctx.Data["PageIsCloudBrain"] = true - ctx.Data["Tasks"] = modelResult - - ctx.HTML(200, tplModelManageIndex) + mapInterface := make(map[string]interface{}) + mapInterface["data"] = modelResult + mapInterface["count"] = count + ctx.JSON(http.StatusOK, mapInterface) } func ModifyModel(id string, description string) error {