Browse Source

fix-2357

tags/v1.22.7.2^2
liuzx 3 years ago
parent
commit
3b75e56f0a
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      routers/repo/cloudbrain.go

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

@@ -2980,10 +2980,18 @@ func GetCloudbrainAiCenter(task models.Cloudbrain, ctx *context.Context) string
} else if task.Type == models.TypeCloudBrainTwo {
return ctx.Tr("repo.cloudbrain2")
} else if task.Type == models.TypeC2Net {
return task.AiCenter
return getCutStringAiCenterByAiCenter(task.AiCenter)
}
return ""
}
func getCutStringAiCenterByAiCenter(aiCenter string) string {
if aiCenter == "" {
return ""
}
index := strings.LastIndex(aiCenter, "+")
return aiCenter[index+1:]

}
func GetCloudbrainCluster(task models.Cloudbrain, ctx *context.Context) string {
if task.Type == models.TypeCloudBrainOne || task.Type == models.TypeCloudBrainTwo {
return ctx.Tr("cloudbrain.resource_cluster_openi")


Loading…
Cancel
Save