mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-26 17:49:15 +01:00
added github import
This commit is contained in:
@@ -12,7 +12,10 @@ const state = {
|
||||
activeNode: {},
|
||||
|
||||
// upload form for importing spiders
|
||||
importForm: {}
|
||||
importForm: {
|
||||
url: '',
|
||||
type: 'github'
|
||||
}
|
||||
}
|
||||
|
||||
const getters = {}
|
||||
@@ -114,8 +117,14 @@ const actions = {
|
||||
}).sort((a, b) => a.create_ts < b.create_ts ? 1 : -1),
|
||||
{ root: true })
|
||||
})
|
||||
},
|
||||
importGithub ({ state }) {
|
||||
const url = state.importForm.url
|
||||
return request.post('/spiders/import/github', { url })
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user