Skip to content

Commit

Permalink
feat:流水线查看和构建详情查看配置界面敏感字段展示优化 #11019
Browse files Browse the repository at this point in the history
  • Loading branch information
yjieliang committed Jan 9, 2025
1 parent 65db9a9 commit e358f41
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,20 @@ class PipelineTransferYamlService @Autowired constructor(
val triggerIndex = mutableListOf<TransferMark>()
val noticeIndex = mutableListOf<TransferMark>()
val settingIndex = mutableListOf<TransferMark>()
val yaml = resource.yaml ?: transfer(
userId = userId,
projectId = projectId,
pipelineId = pipelineId,
actionType = TransferActionType.FULL_MODEL2YAML,
data = TransferBody(modelAndSetting),
editPermission = editPermission
).yamlWithVersion?.yamlStr ?: return PreviewResponse("")
val yaml = if (editPermission == false || resource.yaml.isNullOrBlank()) {
transfer(
userId = userId,
projectId = projectId,
pipelineId = pipelineId,
actionType = TransferActionType.FULL_MODEL2YAML,
data = TransferBody(modelAndSetting),
editPermission = editPermission
).yamlWithVersion?.yamlStr ?: return PreviewResponse("")
} else {
resource.yaml
}
try {
TransferMapper.getYamlLevelOneIndex(yaml).forEach { (key, value) ->
TransferMapper.getYamlLevelOneIndex(yaml!!).forEach { (key, value) ->
if (key in pipeline_key) pipelineIndex.add(value)
if (key in trigger_key) triggerIndex.add(value)
if (key in notice_key) noticeIndex.add(value)
Expand All @@ -302,7 +306,7 @@ class PipelineTransferYamlService @Autowired constructor(
} catch (ignore: Throwable) {
logger.warn("TRANSFER_YAML|$projectId|$userId", ignore)
}
return PreviewResponse(yaml, pipelineIndex, triggerIndex, noticeIndex, settingIndex)
return PreviewResponse(yaml!!, pipelineIndex, triggerIndex, noticeIndex, settingIndex)
}

fun position(
Expand Down

0 comments on commit e358f41

Please sign in to comment.