Skip to content
Snippets Groups Projects

added lines so that the eleventh and following gaps are shown in collapsible...

All threads resolved!
Files
3
@@ -66,6 +66,10 @@ def get_gaps(gaps):
gap_string += "<details>\n"
gap_string += f"<summary>+ {len(gaps) - 10}</summary>\n"
gap_string += "<span>\n"
gap_string += "&nbsp;&nbsp;&nbsp;&nbsp; %s to %s <br>\n" % (
format_time(gaps[i][0]),
format_time(gaps[i][1]),
)
else:
gap_string += "&nbsp;&nbsp;&nbsp;&nbsp; %s to %s <br>\n" % (
format_time(gaps[i][0]),
@@ -74,6 +78,7 @@ def get_gaps(gaps):
if i == len(gaps) - 1:
gap_string += "</span>\n"
gap_string += "</details>\n"
else:
gap_string = "&nbsp;&nbsp;&nbsp;&nbsp;None<br>"
return gap_string
@@ -317,7 +322,7 @@ def generate_report(
location_code=location_code,
warning_threshold=warning_threshold,
)
print("</body>\n" + "</html>\n")
print("<br>\n" + "<br>\n" + "</body>\n" + "</html>\n")
sys.exit(warning_issued)
Loading