Skip to content

Commit

Permalink
fix(ui): display parent task icon if child don't have one
Browse files Browse the repository at this point in the history
closes #2164
  • Loading branch information
brian-mulier-p committed Sep 22, 2023
1 parent 3d8c291 commit 444a775
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ui/src/components/logs/LogList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
class="task-icon me-1"
>
<task-icon
:cls="taskIcon(currentTaskRun.taskId)"
v-if="taskIcon(currentTaskRun.taskId)"
:cls="taskIcon(currentTaskRun)"
v-if="taskIcon(currentTaskRun)"
only-icon
/>
</div>
Expand Down Expand Up @@ -550,9 +550,13 @@
uniqueTaskRunDisplayFilter(currentTaskRun) {
return !(this.taskRunId && this.taskRunId !== currentTaskRun.id);
},
taskIcon(taskId) {
let findTaskById = FlowUtils.findTaskById(this.flow, taskId);
return findTaskById ? findTaskById.type : undefined;
taskIcon(taskRun) {
const task = FlowUtils.findTaskById(this.flow, taskRun.taskId);
const parentTaskRunId = taskRun.parentTaskRunId;
if(task === undefined && parentTaskRunId) {
return this.taskIcon(this.taskRunById[parentTaskRunId])
}
return task ? task.type : undefined;
},
loadLogs(executionId) {
this.$store.dispatch("execution/loadLogsNoCommit", {
Expand Down

0 comments on commit 444a775

Please sign in to comment.