Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
9df280f3
Commit
9df280f3
authored
Jul 29, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
0ca61d97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
slapos/runner/views.py
slapos/runner/views.py
+4
-4
No files found.
slapos/runner/views.py
View file @
9df280f3
...
...
@@ -254,10 +254,10 @@ def getFileLog():
raise
IOError
if
not
isText
(
file_path
):
content
=
"Can not open binary file, please select a text file!"
if
'truncate'
in
request
.
form
:
content
=
tail
(
open
(
file_path
),
int
(
request
.
form
[
'truncate'
]))
else
:
with
open
(
file_path
)
as
f
:
with
open
(
file_path
)
as
f
:
if
'truncate'
in
request
.
form
:
content
=
tail
(
f
,
int
(
request
.
form
[
'truncate'
]))
else
:
content
=
f
.
read
()
return
jsonify
(
code
=
1
,
result
=
html_escape
(
content
))
except
Exception
:
...
...
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