Enhance DOM graph visualization to support PNG images and improve legend display

This commit is contained in:
Benedikt Willi 2026-01-13 14:24:00 +01:00
parent ce5dbff562
commit a65aaac61b

View file

@ -179,7 +179,7 @@
<div class="error"> <div class="error">
{{ error }} {{ error }}
</div> </div>
{% elif is_svg %} {% elif is_svg or is_png %}
<div class="legend"> <div class="legend">
<h3>Color Legend</h3> <h3>Color Legend</h3>
<div class="legend-grid"> <div class="legend-grid">
@ -210,8 +210,12 @@
</div> </div>
</div> </div>
<div class="graph-wrapper"> <div class="graph-wrapper" {% if is_png %}style="display: block; width: 100%;"{% endif %}>
{% if is_png %}
<img src="data:image/png;base64,{{ graph_content }}" alt="DOM Graph" style="max-width: 100%; height: auto; display: block;">
{% else %}
{{ graph_content|safe }} {{ graph_content|safe }}
{% endif %}
</div> </div>
{% else %} {% else %}
<div class="install-note"> <div class="install-note">