Skip to content
Snippets Groups Projects
Commit 7889a332 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler
Browse files

Merge branch 'truncate-monitor' into 'master'

Truncate monitor output, make expandable

Closes #55

See merge request !156
parents a76ef618 edddac01
No related branches found
No related tags found
1 merge request!156Truncate monitor output, make expandable
Pipeline #123750 failed
...@@ -55,11 +55,25 @@ def get_gaps(gaps): ...@@ -55,11 +55,25 @@ def get_gaps(gaps):
""" """
gap_string = "" gap_string = ""
if len(gaps): if len(gaps):
for gap in gaps: for i in range(len(gaps)):
gap_string += "&nbsp;&nbsp;&nbsp;&nbsp; %s to %s <br>\n" % ( if i < 10:
format_time(gap[0]), gap_string += "&nbsp;&nbsp;&nbsp;&nbsp; %s to %s <br>\n" % (
format_time(gap[1]), format_time(gaps[i][0]),
) format_time(gaps[i][1]),
)
else:
if i == 10:
gap_string += "<details>\n"
gap_string += f"<summary>+ {len(gaps) - 10}</summary>\n"
gap_string += "<span>\n"
else:
gap_string += "&nbsp;&nbsp;&nbsp;&nbsp; %s to %s <br>\n" % (
format_time(gaps[i][0]),
format_time(gaps[i][1]),
)
if i == len(gaps) - 1:
gap_string += "</span>\n"
gap_string += "</details>\n"
else: else:
gap_string = "&nbsp;&nbsp;&nbsp;&nbsp;None<br>" gap_string = "&nbsp;&nbsp;&nbsp;&nbsp;None<br>"
return gap_string return gap_string
......
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