Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.1.3
zouap 3 years ago
parent
commit
591742cc5a
2 changed files with 8 additions and 7 deletions
  1. +7
    -6
      routers/repo/cloudbrain.go
  2. +1
    -1
      templates/repo/cloudbrain/benchmark/index.tmpl

+ 7
- 6
routers/repo/cloudbrain.go View File

@@ -643,8 +643,13 @@ func CloudBrainDownloadModel(ctx *context.Context) {
}

func GetRate(ctx *context.Context) {
var jobID = ctx.Params(":jobid")
isObjectDetcionAll := ctx.QueryBool("isObjectDetcionAll")
if isObjectDetcionAll {
ctx.Redirect(setting.BenchmarkServerHost + "?username=admin")
return
}

var jobID = ctx.Params(":jobid")
job, err := models.GetCloudbrainByJobID(jobID)
if err != nil {
ctx.ServerError("GetCloudbrainByJobID failed", err)
@@ -653,11 +658,7 @@ func GetRate(ctx *context.Context) {

if job.JobType == string(models.JobTypeBenchmark) {
log.Info("url=" + setting.BenchmarkServerHost + "?username=" + ctx.User.Name)
if isObjectDetcionAll {
ctx.Redirect(setting.BenchmarkServerHost + "?username=admin")
} else {
ctx.Redirect(setting.BenchmarkServerHost + "?username=" + ctx.User.Name)
}
ctx.Redirect(setting.BenchmarkServerHost + "?username=" + ctx.User.Name)
} else if job.JobType == string(models.JobTypeSnn4imagenet) {
ctx.Redirect(setting.Snn4imagenetServerHost)
} else if job.JobType == string(models.JobTypeBrainScore) {


+ 1
- 1
templates/repo/cloudbrain/benchmark/index.tmpl View File

@@ -177,7 +177,7 @@
{{end}}

<div class="bgtask-content-header">
<a class="ui basic blue" href="{{$.RepoLink}}/cloudbrain/{{.JobID}}/rate?isObjectDetcionAll=true" target="_blank"> 目标检测算法排行榜
<a class="ui basic blue" href="{{$.RepoLink}}/cloudbrain/123/rate?isObjectDetcionAll=true" target="_blank"> 目标检测算法排行榜
</a>
</div>



Loading…
Cancel
Save