Fix sources template rendering
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def test_templates_do_not_slice_filter_results_inline():
|
||||||
|
template_dir = Path("webui/app/templates")
|
||||||
|
offenders = []
|
||||||
|
for template in template_dir.glob("*.html"):
|
||||||
|
content = template.read_text()
|
||||||
|
if "| default(" in content and ")[" in content:
|
||||||
|
offenders.append(str(template))
|
||||||
|
|
||||||
|
assert offenders == []
|
||||||
@@ -48,9 +48,9 @@
|
|||||||
{% for src in sources %}
|
{% for src in sources %}
|
||||||
<div class="source-card">
|
<div class="source-card">
|
||||||
<strong>{{ src.library_id | default('unknown') }}</strong><br>
|
<strong>{{ src.library_id | default('unknown') }}</strong><br>
|
||||||
URL: {{ src.repo_url | default('N/A')[:60] }}<br>
|
URL: {{ src.repo_url | default('N/A') }}<br>
|
||||||
Branch: {{ src.branch | default('main') }}<br>
|
Branch: {{ src.branch | default('main') }}<br>
|
||||||
Include: {{ (src.include_paths | default(['*']) | join(', ')) }}
|
Include: {{ src.include_paths | default(['*']) | join(', ') }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user