diff --git a/models/cloudbrain.go b/models/cloudbrain.go index 4c8763c80..00c88494c 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -102,7 +102,7 @@ type Cloudbrain struct { UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` Duration int64 TrainJobDuration string - Image string //GPU镜像名称 + Image string //镜像名称 GpuQueue string //GPU类型即GPU队列 ResourceSpecId int //GPU规格id DeletedAt time.Time `xorm:"deleted"` diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 35b6c2d15..b21d633bd 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -254,10 +254,17 @@ func NotebookShow(ctx *context.Context) { result.CreateTime = time.Unix(int64(result.CreateAt/1000), 0).Format("2006-01-02 15:04:05") result.LatestUpdateTime = time.Unix(int64(result.UpdateAt/1000), 0).Format("2006-01-02 15:04:05") - //result.QueuingInfo.BeginTime = time.Unix(int64(result.QueuingInfo.BeginTimestamp/1000), 0).Format("2006-01-02 15:04:05") - //result.QueuingInfo.EndTime = time.Unix(int64(result.QueuingInfo.EndTimestamp/1000), 0).Format("2006-01-02 15:04:05") } + var datasetDownloadLink string + if task.Uuid != "" && task.UserID == ctx.User.ID { + attachment, err := models.GetAttachmentByUUID(task.Uuid) + if err == nil { + datasetDownloadLink = attachment.S3DownloadURL() + } + } + + ctx.Data["datasetDownloadLink"] = datasetDownloadLink ctx.Data["task"] = task ctx.Data["jobID"] = jobID ctx.Data["jobName"] = task.JobName diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index 20a821e5c..37dfa398b 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -23,22 +23,11 @@
{{with .task}} - - - - - - - - - - - -
任务名称 {{.JobName}}
镜像名称 {{.Image}}
+

任务名称: {{.JobName}}

{{end}}
-

任务结果:

+

任务详情:

{{with .result}} @@ -46,6 +35,14 @@ + + + + + + + +
状态 {{.Status}}
镜像名称 {{$.task.Image}}
数据集下载地址 {{$.datasetDownloadLink}}
开始时间 {{.CreateTime}}