Browse Source

Merge pull request 'opt for download link' (#1545) from opt-notebook into V20220228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1545
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
pull/1546/head
ychao_1983 3 years ago
parent
commit
2e4ed5cdba
3 changed files with 7 additions and 2 deletions
  1. +1
    -0
      modules/modelarts/modelarts.go
  2. +2
    -2
      routers/repo/modelarts.go
  3. +4
    -0
      templates/repo/modelarts/notebook/show.tmpl

+ 1
- 0
modules/modelarts/modelarts.go View File

@@ -307,6 +307,7 @@ func GenerateNotebook2(ctx *context.Context, jobName, uuid, description, flavor,
Uuid: uuid,
ComputeResource: models.NPUResource,
Image: imageName,
Description: description,
})

if err != nil {


+ 2
- 2
routers/repo/modelarts.go View File

@@ -256,7 +256,7 @@ func NotebookShow(ctx *context.Context) {
result.LatestUpdateTime = time.Unix(int64(result.UpdateAt/1000), 0).Format("2006-01-02 15:04:05")
}

var datasetDownloadLink string
datasetDownloadLink := "-"
if ctx.IsSigned {
if task.Uuid != "" && task.UserID == ctx.User.ID {
attachment, err := models.GetAttachmentByUUID(task.Uuid)
@@ -265,7 +265,7 @@ func NotebookShow(ctx *context.Context) {
}
}
}
ctx.Data["datasetDownloadLink"] = datasetDownloadLink
ctx.Data["task"] = task
ctx.Data["jobID"] = jobID


+ 4
- 0
templates/repo/modelarts/notebook/show.tmpl View File

@@ -36,6 +36,10 @@
<td> {{.Status}} </td>
</tr>
<tr>
<td> 描述 </td>
<td style="max-width: 480px; word-wrap:break-word">{{$.task.Description}}</td>
</tr>
<tr>
<td> 镜像名称 </td>
<td>{{$.task.Image}}</td>
</tr>


Loading…
Cancel
Save