Browse Source

opt

tags/V1.22.3.1^2
lewis 3 years ago
parent
commit
1bf77bd88d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      routers/repo/cloudbrain.go

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

@@ -339,6 +339,8 @@ func CloudBrainBenchMarkShow(ctx *context.Context) {
if benchmarkTypes == nil {
if err := json.Unmarshal([]byte(setting.BenchmarkTypes), &benchmarkTypes); err != nil {
log.Error("json.Unmarshal BenchmarkTypes(%s) failed:%v", setting.BenchmarkTypes, err, ctx.Data["MsgID"])
ctx.ServerError(err.Error(), err)
return
}
}
cloudBrainShow(ctx, tplCloudBrainBenchmarkShow)
@@ -408,7 +410,6 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName) {
for _, benchmarkType := range benchmarkTypes.BenchmarkType {
if task.BenchmarkTypeID == benchmarkType.Id {
ctx.Data["BenchmarkTypeName"] = benchmarkType.First
ctx.Data["RankLink"] = benchmarkType.RankLink
for _, benchmarkChildType := range benchmarkType.Second {
if task.BenchmarkChildTypeID == benchmarkChildType.Id {
ctx.Data["BenchmarkChildTypeName"] = benchmarkChildType.Value


Loading…
Cancel
Save