Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Script
install.api
Commits
2333961c
Commit
2333961c
authored
Apr 09, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还原接口配置
parent
08f5aa05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
info_api.py
app/info/info_api.py
+3
-3
info_service.py
app/info/info_service.py
+2
-8
No files found.
app/info/info_api.py
View file @
2333961c
...
...
@@ -8,13 +8,13 @@ from app.info.info_service import InfoService
@
api
(
'info'
)
class
InfoAPI
(
ApiController
):
@
api
(
'app_list
/<string:project_no>
'
)
def
get_app_list
(
self
,
project_no
):
@
api
(
'app_list'
)
def
get_app_list
(
self
):
'''
获取app_list
:return:
'''
return
InfoService
()
.
get_app_list
(
project_no
)
return
InfoService
()
.
get_app_list
()
@
api
(
'app_upgrade'
)
def
post_set_app_upgrade_info
(
self
):
...
...
app/info/info_service.py
View file @
2333961c
...
...
@@ -21,14 +21,8 @@ docker_client = docker.APIClient(base_url='unix:///var/run/docker.sock')
class
InfoService
(
HSBaseUCService
):
def
get_app_list
(
self
,
project_no
):
project_info
=
ConnectionService
()
.
get_project_info
(
project_no
)
if
not
project_info
:
# raise HSException('请先设置项目信息')
return
[]
host_ip
=
project_info
.
get
(
'host_ip'
)
# host_ip = 'localhost'
def
get_app_list
(
self
):
host_ip
=
'localhost'
containers
=
docker_client
.
containers
()
app_info_list
=
[]
for
container
in
containers
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment