Skip to content

Commit

Permalink
Don't show the content of artifacts larger than 500kB
Browse files Browse the repository at this point in the history
  • Loading branch information
U039b committed Sep 21, 2024
1 parent 149d41d commit 946125d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions colander/templates/artifact/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,12 @@ <h3 class="card-title ">Artifact integrity check</h3>
</video>
</div>
{% elif artifact.mime_type == "text/plain" or artifact.mime_type == "application/json" or artifact.mime_type == "application/xml" %}
<div class="col-md-10 mt-2">
<pre class="bg-dark text-white rounded-2 p-2 colander-text-editor"><code>{% for l in artifact.file.readlines %}{{ l.decode }}{% endfor %}</code></pre>
</div>
{% if artifact.size_in_bytes < 500000 %}
<div class="col-md-12 mt-4 mb-2">
<h3>Content</h3>
<pre class="bg-dark text-white rounded-2 p-2 colander-text-editor"><code>{% for l in artifact.file.readlines %}{{ l.decode }}{% endfor %}</code></pre>
</div>
{% endif %}
{% endif %}
</div>

Expand Down

0 comments on commit 946125d

Please sign in to comment.