Skip to content

Commit 104aba2

Browse files
author
Guillaume Chau
committed
feat(ui): db click on task to run
1 parent 28558ea commit 104aba2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/@vue/cli-ui/src/components/TaskItem.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
selected
88
}
99
]"
10+
@dblclick="runTask()"
1011
>
1112
<div class="content">
1213
<ItemLogo
@@ -25,6 +26,8 @@
2526
</template>
2627

2728
<script>
29+
import TASK_RUN from '../graphql/taskRun.gql'
30+
2831
const icons = {
2932
idle: { icon: 'assignment', class: '' },
3033
running: { icon: 'more_horiz', class: 'info' },
@@ -54,6 +57,18 @@ export default {
5457
iconData () {
5558
return icons[this.task.status]
5659
}
60+
},
61+
62+
methods: {
63+
runTask () {
64+
if (this.task.status === 'running') return
65+
this.$apollo.mutate({
66+
mutation: TASK_RUN,
67+
variables: {
68+
id: this.task.id
69+
}
70+
})
71+
},
5772
}
5873
}
5974
</script>

0 commit comments

Comments
 (0)