Browse Source

增加调试任务的信息

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.4.1^2
zouap 3 years ago
parent
commit
784c884d39
2 changed files with 10 additions and 3 deletions
  1. +9
    -2
      routers/repo/cloudbrain.go
  2. +1
    -1
      templates/repo/cloudbrain/show.tmpl

+ 9
- 2
routers/repo/cloudbrain.go View File

@@ -2,11 +2,9 @@ package repo


import ( import (
"bufio" "bufio"
"code.gitea.io/gitea/modules/timeutil"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/unknwon/i18n"
"io" "io"
"net/http" "net/http"
"os" "os"
@@ -16,6 +14,9 @@ import (
"strings" "strings"
"time" "time"


"code.gitea.io/gitea/modules/timeutil"
"github.com/unknwon/i18n"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base" "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["task"] = task
ctx.Data["jobName"] = task.JobName ctx.Data["jobName"] = task.JobName


+ 1
- 1
templates/repo/cloudbrain/show.tmpl View File

@@ -297,7 +297,7 @@ td, th {


<td class="ti-text-form-content"> <td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName"> <div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName">
{{.DatasetName}}
{{$.datasetname}}
</div> </div>
</td> </td>
</tr> </tr>


Loading…
Cancel
Save