| @@ -417,6 +417,18 @@ 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 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") | ||||
| @@ -357,7 +357,7 @@ td, th { | |||||
| <td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
| <div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName"> | <div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName"> | ||||
| {{if not (eq .StartTime 0)}} | |||||
| {{if not (eq .EndTime 0)}} | |||||
| {{TimeSinceUnix1 .EndTime}} | {{TimeSinceUnix1 .EndTime}} | ||||
| {{else}} | {{else}} | ||||
| -- | -- | ||||
| @@ -386,7 +386,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> | ||||
| @@ -1,68 +0,0 @@ | |||||
| {{template "base/head" .}} | |||||
| <div class="repository"> | |||||
| {{template "repo/header" .}} | |||||
| <div class="repository new repo ui middle very relaxed page grid"> | |||||
| <div class="column"> | |||||
| {{template "base/alert" .}} | |||||
| <h4 class="ui header" id="vertical-segment"> | |||||
| <div class="ui breadcrumb"> | |||||
| <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all"> | |||||
| {{.i18n.Tr "repo.cloudbrain"}} | |||||
| </a> | |||||
| <div class="divider"> / </div> | |||||
| <a class="section backTodeBug" href="{{.RepoLink}}/debugjob?debugListType={{if eq $.debugListType "NPU"}}NPU{{else if eq $.debugListType "CPU/GPU"}}CPU/GPU{{else}}all{{end}}"> | |||||
| {{$.i18n.Tr "repo.modelarts.notebook"}} | |||||
| </a> | |||||
| <div class="divider"> / </div> | |||||
| {{with .task}} | |||||
| <div class="active section">{{.DisplayJobName}}</div> | |||||
| {{end}} | |||||
| </div> | |||||
| </h4> | |||||
| <div> | |||||
| <div class="ui yellow segment"> | |||||
| {{with .task}} | |||||
| <p>任务名称: {{.DisplayJobName}}</p> | |||||
| {{end}} | |||||
| </div> | |||||
| <div class="ui green segment"> | |||||
| <p>任务详情:</p> | |||||
| {{with .result}} | |||||
| <table class="ui celled striped table"> | |||||
| <tbody> | |||||
| <tr> | |||||
| <td class="four wide"> 状态 </td> | |||||
| <td> {{.Status}} </td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 描述 </td> | |||||
| <td style="max-width: 480px; word-wrap:break-word">{{$.task.Description}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 镜像名称 </td> | |||||
| <td>{{$.task.Image}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 数据集下载地址 </td> | |||||
| <td style="max-width: 480px; word-wrap:break-word">{{$.datasetDownloadLink}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 开始时间 </td> | |||||
| <td>{{.CreateTime}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> 最后更新时间 </td> | |||||
| <td>{{.LatestUpdateTime}}</td> | |||||
| </tr> | |||||
| </tbody> | |||||
| </table> | |||||
| {{end}} | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| {{template "base/footer" .}} | |||||