mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
This commit is contained in:
@@ -6,25 +6,25 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
CRAWLAB_API_ADDRESS: "http://localhost:8000" # backend API address 后端 API 地址,设置为 http://<宿主机IP>:<端口>,端口为映射出来的端口
|
CRAWLAB_API_ADDRESS: "http://localhost:8000" # backend API address 后端 API 地址,设置为 http://<宿主机IP>:<端口>,端口为映射出来的端口
|
||||||
CRAWLAB_SERVER_MASTER: "Y" # whether to be master node 是否为主节点,主节点为 Y,工作节点为 N
|
CRAWLAB_SERVER_MASTER: "Y" # whether to be master node 是否为主节点,主节点为 Y,工作节点为 N
|
||||||
CRAWLAB_MONGO_HOST: "mongo1" # MongoDB host address MongoDB 的地址,在 docker compose 网络中,直接引用服务名称
|
CRAWLAB_MONGO_HOST: "mongo" # MongoDB host address MongoDB 的地址,在 docker compose 网络中,直接引用服务名称
|
||||||
CRAWLAB_REDIS_ADDRESS: "redis" # Redis host address Redis 的地址,在 docker compose 网络中,直接引用服务名称
|
CRAWLAB_REDIS_ADDRESS: "redis" # Redis host address Redis 的地址,在 docker compose 网络中,直接引用服务名称
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # frontend port mapping 前端端口映射
|
- "8080:8080" # frontend port mapping 前端端口映射
|
||||||
- "8000:8000" # backend port mapping 后端端口映射
|
- "8000:8000" # backend port mapping 后端端口映射
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo1
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
worker:
|
worker:
|
||||||
image: tikazyq/crawlab:latest
|
image: tikazyq/crawlab:latest
|
||||||
container_name: worker
|
container_name: worker
|
||||||
environment:
|
environment:
|
||||||
CRAWLAB_SERVER_MASTER: "N"
|
CRAWLAB_SERVER_MASTER: "N"
|
||||||
CRAWLAB_MONGO_HOST: "mongo1"
|
CRAWLAB_MONGO_HOST: "mongo"
|
||||||
CRAWLAB_REDIS_ADDRESS: "redis"
|
CRAWLAB_REDIS_ADDRESS: "redis"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo1
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
mongo1:
|
mongo:
|
||||||
image: mongo:latest
|
image: mongo:latest
|
||||||
restart: always
|
restart: always
|
||||||
# volumes:
|
# volumes:
|
||||||
|
|||||||
@@ -267,6 +267,8 @@ export default {
|
|||||||
'Notification': '提示',
|
'Notification': '提示',
|
||||||
'Are you sure to delete this node?': '你确定要删除该节点?',
|
'Are you sure to delete this node?': '你确定要删除该节点?',
|
||||||
'Are you sure to run this spider?': '你确定要运行该爬虫?',
|
'Are you sure to run this spider?': '你确定要运行该爬虫?',
|
||||||
|
'Added spider successfully': '成功添加爬虫',
|
||||||
|
'Uploaded spider files successfully': '成功上传爬虫文件',
|
||||||
'Node info has been saved successfully': '节点信息已成功保存',
|
'Node info has been saved successfully': '节点信息已成功保存',
|
||||||
'A task has been scheduled successfully': '已经成功派发一个任务',
|
'A task has been scheduled successfully': '已经成功派发一个任务',
|
||||||
'Are you sure to delete this spider?': '你确定要删除该爬虫?',
|
'Are you sure to delete this spider?': '你确定要删除该爬虫?',
|
||||||
|
|||||||
@@ -62,14 +62,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-alert
|
<el-alert
|
||||||
type="error"
|
type="warning"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
style="margin-bottom: 10px"
|
style="margin-bottom: 10px"
|
||||||
>
|
>
|
||||||
<p>{{$t('You can click "Add" to create an empty spider and upload files later.')}}</p>
|
<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>{{$t('OR, you can also click "Upload" and upload a zip file containing your spider project.')}}</p>
|
||||||
<p style="font-weight: bolder">
|
<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>
|
</p>
|
||||||
</el-alert>
|
</el-alert>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
@@ -511,7 +512,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onUploadSuccess () {
|
onUploadSuccess (res) {
|
||||||
// clear fileList
|
// clear fileList
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
|
|
||||||
@@ -519,6 +520,12 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
|
// message
|
||||||
|
this.$message.success(this.$t('Uploaded spider files successfully'))
|
||||||
|
|
||||||
|
// navigate to spider detail
|
||||||
|
this.$router.push(`/spiders/${res.data._id}`)
|
||||||
},
|
},
|
||||||
getTime (str) {
|
getTime (str) {
|
||||||
if (!str || str.match('^0001')) return 'NA'
|
if (!str || str.match('^0001')) return 'NA'
|
||||||
|
|||||||
Reference in New Issue
Block a user