Skip to content

Commit

Permalink
add status title
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Feb 19, 2024
1 parent 67bfee8 commit bba3956
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/TaskListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:details="details"
@click="$emit('load')">
<template #icon>
<component :is="icon" />
<component :is="icon" :title="statusTitle" />
</template>
<template #subname>
{{ subName }}
Expand Down Expand Up @@ -137,6 +137,18 @@ export default {
}
return ProgressQuestionIcon
},
statusTitle() {
if (this.task.status === STATUS.successfull) {
return t('assistant', 'Succeeded')
} else if (this.task.status === STATUS.failed) {
return t('assistant', 'Failed')
} else if (this.task.status === STATUS.running) {
return t('assistant', 'Running')
} else if (this.task.status === STATUS.scheduled) {
return t('assistant', 'Scheduled')
}
return t('assistant', 'Unknown status')
},
},
watch: {
Expand Down

0 comments on commit bba3956

Please sign in to comment.