|
|
|
@@ -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") |
|
|
|
|