Browse Source

show failed job

tags/v1.21.12.1
lewis 4 years ago
parent
commit
4219800d10
3 changed files with 8 additions and 6 deletions
  1. +6
    -6
      routers/repo/modelarts.go
  2. +1
    -0
      templates/repo/modelarts/notebook/index.tmpl
  3. +1
    -0
      templates/repo/modelarts/trainjob/index.tmpl

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

@@ -357,14 +357,14 @@ func NotebookShow(ctx *context.Context) {
task, err := models.GetCloudbrainByJobID(jobID)
if err != nil {
ctx.Data["error"] = err.Error()
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil)
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil)
return
}

result, err := modelarts.GetJob(jobID)
if err != nil {
ctx.Data["error"] = err.Error()
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil)
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil)
return
}

@@ -373,7 +373,7 @@ func NotebookShow(ctx *context.Context) {
err = models.UpdateJob(task)
if err != nil {
ctx.Data["error"] = err.Error()
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil)
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil)
return
}

@@ -838,21 +838,21 @@ func TrainJobShow(ctx *context.Context) {
task, err := models.GetCloudbrainByJobID(jobID)
if err != nil {
log.Error("GetCloudbrainByJobID(%s) failed:%v", jobID, err.Error())
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil)
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil)
return
}

attach, err := models.GetAttachmentByUUID(task.Uuid)
if err != nil {
log.Error("GetAttachmentByUUID(%s) failed:%v", jobID, err.Error())
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil)
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil)
return
}

result, err := modelarts.GetTrainJob(jobID, strconv.FormatInt(task.VersionID, 10))
if err != nil {
log.Error("GetJob(%s) failed:%v", jobID, err.Error())
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil)
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil)
return
}



+ 1
- 0
templates/repo/modelarts/notebook/index.tmpl View File

@@ -200,6 +200,7 @@
{{template "repo/header" .}}
<!-- 列表容器 -->
<div class="ui container">
{{template "base/alert" .}}

<!-- 中间云脑和新建任务按钮 -->


+ 1
- 0
templates/repo/modelarts/trainjob/index.tmpl View File

@@ -200,6 +200,7 @@
{{template "repo/header" .}}
<!-- 列表容器 -->
<div class="ui container">
{{template "base/alert" .}}

<!-- 中间云脑和新建任务按钮 -->
<!-- <div class="ui three column stack able grid">


Loading…
Cancel
Save