support multi-node log view

This commit is contained in:
Marvin Zhang
2019-03-06 15:43:14 +08:00
parent a9f555d9b9
commit 1fb09e4d1f
8 changed files with 102 additions and 59 deletions

View File

@@ -241,9 +241,19 @@ export default {
})
},
onDeploy (row) {
this.$store.dispatch('spider/getSpiderData', row._id.$oid)
this.$store.commit('dialogView/SET_DIALOG_VISIBLE', true)
this.$store.commit('dialogView/SET_DIALOG_TYPE', 'spiderDeploy')
this.$confirm('Are you sure to deploy this spider?', 'Notification', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.$store.dispatch('spider/deploySpider', row._id.$oid)
.then(() => {
this.$message({
type: 'success',
message: 'Deployed successfully'
})
})
})
},
onCrawl (row) {
this.$confirm('Are you sure to run this spider', 'Notice', {
@@ -251,7 +261,7 @@ export default {
cancelButtonText: 'Cancel'
})
.then(() => {
this.$store.dispatch('spider/crawlSpider', { id: row._id.$oid })
this.$store.dispatch('spider/crawlSpider', row._id.$oid)
.then(() => {
this.$message.success(`Running spider "${row._id.$oid}" has been scheduled`)
})