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
83042640
Commit
83042640
authored
Apr 08, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载接口 获取json格式修改
parent
480fe1b2
Pipeline
#22238
failed with stage
in 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
application_api.py
app/application/application_api.py
+2
-1
application_service.py
app/application/application_service.py
+3
-3
No files found.
app/application/application_api.py
View file @
83042640
...
...
@@ -26,7 +26,8 @@ class ApplicationAPI(ApiController):
:param project_no:
:return:
'''
return
ApplicationService
()
.
edit_application_list
(
project_no
,
request
.
json
)
json_data_list
=
request
.
json
.
get
(
'data'
)
return
ApplicationService
()
.
edit_application_list
(
project_no
,
json_data_list
)
@
api
(
'test_port/<string:project_no>'
)
def
get_port_list
(
self
,
project_no
):
...
...
app/application/application_service.py
View file @
83042640
...
...
@@ -80,7 +80,7 @@ where B.default_version=1'''
if
not
os
.
path
.
exists
(
git_path
):
raise
HSException
(
'未能找到Git仓库,联系技术人员协调解决'
)
def
edit_application_list
(
self
,
project_no
,
json_data
):
def
edit_application_list
(
self
,
project_no
,
json_data
_list
):
'''
修改应用列表并上传git
:param project_no:
...
...
@@ -93,11 +93,11 @@ where B.default_version=1'''
compose_content
=
self
.
get_compose_content
()
# 全选是*
if
json_data
==
'*'
:
if
json_data
_list
==
'*'
:
app_list_str
=
'*'
else
:
app_list
=
[]
for
app_str
in
json_data
:
for
app_str
in
json_data
_list
:
app
=
re
.
findall
(
f
'# {app_str} *
\n
*(.*):'
,
compose_content
)
if
not
app
or
len
(
app
)
>
1
:
raise
HSException
(
'获取app出错,联系技术人员协调解决'
)
...
...
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