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
28d877b1
Commit
28d877b1
authored
Mar 20, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志
parent
9c592e24
Pipeline
#21123
passed with stage
in 25 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
info_api.py
app/info/info_api.py
+9
-0
info_service.py
app/info/info_service.py
+12
-4
No files found.
app/info/info_api.py
View file @
28d877b1
...
...
@@ -42,3 +42,12 @@ class InfoAPI(ApiController):
'''
args
=
request
.
args
return
InfoService
()
.
get_upgrade_log_dtl
(
log_id
,
args
)
@
api
(
'logs'
)
def
get_install_logs_info
(
self
):
'''
获取日志信息
:return:
'''
return
InfoService
()
.
get_install_logs
()
\ No newline at end of file
app/info/info_service.py
View file @
28d877b1
...
...
@@ -140,8 +140,8 @@ values
获取升级历史信息
:return:
'''
per_page
=
args
.
get
(
'per_page'
,
10
)
page
=
args
.
get
(
'page'
,
1
)
per_page
=
args
.
get
(
'per_page'
,
10
)
page
=
args
.
get
(
'page'
,
1
)
offset
=
(
int
(
page
)
-
1
)
*
int
(
per_page
)
sql
=
'''select A.*,(select count(*) from app_upgrade_log_dtl where log_id=A.id) as count
...
...
@@ -176,8 +176,8 @@ order by A.default_version desc, A.upgrade_time desc
:param log_id:
:return:
'''
per_page
=
args
.
get
(
'per_page'
,
10
)
page
=
args
.
get
(
'page'
,
1
)
per_page
=
args
.
get
(
'per_page'
,
10
)
page
=
args
.
get
(
'page'
,
1
)
offset
=
(
int
(
page
)
-
1
)
*
int
(
per_page
)
sql
=
f
'''select A.*
...
...
@@ -204,3 +204,11 @@ where A.log_id={log_id}'''
}
return
page_data
def
get_install_logs
(
self
):
'''
获取升级日志
:return:
'''
logs
=
docker_client
.
logs
(
'install_api'
)
return
logs
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