Fix UI issue
Build Docker Image / docker (push) Successful in 6s

This commit is contained in:
2026-04-09 11:35:04 -07:00
parent 8600ee9c27
commit 9e87bc4453
+24 -23
View File
@@ -96,29 +96,30 @@ class StreamlitOutputBuffer(io.TextIOBase):
visible_lines.append(self.current_line)
visible_lines = visible_lines[-self.max_lines :]
content = html.escape("\n".join(visible_lines))
self.placeholder.caption("Scan Details")
components.html(
f"""
<div id="scan-details" style="
height: {self.height}px;
overflow-y: auto;
white-space: pre-wrap;
font-family: monospace;
font-size: 0.9rem;
padding: 0.75rem;
border: 1px solid rgba(49, 51, 63, 0.2);
border-radius: 0.5rem;
background: white;
">{content}</div>
<script>
const el = document.getElementById("scan-details");
if (el) {{
el.scrollTop = el.scrollHeight;
}}
</script>
""",
height=self.height + 16,
)
with self.placeholder.container():
st.caption("Scan Details")
components.html(
f"""
<div id="scan-details" style="
height: {self.height}px;
overflow-y: auto;
white-space: pre-wrap;
font-family: monospace;
font-size: 0.9rem;
padding: 0.75rem;
border: 1px solid rgba(49, 51, 63, 0.2);
border-radius: 0.5rem;
background: white;
">{content}</div>
<script>
const el = document.getElementById("scan-details");
if (el) {{
el.scrollTop = el.scrollHeight;
}}
</script>
""",
height=self.height + 16,
)
def getvalue(self) -> str:
visible_lines = list(self.lines)