Browse Source

update

tags/v1.22.6.1^2
liuzx 3 years ago
parent
commit
b1484ee467
2 changed files with 8 additions and 6 deletions
  1. +2
    -0
      options/locale/locale_zh-CN.ini
  2. +6
    -6
      routers/api/v1/repo/cloudbrain_dashboard.go

+ 2
- 0
options/locale/locale_zh-CN.ini View File

@@ -1013,12 +1013,14 @@ balance.total_view=余额总览
balance.available=可用余额:
cloudbrain1=云脑1
cloudbrain2=云脑2
intelligent_net=智算网络
cloudbrain_selection=云脑选择
cloudbrain_platform_selection=选择您准备使用的云脑平台:
confirm_choice=确定
cloudbran1_tips=只有zip格式的数据集才能发起云脑任务
cloudbrain_creator=创建者
cloudbrain_type=支撑算力
cloudbrain_untype=未知支撑算力
cloudbrain_task=任务名称
cloudbrain_task_type=任务类型
cloudbrain_task_name=云脑侧任务名称


+ 6
- 6
routers/api/v1/repo/cloudbrain_dashboard.go View File

@@ -1043,7 +1043,7 @@ func allCloudbrainHeader(ctx *context.Context) map[string]string {

}
func allCloudbrainValues(row int, rs *models.CloudbrainInfo, ctx *context.Context) map[string]string {
return map[string]string{getCellName("A", row): getCloudbrainType(rs), getCellName("B", row): rs.DisplayJobName, getCellName("C", row): rs.Status, getCellName("D", row): rs.JobType,
return map[string]string{getCellName("A", row): getCloudbrainType(rs, ctx), getCellName("B", row): rs.DisplayJobName, getCellName("C", row): rs.Status, getCellName("D", row): rs.JobType,
getCellName("E", row): time.Unix(int64(rs.Cloudbrain.CreatedUnix), 0).Format(CREATE_TIME_FORMAT), getCellName("F", row): getBrainWaitTime(rs),
getCellName("G", row): rs.TrainJobDuration, getCellName("H", row): getBrainStartTime(rs),
getCellName("I", row): getBrainEndTime(rs),
@@ -1083,15 +1083,15 @@ func getBrainWaitTime(rs *models.CloudbrainInfo) string {
return models.ConvertDurationToStr(int64(waitTime))
}
}
func getCloudbrainType(rs *models.CloudbrainInfo) string {
func getCloudbrainType(rs *models.CloudbrainInfo, ctx *context.Context) string {
if rs.Cloudbrain.Type == models.TypeCloudBrainOne {
return "云脑Ⅰ"
return ctx.Tr("repo.cloudbrain1")
} else if rs.Cloudbrain.Type == models.TypeCloudBrainTwo {
return "云脑Ⅱ"
return ctx.Tr("repo.cloudbrain2")
} else if rs.Cloudbrain.Type == models.TypeIntelligentNet {
return "智算网络"
return ctx.Tr("repo.intelligent_net")
} else {
return "未知支撑算力"
return ctx.Tr("repo.cloudbrain_untype")
}
}



Loading…
Cancel
Save