From b799ca409cfaf2c349ec7459b1ad607d667c8a05 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 24 Nov 2021 10:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= 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 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 1c7febdf1..692bc6a05 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -257,6 +257,30 @@ func DownloadMultiModelFile(ctx *context.Context) { } } +func QueryTrainJobVersionList(ctx *context.Context) { + log.Info("query train job version list. start.") + JobID := ctx.Query("JobID") + + VersionListTasks, count, err := models.CloudbrainsVersionList(&models.CloudbrainsOptions{ + ListOptions: models.ListOptions{ + Page: -1, + PageSize: -1, + }, + RepoID: -1, + Type: -1, + JobType: "", + JobID: JobID, + }) + + log.Info("query return count=" + fmt.Sprint(count)) + + if err != nil { + ctx.ServerError("QueryTrainJobList:", err) + } else { + ctx.JSON(200, VersionListTasks) + } +} + func QueryTrainJobList(ctx *context.Context) { log.Info("query train job list. start.") repoId := ctx.QueryInt64("repoId")