added stop task

This commit is contained in:
Marvin Zhang
2019-03-09 16:18:39 +08:00
parent 1821c31cf7
commit 8d4ccddd8c
3 changed files with 27 additions and 3 deletions

View File

@@ -57,6 +57,12 @@ const actions = {
dispatch('getTaskList')
})
},
stopTask ({ state, dispatch }, id) {
return request.post(`/tasks/${id}/stop`)
.then(() => {
dispatch('getTaskList')
})
},
getTaskLog ({ state, commit }, id) {
return request.get(`/tasks/${id}/get_log`)
.then(response => {