From 5c367724b68746fb3d0467dd6f3fa4820192324f Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Wed, 13 Jul 2022 16:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/modelarts.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 797afef64..931bc2879 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -2049,6 +2049,13 @@ func InferenceJobIndex(ctx *context.Context) { page = 1 } + listType := ctx.Query("listType") + ctx.Data["ListType"] = listType + + if listType == models.AllResource { + listType = "" + } + var jobTypes []string jobTypes = append(jobTypes, string(models.JobTypeInference)) tasks, count, err := models.Cloudbrains(&models.CloudbrainsOptions{ @@ -2056,9 +2063,10 @@ func InferenceJobIndex(ctx *context.Context) { Page: page, PageSize: setting.UI.IssuePagingNum, }, - RepoID: repo.ID, - Type: ctx.QueryInt("type"), - JobTypes: jobTypes, + RepoID: repo.ID, + ComputeResource: listType, + JobTypes: jobTypes, + Type: models.TypeCloudBrainAll, }) if err != nil { ctx.ServerError("Cloudbrain", err)