|
|
|
@@ -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 |
|
|
|
|