ДОработка html формата
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "plba"
|
name = "plba"
|
||||||
version = "0.3.8"
|
version = "0.3.10"
|
||||||
description = "Platform runtime for business applications"
|
description = "Platform runtime for business applications"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class TraceResponseRenderer:
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
font: 15px/1.45 "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
|
font: 12px/1 "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
|
||||||
}}
|
}}
|
||||||
.page {{
|
.page {{
|
||||||
padding: 14px 16px 24px;
|
padding: 14px 16px 24px;
|
||||||
@@ -186,6 +186,7 @@ class TraceResponseRenderer:
|
|||||||
lines.append(self._html_plain_line(""))
|
lines.append(self._html_plain_line(""))
|
||||||
elif current_step != previous_step:
|
elif current_step != previous_step:
|
||||||
lines.append(self._html_plain_line(""))
|
lines.append(self._html_plain_line(""))
|
||||||
|
lines.append(self._html_plain_line("--------------------------------------------------"))
|
||||||
lines.append(self._html_plain_line(escape(current_step)))
|
lines.append(self._html_plain_line(escape(current_step)))
|
||||||
lines.append(self._html_plain_line(""))
|
lines.append(self._html_plain_line(""))
|
||||||
previous_step = current_step
|
previous_step = current_step
|
||||||
|
|||||||
@@ -204,12 +204,14 @@ def test_trace_endpoint_returns_html_page_with_related_links() -> None:
|
|||||||
assert "background: var(--bg);" in response.text
|
assert "background: var(--bg);" in response.text
|
||||||
assert "--bg: #000000;" in response.text
|
assert "--bg: #000000;" in response.text
|
||||||
assert "--fg: #cfcfc2;" in response.text
|
assert "--fg: #cfcfc2;" in response.text
|
||||||
|
assert 'font: 12px/1 "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;' in response.text
|
||||||
assert '<div class="line">trace_id: <a href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">trace-1</a></div>' in response.text
|
assert '<div class="line">trace_id: <a href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">trace-1</a></div>' in response.text
|
||||||
assert '<div class="line">parent_id: <a href="/traces/parent-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">parent-1</a></div>' in response.text
|
assert '<div class="line">parent_id: <a href="/traces/parent-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">parent-1</a></div>' in response.text
|
||||||
assert '<div class="line">child_ids:</div>' in response.text
|
assert '<div class="line">child_ids:</div>' in response.text
|
||||||
assert '<div class="line"> - <a href="/traces/child-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">child-1</a></div>' in response.text
|
assert '<div class="line"> - <a href="/traces/child-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">child-1</a></div>' in response.text
|
||||||
assert '<div class="line"> - <a href="/traces/child-2?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">child-2</a></div>' in response.text
|
assert '<div class="line"> - <a href="/traces/child-2?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true">child-2</a></div>' in response.text
|
||||||
assert '<div class="line">load_stocks</div>' in response.text
|
assert '<div class="line">load_stocks</div>' in response.text
|
||||||
|
assert '<div class="line">--------------------------------------------------</div>' in response.text
|
||||||
assert '<div class="line">filter_stocks</div>' in response.text
|
assert '<div class="line">filter_stocks</div>' in response.text
|
||||||
assert "loaded prices" in response.text
|
assert "loaded prices" in response.text
|
||||||
assert "filtered suspicious ticker" in response.text
|
assert "filtered suspicious ticker" in response.text
|
||||||
|
|||||||
Reference in New Issue
Block a user