Commit 2333961c authored by 金凯强's avatar 金凯强 🎨

还原接口配置

parent 08f5aa05
...@@ -8,13 +8,13 @@ from app.info.info_service import InfoService ...@@ -8,13 +8,13 @@ from app.info.info_service import InfoService
@api('info') @api('info')
class InfoAPI(ApiController): class InfoAPI(ApiController):
@api('app_list/<string:project_no>') @api('app_list')
def get_app_list(self, project_no): def get_app_list(self):
''' '''
获取app_list 获取app_list
:return: :return:
''' '''
return InfoService().get_app_list(project_no) return InfoService().get_app_list()
@api('app_upgrade') @api('app_upgrade')
def post_set_app_upgrade_info(self): def post_set_app_upgrade_info(self):
......
...@@ -21,14 +21,8 @@ docker_client = docker.APIClient(base_url='unix:///var/run/docker.sock') ...@@ -21,14 +21,8 @@ docker_client = docker.APIClient(base_url='unix:///var/run/docker.sock')
class InfoService(HSBaseUCService): class InfoService(HSBaseUCService):
def get_app_list(self, project_no): def get_app_list(self):
project_info = ConnectionService().get_project_info(project_no) host_ip = 'localhost'
if not project_info:
# raise HSException('请先设置项目信息')
return []
host_ip = project_info.get('host_ip')
# host_ip = 'localhost'
containers = docker_client.containers() containers = docker_client.containers()
app_info_list = [] app_info_list = []
for container in containers: for container in containers:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment