diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index ab816c944..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 } @@ -1683,6 +1685,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 +1743,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)