MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / issueTable

Function issueTable

python/cli/diagnose/html.py:91–116  ·  view source on GitHub ↗
(issues)

Source from the content-addressed store, hash-verified

89 s += "</table>\n"
90 return s
91def 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'
94 s += '<tbody>\n'
95
96 for issue in issues:
97 msg = issue["message"]
98 severity = issue["diagnosis"]
99
100 if severity == "error":
101 style = 'font-weight: bold; background-color: #f06262; text-align: center;'
102 label = "Critical"
103 elif severity == "warning":
104 style = 'font-weight: bold; background-color: #fcb88b; text-align: center;'
105 label = "Warning"
106 elif severity == "ok":
107 style = 'font-weight: bold; background-color: #b0e0b0; text-align: center;'
108 label = "OK"
109 else:
110 style = 'text-align: center;'
111 label = severity.capitalize()
112
113 s += f'<tr>\n<td>{msg}</td>\n<td style="{style}">{label}</td>\n</tr>\n'
114
115 s += '</tbody>\n</table>\n'
116 return s
117
118def passed(v, large=True):
119 if v:

Callers 1

generateSensorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected