mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-26 17:49:15 +01:00
updated methodologies of deployment and running spider
This commit is contained in:
@@ -71,10 +71,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onRun () {
|
||||
const row = this.spiderForm
|
||||
this.$refs['spiderForm'].validate(res => {
|
||||
if (res) {
|
||||
this.$store.commit('dialogView/SET_DIALOG_VISIBLE', true)
|
||||
this.$store.commit('dialogView/SET_DIALOG_TYPE', 'spiderRun')
|
||||
this.$confirm('Are you sure to run this spider', 'Notice', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
this.$store.dispatch('spider/crawlSpider', { id: row._id.$oid })
|
||||
.then(() => {
|
||||
this.$message.success(`Running spider "${row._id.$oid}" has been scheduled`)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user