Skip to content
Snippets Groups Projects
Verified Commit 10ba1cf9 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Also display plots for gzipped logs

parent 5438e6b1
No related branches found
No related tags found
1 merge request!33Also display plots for gzipped logs
Pipeline #33202 passed
......@@ -223,7 +223,7 @@ def top10():
@requires_auth
def logs():
files = OrderedDict()
filenames = sorted(glob(join(LOGS_PATH, "MSG*.log")),
filenames = sorted(glob(join(LOGS_PATH, "MSG_*.log*")),
reverse=True)
main_log = filenames.pop(-1)
for filename in [main_log] + filenames:
......
......@@ -10,19 +10,17 @@
<div class="col-md-12">
{% for filename, filesize in files.items() %}
{% if filename != 'MSG.log' %}
<div style="width=100px; float:left; text-align: center; font-size: 10px">
<a href="/logs/{{ filename }}">
<span>{{ filename }}</span>
</a><br />
<span>({{'%0.1f' | format(filesize/1024/1024) }}MB)<span><br />
<a href="/logs/{{ filename|replace('.log', '.png') }}">
<img src="/logs/{{ filename|replace('.log', '.png') }}"
<a href="/logs/{{ filename|replace('.gz', '')|replace('.log', '.png') }}">
<img src="/logs/{{ filename|replace('.gz', '')|replace('.log', '.png') }}"
width="100"
alt="{{ filename }} ({{'%0.1f' | format(filesize/1024/1024) }}MB)" />
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment