| @@ -102,7 +102,7 @@ type Cloudbrain struct { | |||||
| UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` | UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` | ||||
| Duration int64 | Duration int64 | ||||
| TrainJobDuration string | TrainJobDuration string | ||||
| Image string //GPU镜像名称 | |||||
| Image string //镜像名称 | |||||
| GpuQueue string //GPU类型即GPU队列 | GpuQueue string //GPU类型即GPU队列 | ||||
| ResourceSpecId int //GPU规格id | ResourceSpecId int //GPU规格id | ||||
| DeletedAt time.Time `xorm:"deleted"` | DeletedAt time.Time `xorm:"deleted"` | ||||
| @@ -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.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.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["task"] = task | ||||
| ctx.Data["jobID"] = jobID | ctx.Data["jobID"] = jobID | ||||
| ctx.Data["jobName"] = task.JobName | ctx.Data["jobName"] = task.JobName | ||||
| @@ -23,22 +23,11 @@ | |||||
| <div> | <div> | ||||
| <div class="ui yellow segment"> | <div class="ui yellow segment"> | ||||
| {{with .task}} | {{with .task}} | ||||
| <table class="ui celled striped table"> | |||||
| <tbody> | |||||
| <tr> | |||||
| <td class="four wide"> 任务名称 </td> | |||||
| <td>{{.JobName}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 镜像名称 </td> | |||||
| <td>{{.Image}}</td> | |||||
| </tr> | |||||
| </tbody> | |||||
| </table> | |||||
| <p>任务名称: {{.JobName}}</p> | |||||
| {{end}} | {{end}} | ||||
| </div> | </div> | ||||
| <div class="ui green segment"> | <div class="ui green segment"> | ||||
| <p>任务结果:</p> | |||||
| <p>任务详情:</p> | |||||
| {{with .result}} | {{with .result}} | ||||
| <table class="ui celled striped table"> | <table class="ui celled striped table"> | ||||
| <tbody> | <tbody> | ||||
| @@ -46,6 +35,14 @@ | |||||
| <td class="four wide"> 状态 </td> | <td class="four wide"> 状态 </td> | ||||
| <td> {{.Status}} </td> | <td> {{.Status}} </td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td> 镜像名称 </td> | |||||
| <td>{{$.task.Image}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 数据集下载地址 </td> | |||||
| <td>{{$.datasetDownloadLink}}</td> | |||||
| </tr> | |||||
| <tr> | <tr> | ||||
| <td> 开始时间 </td> | <td> 开始时间 </td> | ||||
| <td>{{.CreateTime}}</td> | <td>{{.CreateTime}}</td> | ||||