Skip to content

Commit b73c464

Browse files
author
Sergiu Miclea
committed
Fix highlighting of last execution task
Instead of highlighting the last task, the first one was highlighted when an execution was running.
1 parent 9271d9b commit b73c464

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/molecules/TaskItem/TaskItem.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class TaskItem extends React.Component<Props> {
145145
getLastMessage() {
146146
let message
147147
if (this.props.item.progress_updates.length) {
148-
message = this.props.item.progress_updates[this.props.item.progress_updates.length - 1].message
148+
message = this.props.item.progress_updates[0].message
149149
} else {
150150
message = '-'
151151
}
@@ -222,7 +222,7 @@ class TaskItem extends React.Component<Props> {
222222
let messageProgress = this.getMessageProgress(update.message)
223223

224224
return (
225-
<ProgressUpdate key={i} secondary={i < this.props.item.progress_updates.length - 1 || this.props.item.status !== 'RUNNING'}>
225+
<ProgressUpdate key={i} secondary={i > 0 || this.props.item.status !== 'RUNNING'}>
226226
<ProgressUpdateDate width={this.props.columnWidths[0]}>
227227
<span>{DateUtils.getLocalTime(update.created_at).format('YYYY-MM-DD HH:mm:ss')}</span>
228228
</ProgressUpdateDate>

0 commit comments

Comments
 (0)