Browse Source

用户分析报告下载结果修正

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

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

@@ -644,6 +644,7 @@ func CloudBrainDownloadModel(ctx *context.Context) {

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

if job.JobType == string(models.JobTypeBenchmark) {
log.Info("url=" + setting.BenchmarkServerHost + "?username=" + ctx.User.Name)
ctx.Redirect(setting.BenchmarkServerHost + "?username=" + ctx.User.Name)
if isObjectDetcionAll {
ctx.Redirect(setting.BenchmarkServerHost + "?username=admin")
} else {
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) {


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

@@ -174,7 +174,15 @@
</div>
</div>
</div>
{{end}} {{template "base/paginate" .}}
{{end}}

<div>
<a class="ui basic blue button" href="{{$.RepoLink}}/cloudbrain/{{.JobID}}/rate" target="_blank">
目标检测算法排行榜
</a>
</div>

{{template "base/paginate" .}}
</div>

</div>


Loading…
Cancel
Save