Skip to content

Commit

Permalink
fix: fix jenkins user admin log
Browse files Browse the repository at this point in the history
Signed-off-by: yazhou <[email protected]>
  • Loading branch information
yazhouio committed Sep 15, 2023
1 parent cd0fc5b commit c27f706
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
15 changes: 14 additions & 1 deletion src/pages/devops/containers/Pipelines/Detail/Activity/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,20 @@ export default class Activity extends React.Component {
title: t('LAST_MESSAGE'),
dataIndex: 'causes',
width: '25%',
render: causes => get(causes, '[0].shortDescription', ''),
render: (causes, record) => {
let message = get(causes, '[0].shortDescription', '')
const creator = get(
record,
'_originData.metadata.annotations["devops.kubesphere.io/creator"]'
)
if (!creator) {
return message
}
if (message === 'Started by user admin') {
message = message.replace('user admin', `user ${creator}`)
}
return message
},
},
{
title: t('DURATION'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with KubeSphere Console. If not, see <https://www.gnu.org/licenses/>.
*/

import { result, get, omit, isEmpty } from 'lodash'
import { get, omit, isEmpty } from 'lodash'
import React from 'react'
import { toJS } from 'mobx'
import { observer, inject } from 'mobx-react'
Expand Down Expand Up @@ -177,12 +177,6 @@ export default class Branch extends React.Component {
width: '20%',
render: weatherScore => <Health score={weatherScore} />,
},
{
title: t('LAST_MESSAGE'),
dataIndex: 'latestRun',
width: '20%',
render: latestRun => result(latestRun, 'causes[0].shortDescription', '-'),
},
{
title: t('UPDATE_TIME_TCAP'),
dataIndex: 'updateTime',
Expand Down

0 comments on commit c27f706

Please sign in to comment.