Add performance warning for large collections in collection_detail template
This commit is contained in:
@@ -19,6 +19,11 @@
|
|||||||
<h2 class="card-title mb-2">{{ collection.name }}</h2>
|
<h2 class="card-title mb-2">{{ collection.name }}</h2>
|
||||||
|
|
||||||
{% include 'exam_notes.html' %}
|
{% include 'exam_notes.html' %}
|
||||||
|
{% if casesdetails|length > 20 %}
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
<strong>Performance warning:</strong> This collection contains {{ casesdetails|length }} cases — in some situations this may adversely affect performance, all features will still work but page loading may be slower. Consider splitting into smaller collections if performance is an issue.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<p class="mb-1">
|
<p class="mb-1">
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="">
|
<div class="">
|
||||||
<h2>404 error</h2>
|
<h2>404 error</h2>
|
||||||
|
{% if request.user.is_staff%}
|
||||||
{% if reason %}
|
{% if reason %}
|
||||||
{{ reason }}
|
{{ reason }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -10,5 +11,6 @@
|
|||||||
{% if resolved %}
|
{% if resolved %}
|
||||||
<h3>{{ resolved }}</h3>
|
<h3>{{ resolved }}</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user