diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 10497d720..cb16a6b0d 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -429,6 +429,15 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo } } + if gpuInfos == nil { + json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos) + } + for _, tmp := range gpuInfos.GpuInfo { + if tmp.Queue == task.GpuQueue { + ctx.Data["gpu_type"] = tmp.Value + } + } + if result != nil { jobRes, _ := models.ConvertToJobResultPayload(result.Payload) jobRes.Resource.Memory = strings.ReplaceAll(jobRes.Resource.Memory, "Mi", "MB") diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index fb8e04996..76927c7f1 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -330,12 +330,12 @@ td, th { - {{$.i18n.Tr "repo.cloudbrain.platform"}} + {{$.i18n.Tr "cloudbrain.gpu_type"}}
- {{$.result.Platform}} + {{$.gpu_type}}