Skip to content
Snippets Groups Projects
Commit edddac01 authored by Cain, Payton David's avatar Cain, Payton David
Browse files

Truncate monitor output, make expandable

parent c7bbaa24
No related branches found
No related tags found
1 merge request!156Truncate monitor output, make expandable
...@@ -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