diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 898f3844f..33ce5debb 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -2,11 +2,9 @@ package repo import ( "bufio" - "code.gitea.io/gitea/modules/timeutil" "encoding/json" "errors" "fmt" - "github.com/unknwon/i18n" "io" "net/http" "os" @@ -16,6 +14,9 @@ import ( "strings" "time" + "code.gitea.io/gitea/modules/timeutil" + "github.com/unknwon/i18n" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" @@ -510,6 +511,12 @@ 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/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 082393ad0..54e721b08 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -297,7 +297,7 @@ td, th {