|
|
|
@@ -438,7 +438,9 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo |
|
|
|
if cloudbrain.ResourceSpecs == nil { |
|
|
|
json.Unmarshal([]byte(setting.ResourceSpecs), &cloudbrain.ResourceSpecs) |
|
|
|
} |
|
|
|
|
|
|
|
for _, tmp := range cloudbrain.ResourceSpecs.ResourceSpec { |
|
|
|
log.Info("tmp.id=" + fmt.Sprint(tmp.Id) + " task.ResourceSpecId=" + fmt.Sprint(task.ResourceSpecId)) |
|
|
|
if tmp.Id == task.ResourceSpecId { |
|
|
|
ctx.Data["GpuNum"] = tmp.GpuNum |
|
|
|
ctx.Data["CpuNum"] = tmp.CpuNum |
|
|
|
|