From 3b75e56f0a57bdc6bce6ddfe082e4c77f8b01e26 Mon Sep 17 00:00:00 2001 From: liuzx Date: Thu, 28 Jul 2022 11:01:37 +0800 Subject: [PATCH] fix-2357 --- routers/repo/cloudbrain.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index bd8b05088..31d0bb8d0 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -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")