Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
ws-statistics
Commits
705f8cfd
Commit
705f8cfd
authored
Jan 21, 2021
by
Jerome Touvier
Browse files
Merge branch 'fix2' into 'master'
datetime not JSON serializable See merge request
!36
parents
e2b1f0ea
7439f1e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/output.py
View file @
705f8cfd
...
@@ -175,6 +175,7 @@ def format_results(params, data):
...
@@ -175,6 +175,7 @@ def format_results(params, data):
for
row
in
data
:
for
row
in
data
:
if
row
[
2
]:
if
row
[
2
]:
row
[
2
]
=
format
(
row
[
2
],
","
)
+
f
" (
{
humanize_size
(
row
[
2
])
}
)"
row
[
2
]
=
format
(
row
[
2
],
","
)
+
f
" (
{
humanize_size
(
row
[
2
])
}
)"
data
=
[[
str
(
val
)
for
val
in
row
]
for
row
in
data
]
return
data
return
data
...
@@ -205,7 +206,6 @@ def get_column_widths(data, header=None):
...
@@ -205,7 +206,6 @@ def get_column_widths(data, header=None):
def
records_to_text
(
params
,
data
,
sep
=
" "
):
def
records_to_text
(
params
,
data
,
sep
=
" "
):
text
=
""
text
=
""
header
=
get_header
(
params
)
header
=
get_header
(
params
)
data
=
[[
str
(
val
)
for
val
in
row
]
for
row
in
data
]
if
params
[
"format"
]
==
"text"
:
if
params
[
"format"
]
==
"text"
:
sizes
=
get_column_widths
(
data
,
header
)
sizes
=
get_column_widths
(
data
,
header
)
# pad header and rows according to the maximum column width
# pad header and rows according to the maximum column width
...
...
Write
Preview
Supports
Markdown
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