| 77 | def h2withId(title, sectionId): return f"<h2 id={sectionId}>{title}</h2>\n" |
| 78 | def p(text, size="16px"): return f'<p style="font-size:{size}; font-weight:normal">{text}</p>\n' |
| 79 | def summaryTable(summary): |
| 80 | s = '<table class="summary-table">\n' |
| 81 | for item in summary: |
| 82 | key, value, id = item["title"], item["value"], item["id"] |
| 83 | s += '<tr class="summary-row">' |
| 84 | if id is None: |
| 85 | s += f'<td class="key">{key}</td>' |
| 86 | else: |
| 87 | s += f'<td class="key"><a href="#{id}">{key}</a></td>' |
| 88 | s += f'<td class="value">{value}</td>\n' |
| 89 | s += "</table>\n" |
| 90 | return s |
| 91 | def issueTable(issues): |
| 92 | s = '<table style="font-size:18px; font-weight:normal; width: 100%; table-layout: fixed;" class="issue-table">\n' |
| 93 | s += '<thead>\n<tr>\n<th style="width: 85%;">Issue</th>\n<th style="width: 15%;">Severity</th>\n</tr>\n</thead>\n' |