|
|
|
@@ -2763,6 +2763,8 @@ func GetCloudbrainAiCenter(task models.Cloudbrain, ctx *context.Context) string |
|
|
|
return ctx.Tr("repo.cloudbrain1") |
|
|
|
} else if task.Type == models.TypeCloudBrainTwo { |
|
|
|
return ctx.Tr("repo.cloudbrain2") |
|
|
|
} else if task.Type == models.TypeCDCenter { |
|
|
|
return ctx.Tr("repo.cdCenter") |
|
|
|
} else if task.Type == models.TypeC2Net { |
|
|
|
return getCutStringAiCenterByAiCenter(task.AiCenter) |
|
|
|
} |
|
|
|
@@ -2777,7 +2779,7 @@ func getCutStringAiCenterByAiCenter(aiCenter string) string { |
|
|
|
|
|
|
|
} |
|
|
|
func GetCloudbrainCluster(task models.Cloudbrain, ctx *context.Context) string { |
|
|
|
if task.Type == models.TypeCloudBrainOne || task.Type == models.TypeCloudBrainTwo { |
|
|
|
if task.Type == models.TypeCloudBrainOne || task.Type == models.TypeCloudBrainTwo || task.Type == models.TypeCDCenter { |
|
|
|
return ctx.Tr("cloudbrain.resource_cluster_openi") |
|
|
|
} else if task.Type == models.TypeC2Net { |
|
|
|
return ctx.Tr("cloudbrain.resource_cluster_c2net") |
|
|
|
@@ -2864,10 +2866,10 @@ func GetCloudbrainFlavorName(task models.Cloudbrain) (string, error) { |
|
|
|
return CloudbrainOneFlavorName, nil |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (task.Type == models.TypeCloudBrainTwo || task.Type == models.TypeC2Net) && task.FlavorName != "" { |
|
|
|
} else if (task.Type == models.TypeCloudBrainTwo || task.Type == models.TypeC2Net || task.Type == models.TypeCDCenter) && task.FlavorName != "" { |
|
|
|
replaceFlavorName := strings.ReplaceAll(task.FlavorName, ":", ":") |
|
|
|
return replaceFlavorName, nil |
|
|
|
} else if task.Type == models.TypeCloudBrainTwo && task.FlavorName == "" && task.FlavorCode != "" { |
|
|
|
} else if (task.Type == models.TypeCloudBrainTwo || task.Type == models.TypeCDCenter) && task.FlavorName == "" && task.FlavorCode != "" { |
|
|
|
cloudbrainTwoFlavorName := getFlavorNameByFlavorCode(task.FlavorCode) |
|
|
|
return cloudbrainTwoFlavorName, nil |
|
|
|
} else if task.Type == models.TypeCloudBrainTwo && task.JobType == string(models.JobTypeDebug) && task.FlavorName == "" && task.FlavorCode == "" { |
|
|
|
|