From e2845a506af88d2e8e6e27db64eb0df5f1925ca0 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 28 Jun 2022 10:59:21 +0800 Subject: [PATCH] show dataset name --- modules/cloudbrain/cloudbrain.go | 1 + routers/repo/cloudbrain.go | 6 ------ templates/repo/cloudbrain/benchmark/show.tmpl | 2 +- templates/repo/cloudbrain/show.tmpl | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/cloudbrain/cloudbrain.go b/modules/cloudbrain/cloudbrain.go index 7d7d4a286..67f2aaf67 100755 --- a/modules/cloudbrain/cloudbrain.go +++ b/modules/cloudbrain/cloudbrain.go @@ -504,6 +504,7 @@ func RestartTask(ctx *context.Context, task *models.Cloudbrain, newID *string) e JobType: task.JobType, Type: task.Type, Uuid: task.Uuid, + DatasetName: task.DatasetName, Image: task.Image, GpuQueue: task.GpuQueue, ResourceSpecId: task.ResourceSpecId, diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 597069aba..f9d45bcad 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -605,12 +605,6 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo } } - attachment, err := models.GetAttachmentByUUID(task.Uuid) - if err == nil { - ctx.Data["datasetname"] = attachment.Name - } else { - ctx.Data["datasetname"] = "" - } ctx.Data["task"] = task ctx.Data["jobName"] = task.JobName diff --git a/templates/repo/cloudbrain/benchmark/show.tmpl b/templates/repo/cloudbrain/benchmark/show.tmpl index c79f6f268..59ce3c471 100755 --- a/templates/repo/cloudbrain/benchmark/show.tmpl +++ b/templates/repo/cloudbrain/benchmark/show.tmpl @@ -474,7 +474,7 @@