Skip to content

Commit

Permalink
bug: 新增错误类型枚举导致前端解析异常 #11386
Browse files Browse the repository at this point in the history
  • Loading branch information
lockiechen committed Jan 8, 2025
1 parent 760df15 commit 9dd58da
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/devops-pipeline/src/components/ExecPipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@
errorList () {
return this.execDetail?.errorInfoList?.map((error, index) => ({
...error,
errorTypeAlias: this.$t(errorTypeMap[error.errorType].title),
errorTypeConf: errorTypeMap[error.errorType]
errorTypeAlias: this.$t(errorTypeMap[error.errorType]?.title ?? errorTypeMap[0]?.title),
errorTypeConf: errorTypeMap[error.errorType] ?? errorTypeMap[0]
}))
},
showErrorPopup () {
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/devops-pipeline/src/utils/pipelineConst.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export const errorTypeMap = [
{
title: 'pluginError',
icon: 'error-plugin'
},
{
title: 'containerError',
icon: 'error-node'
}
]

Expand Down
1 change: 1 addition & 0 deletions src/frontend/locale/pipeline/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"systemError": "SYSTEM",
"thirdPartyError": "THIRD_PARTY",
"pluginError": "PLUGIN",
"containerError": "AGENT",
"createTime": "Create time",
"retry": "Retry",
"resume": "Continue",
Expand Down
1 change: 1 addition & 0 deletions src/frontend/locale/pipeline/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"systemError": "系统运行错误",
"thirdPartyError": "第三方系统错误",
"pluginError": "插件执行错误",
"containerError": "构建机执行错误",
"create": "创建",
"createTime": "创建时间",
"add": "新建",
Expand Down
6 changes: 6 additions & 0 deletions src/frontend/svg-sprites/pipeline/error-node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9dd58da

Please sign in to comment.