From 425a0b71b9f3320e31c7a92a8883471daf808198 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Sat, 7 May 2022 15:30:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/cloudbrain.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index ab816c944..bc9a61161 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -1683,6 +1683,13 @@ func CloudBrainBenchmarkIndex(ctx *context.Context) { } else if ciTasks[i].JobType == string(models.JobTypeSnn4imagenet) || ciTasks[i].JobType == string(models.JobTypeBrainScore) { ciTasks[i].BenchmarkType = ctx.Tr("cloudbrain.benchmark.model") ciTasks[i].BenchmarkTypeName = ciTasks[i].JobType + + if ciTasks[i].JobType == string(models.JobTypeSnn4imagenet) { + ciTasks[i].BenchmarkTypeRankLink = setting.Snn4imagenetServerHost + } else { + ciTasks[i].BenchmarkTypeRankLink = setting.BrainScoreServerHost + } + } ciTasks[i].BenchmarkTypeName = "" if task.BenchmarkTypeID > 0 { @@ -1734,6 +1741,7 @@ func CloudBrainBenchmarkNew(ctx *context.Context) { ctx.Data["description"] = "" ctx.Data["benchmarkTypeID"] = -1 ctx.Data["benchmark_child_types_id_hidden"] = -1 + ctx.Data["type"] = ctx.Query("type") err := cloudBrainNewDataPrepare(ctx) if err != nil { ctx.ServerError("get new cloudbrain info failed", err) From a5104fd01057af3a2c58e48dc98a12b010742ec1 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Sat, 7 May 2022 15:44:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/cloudbrain.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index bc9a61161..a4f1165e3 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -188,6 +188,8 @@ func cloudBrainNewDataPrepare(ctx *context.Context) error { ctx.Data["cloudbraintype"] = models.TypeCloudBrainOne + ctx.Data["benchmarkType"] = ctx.Query("benchmarkType") + return nil }