mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
update routes
This commit is contained in:
@@ -6,6 +6,8 @@ class DeployApi(BaseApi):
|
||||
col_name = 'deploys'
|
||||
|
||||
arguments = (
|
||||
('spider_id', str),
|
||||
('node_id', str),
|
||||
)
|
||||
|
||||
|
||||
|
||||
18
routes/node.py
Normal file
18
routes/node.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from app import api
|
||||
from routes.base import BaseApi
|
||||
|
||||
|
||||
class NodeApi(BaseApi):
|
||||
col_name = 'nodes'
|
||||
|
||||
arguments = (
|
||||
('node_ip', str),
|
||||
('node_name', str),
|
||||
('node_description', str),
|
||||
)
|
||||
|
||||
|
||||
api.add_resource(NodeApi,
|
||||
'/api/nodes',
|
||||
'/api/nodes/<string:id>',
|
||||
'/api/nodes/<string:id>/<string:action>')
|
||||
@@ -5,6 +5,11 @@ from routes.base import BaseApi
|
||||
class TaskApi(BaseApi):
|
||||
col_name = 'tasks_celery'
|
||||
|
||||
arguments = (
|
||||
('deploy_id', str),
|
||||
('file_path', str)
|
||||
)
|
||||
|
||||
|
||||
# add api to resources
|
||||
api.add_resource(TaskApi,
|
||||
|
||||
Reference in New Issue
Block a user