Browse Source

提交更新。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1835/head
zouap 3 years ago
parent
commit
90ea5dc8d2
2 changed files with 11 additions and 2 deletions
  1. +9
    -0
      routers/repo/cloudbrain.go
  2. +2
    -2
      templates/repo/cloudbrain/show.tmpl

+ 9
- 0
routers/repo/cloudbrain.go View File

@@ -429,6 +429,15 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo
} }
} }


if gpuInfos == nil {
json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos)
}
for _, tmp := range gpuInfos.GpuInfo {
if tmp.Queue == task.GpuQueue {
ctx.Data["gpu_type"] = tmp.Value
}
}

if result != nil { if result != nil {
jobRes, _ := models.ConvertToJobResultPayload(result.Payload) jobRes, _ := models.ConvertToJobResultPayload(result.Payload)
jobRes.Resource.Memory = strings.ReplaceAll(jobRes.Resource.Memory, "Mi", "MB") jobRes.Resource.Memory = strings.ReplaceAll(jobRes.Resource.Memory, "Mi", "MB")


+ 2
- 2
templates/repo/cloudbrain/show.tmpl View File

@@ -330,12 +330,12 @@ td, th {


<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.cloudbrain.platform"}}
{{$.i18n.Tr "cloudbrain.gpu_type"}}
</td> </td>


<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">
{{$.result.Platform}}
{{$.gpu_type}}
</div> </div>
</td> </td>
</tr> </tr>


Loading…
Cancel
Save