From 935ff5438aaecd6b2102cd8d10d71c12650fe031 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 17 Jan 2022 17:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E4=B8=8B=E8=BD=BD=E7=BB=93=E6=9E=9C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/cloudbrain.go | 7 ++++++- templates/repo/cloudbrain/benchmark/index.tmpl | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 153d43697..21e0c62e8 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -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) { diff --git a/templates/repo/cloudbrain/benchmark/index.tmpl b/templates/repo/cloudbrain/benchmark/index.tmpl index 9c531bd80..bc6bf65a5 100644 --- a/templates/repo/cloudbrain/benchmark/index.tmpl +++ b/templates/repo/cloudbrain/benchmark/index.tmpl @@ -174,7 +174,15 @@ - {{end}} {{template "base/paginate" .}} + {{end}} + +
+ + 目标检测算法排行榜 + +
+ + {{template "base/paginate" .}}