Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1876 Reviewed-by: lewis <747342561@qq.com>tags/v1.22.4.1^2
| @@ -435,15 +435,29 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo | |||||
| return | return | ||||
| } | } | ||||
| if cloudbrain.ResourceSpecs == nil { | |||||
| json.Unmarshal([]byte(setting.ResourceSpecs), &cloudbrain.ResourceSpecs) | |||||
| } | |||||
| for _, tmp := range cloudbrain.ResourceSpecs.ResourceSpec { | |||||
| if tmp.Id == task.ResourceSpecId { | |||||
| ctx.Data["GpuNum"] = tmp.GpuNum | |||||
| ctx.Data["CpuNum"] = tmp.CpuNum | |||||
| ctx.Data["MemMiB"] = tmp.MemMiB | |||||
| ctx.Data["ShareMemMiB"] = tmp.ShareMemMiB | |||||
| if task.JobType == string(models.JobTypeTrain) { | |||||
| if cloudbrain.TrainResourceSpecs == nil { | |||||
| json.Unmarshal([]byte(setting.TrainResourceSpecs), &cloudbrain.TrainResourceSpecs) | |||||
| } | |||||
| for _, tmp := range cloudbrain.TrainResourceSpecs.ResourceSpec { | |||||
| if tmp.Id == task.ResourceSpecId { | |||||
| ctx.Data["GpuNum"] = tmp.GpuNum | |||||
| ctx.Data["CpuNum"] = tmp.CpuNum | |||||
| ctx.Data["MemMiB"] = tmp.MemMiB | |||||
| ctx.Data["ShareMemMiB"] = tmp.ShareMemMiB | |||||
| } | |||||
| } | |||||
| } else { | |||||
| if cloudbrain.ResourceSpecs == nil { | |||||
| json.Unmarshal([]byte(setting.ResourceSpecs), &cloudbrain.ResourceSpecs) | |||||
| } | |||||
| for _, tmp := range cloudbrain.ResourceSpecs.ResourceSpec { | |||||
| if tmp.Id == task.ResourceSpecId { | |||||
| ctx.Data["GpuNum"] = tmp.GpuNum | |||||
| ctx.Data["CpuNum"] = tmp.CpuNum | |||||
| ctx.Data["MemMiB"] = tmp.MemMiB | |||||
| ctx.Data["ShareMemMiB"] = tmp.ShareMemMiB | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -286,7 +286,7 @@ td, th { | |||||
| <td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
| <div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
| {{$.resource_spec}} | |||||
| {{$.i18n.Tr "cloudbrain.gpu_num"}}:{{$.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{$.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{$.MemMiB}},{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{$.ShareMemMiB}} | |||||
| </div> | </div> | ||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| @@ -299,7 +299,7 @@ td, th { | |||||
| <tbody class="ti-text-form"> | <tbody class="ti-text-form"> | ||||
| <tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
| <td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
| 镜像 | |||||
| {{$.i18n.Tr "cloudbrain.mirror"}} | |||||
| </td> | </td> | ||||
| <td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
| @@ -207,7 +207,7 @@ td, th { | |||||
| <div class="active title padding0"> | <div class="active title padding0"> | ||||
| <div class="according-panel-heading"> | <div class="according-panel-heading"> | ||||
| <div class="accordion-panel-title"> | <div class="accordion-panel-title"> | ||||
| <i class="dropdown icon"></i> | |||||
| <!-- <i class="dropdown icon"></i> --> | |||||
| <span class="accordion-panel-title-content"> | <span class="accordion-panel-title-content"> | ||||
| <span> | <span> | ||||
| <div class="ac-display-inblock title_text acc-margin-bottom"> | <div class="ac-display-inblock title_text acc-margin-bottom"> | ||||
| @@ -369,7 +369,7 @@ td, th { | |||||
| </tr> | </tr> | ||||
| <tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
| <td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
| {{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
| {{$.i18n.Tr "repo.cloudbrain.time.starttime"}} | |||||
| </td> | </td> | ||||
| <td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||