Skip to content

Commit

Permalink
project pipeline table add source file field
Browse files Browse the repository at this point in the history
  • Loading branch information
kakj-go committed Feb 23, 2022
1 parent 636d500 commit 2b61ba3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions conf/dop/i18n/cp/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ zh:
exitProjectConfirm: 退出当前项目后,将不再有项目协作权限,如要再次加入需要项目管理员邀请,请确认是否退出?
searchAppName: 搜索应用名
unfinishedIssue: 未完成的事项
sourceFile: 源文件

en:
issue-manage: issue manage
issue: issue
Expand Down Expand Up @@ -628,3 +630,4 @@ en:
exitProjectConfirm: After exiting the current project, you will no longer have project collaboration permission. If you want to join again, you need to be invited by the project administrator. Are you sure you want to exit?
searchAppName: Search app name
unfinishedIssue: Unfinished issue
sourceFile: source file
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const (
ColumnPipelineID table.ColumnKey = "pipelineID"
ColumnMoreOperations table.ColumnKey = "moreOperations"
ColumnSource table.ColumnKey = "source"
ColumnSourceFile table.ColumnKey = "sourceFile"
ColumnProcess table.ColumnKey = "process"
ColumnIcon table.ColumnKey = "icon"

Expand Down Expand Up @@ -134,7 +135,7 @@ func (p *PipelineTable) SetTableColumns() table.ColumnsInfo {
Merges: map[table.ColumnKey]table.MergedColumn{
ColumnSource: {[]table.ColumnKey{ColumnApplicationName, ColumnIcon, ColumnBranch}},
},
Orders: []table.ColumnKey{ColumnPipelineName, ColumnSource, ColumnPipelineStatus, ColumnProcess, ColumnCostTime,
Orders: []table.ColumnKey{ColumnPipelineName, ColumnSource, ColumnSourceFile, ColumnPipelineStatus, ColumnProcess, ColumnCostTime,
ColumnExecutor, ColumnStartTime, ColumnCreateTime, ColumnCreator, ColumnPipelineID, ColumnMoreOperations},
ColumnsMap: map[table.ColumnKey]table.Column{
ColumnPipelineName: {Title: cputil.I18n(p.sdk.Ctx, string(ColumnPipelineName))},
Expand All @@ -150,6 +151,7 @@ func (p *PipelineTable) SetTableColumns() table.ColumnsInfo {
ColumnPipelineID: {Title: cputil.I18n(p.sdk.Ctx, string(ColumnPipelineID)), Hidden: true},
ColumnCreateTime: {Title: cputil.I18n(p.sdk.Ctx, string(ColumnCreateTime)), EnableSort: true, Hidden: true},
ColumnSource: {Title: cputil.I18n(p.sdk.Ctx, string(ColumnSource))},
ColumnSourceFile: {Title: cputil.I18n(p.sdk.Ctx, string(ColumnSourceFile))},
ColumnIcon: {Title: cputil.I18n(p.sdk.Ctx, string(ColumnIcon))},
},
}
Expand Down Expand Up @@ -383,6 +385,9 @@ func (p *PipelineTable) SetTableRows() []table.Row {
ColumnMoreOperations: table.NewMoreOperationsCell(commodel.MoreOperations{
Ops: p.SetTableMoreOpItem(v, definitionYmlSourceMap, ymlSourceMapCronMap),
}).Build(),
ColumnSourceFile: table.NewTextCell(func() string {
return v.FileName
}()).Build(),
ColumnIcon: table.NewIconCell(commodel.Icon{
Type: "branch",
}).Build(),
Expand Down

0 comments on commit 2b61ba3

Please sign in to comment.