webserver: Fix it.
- Should add tests for as_html methods.
This commit is contained in:
parent
c98f3260a9
commit
377f74c471
2 changed files with 9 additions and 4 deletions
|
|
@ -130,12 +130,12 @@ class Entry:
|
|||
def as_html(self):
|
||||
html_parts = []
|
||||
styles = set()
|
||||
for result in self.widget:
|
||||
for result in self.widget.widgets:
|
||||
result_html, result_styles = result.as_html()
|
||||
html_parts.append(result_html)
|
||||
styles.update(result_styles)
|
||||
path = tools.path_colored(self.path)
|
||||
padding = " " * (Entry.MAX_WIDTH - len(self.widget) + 1)
|
||||
padding = " " * (Entry.MAX_WIDTH - len(self.widget.widgets) + 1)
|
||||
path_html, path_styles = termstr.TermStr(padding + path).as_html()
|
||||
return "".join(html_parts) + path_html, styles.union(path_styles)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3.9
|
||||
|
||||
|
||||
import asyncio
|
||||
import gzip
|
||||
import http.server
|
||||
import os
|
||||
|
|
@ -80,9 +81,13 @@ def main():
|
|||
"summary.pickle")
|
||||
with gzip.open(pickle_path, "rb") as file_:
|
||||
screen = pickle.load(file_)
|
||||
summary_page = make_summary_page(project_name, screen._summary)
|
||||
summary = screen._summary
|
||||
summary._jobs_added_event = asyncio.Event()
|
||||
for entry in summary._old_entries:
|
||||
summary.add_entry(entry)
|
||||
summary_page = make_summary_page(project_name, summary)
|
||||
index = {}
|
||||
for row in screen._summary._entries:
|
||||
for row in summary._entries:
|
||||
for result in row:
|
||||
index[(result.path[2:], result.tool.__name__)] = result.result
|
||||
run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue