feat: Add timestamps to instance health check
This commit is contained in:
parent
1282b6b201
commit
6844e771b5
@ -24,6 +24,28 @@
|
|||||||
<p>{% translate "Texte scheinen vollständig" %}</p>
|
<p>{% translate "Texte scheinen vollständig" %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<h2>{% trans "Zeitstempel" %}</h2>
|
||||||
|
{% if timestamps|length > 0 %}
|
||||||
|
<p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>{% translate "Key" %}</th>
|
||||||
|
<th>{% translate "Zeitstempel" %}</th>
|
||||||
|
<th>{% translate "Daten" %}</th>
|
||||||
|
</tr>
|
||||||
|
{% for timestamp in timestamps %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ timestamp.key }}</td>
|
||||||
|
<td>{{ timestamp.timestamp }}</td>
|
||||||
|
<td>{{ timestamp.data }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<p>{% translate "Keine Zeitstempel geloggt." %}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<h2>{% translate "Nicht-lokalisierte Vermittlungen" %}</h2>
|
<h2>{% translate "Nicht-lokalisierte Vermittlungen" %}</h2>
|
||||||
{% if number_not_geocoded_adoption_notices > 0 %}
|
{% if number_not_geocoded_adoption_notices > 0 %}
|
||||||
<details>
|
<details>
|
||||||
|
@ -14,7 +14,7 @@ from notfellchen import settings
|
|||||||
from fellchensammlung import logger
|
from fellchensammlung import logger
|
||||||
from .models import AdoptionNotice, Text, Animal, Rule, Image, Report, ModerationAction, \
|
from .models import AdoptionNotice, Text, Animal, Rule, Image, Report, ModerationAction, \
|
||||||
User, Location, AdoptionNoticeStatus, Subscriptions, CommentNotification, BaseNotification, RescueOrganization, \
|
User, Location, AdoptionNoticeStatus, Subscriptions, CommentNotification, BaseNotification, RescueOrganization, \
|
||||||
Species, Log
|
Species, Log, Timestamp
|
||||||
from .forms import AdoptionNoticeForm, AdoptionNoticeFormWithDateWidget, ImageForm, ReportAdoptionNoticeForm, \
|
from .forms import AdoptionNoticeForm, AdoptionNoticeFormWithDateWidget, ImageForm, ReportAdoptionNoticeForm, \
|
||||||
CommentForm, ReportCommentForm, AnimalForm, \
|
CommentForm, ReportCommentForm, AnimalForm, \
|
||||||
AdoptionNoticeSearchForm, AnimalFormWithDateWidget, AdoptionNoticeFormWithDateWidgetAutoAnimal
|
AdoptionNoticeSearchForm, AnimalFormWithDateWidget, AdoptionNoticeFormWithDateWidgetAutoAnimal
|
||||||
@ -522,6 +522,9 @@ def instance_health_check(request):
|
|||||||
except Text.DoesNotExist:
|
except Text.DoesNotExist:
|
||||||
missing_texts.append((text_code, language))
|
missing_texts.append((text_code, language))
|
||||||
|
|
||||||
|
# Timestamps
|
||||||
|
timestamps = Timestamp.objects.all()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"number_of_adoption_notices": number_of_adoption_notices,
|
"number_of_adoption_notices": number_of_adoption_notices,
|
||||||
"number_not_geocoded_adoption_notices": number_not_geocoded_adoption_notices,
|
"number_not_geocoded_adoption_notices": number_not_geocoded_adoption_notices,
|
||||||
@ -531,7 +534,8 @@ def instance_health_check(request):
|
|||||||
"none_geocoded_rescue_orgs": none_geocoded_rescue_orgs,
|
"none_geocoded_rescue_orgs": none_geocoded_rescue_orgs,
|
||||||
"missing_texts": missing_texts,
|
"missing_texts": missing_texts,
|
||||||
"number_unchecked_ans": number_unchecked_ans,
|
"number_unchecked_ans": number_unchecked_ans,
|
||||||
"unchecked_ans": unchecked_ans
|
"unchecked_ans": unchecked_ans,
|
||||||
|
"timestamps": timestamps
|
||||||
}
|
}
|
||||||
|
|
||||||
return render(request, 'fellchensammlung/instance-health-check.html', context=context)
|
return render(request, 'fellchensammlung/instance-health-check.html', context=context)
|
||||||
|
Loading…
Reference in New Issue
Block a user