diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 0d007a27d..6a94943a0 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -438,7 +438,9 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo if cloudbrain.ResourceSpecs == nil { json.Unmarshal([]byte(setting.ResourceSpecs), &cloudbrain.ResourceSpecs) } + for _, tmp := range cloudbrain.ResourceSpecs.ResourceSpec { + log.Info("tmp.id=" + fmt.Sprint(tmp.Id) + " task.ResourceSpecId=" + fmt.Sprint(task.ResourceSpecId)) if tmp.Id == task.ResourceSpecId { ctx.Data["GpuNum"] = tmp.GpuNum ctx.Data["CpuNum"] = tmp.CpuNum