From 1a3b0ad9b67392f739c4e6460e9b9b546e3de98b Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 7 Apr 2022 15:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9B=B4=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/cloudbrain.go | 9 --------- templates/repo/cloudbrain/show.tmpl | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 516b25576..2848b8e19 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -447,15 +447,6 @@ 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 76927c7f1..781c66d67 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -335,7 +335,7 @@ td, th {
- {{$.gpu_type}} + {{$.resource_type}}