marvzhang
2019-12-27 16:06:19 +08:00
parent 78156266fc
commit 787bc89949
3 changed files with 17 additions and 8 deletions

View File

@@ -267,6 +267,8 @@ export default {
'Notification': '提示',
'Are you sure to delete this node?': '你确定要删除该节点?',
'Are you sure to run this spider?': '你确定要运行该爬虫?',
'Added spider successfully': '成功添加爬虫',
'Uploaded spider files successfully': '成功上传爬虫文件',
'Node info has been saved successfully': '节点信息已成功保存',
'A task has been scheduled successfully': '已经成功派发一个任务',
'Are you sure to delete this spider?': '你确定要删除该爬虫?',

View File

@@ -62,14 +62,15 @@
</el-form-item>
</el-form>
<el-alert
type="error"
type="warning"
:closable="false"
style="margin-bottom: 10px"
>
<p>{{$t('You can click "Add" to create an empty spider and upload files later.')}}</p>
<p>{{$t('OR, you can also click "Upload" and upload a zip file containing your spider project.')}}</p>
<p style="font-weight: bolder">
<i class="fa fa-exclamation-triangle"></i> {{$t('NOTE: When uploading a zip file, please zip your spider files from the ROOT DIRECTORY.')}}
<i class="fa fa-exclamation-triangle"></i> {{$t('NOTE: When uploading a zip file, please zip your' +
' spider files from the ROOT DIRECTORY.')}}
</p>
</el-alert>
<div class="actions">
@@ -511,7 +512,7 @@ export default {
}
})
},
onUploadSuccess () {
onUploadSuccess (res) {
// clear fileList
this.fileList = []
@@ -519,6 +520,12 @@ export default {
setTimeout(() => {
this.getList()
}, 500)
// message
this.$message.success(this.$t('Uploaded spider files successfully'))
// navigate to spider detail
this.$router.push(`/spiders/${res.data._id}`)
},
getTime (str) {
if (!str || str.match('^0001')) return 'NA'