backoffice: fix logged error exception message display (#59663)
gitea-wip/wcs/pipeline/head Build started... Details

This commit is contained in:
Lauréline Guérin 2021-12-14 14:29:20 +01:00
parent 8106d89fec
commit 47e1a757e2
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
2 changed files with 4 additions and 1 deletions

View File

@ -109,6 +109,8 @@ def test_listing_paginations(pub):
# standalone error
error = pub.loggederror_class()
error.summary = 'Lonely Logged Error'
error.exception_class = 'Exception'
error.exception_message = 'foo bar'
error.first_occurence_timestamp = datetime.datetime.now()
error.occurences_count = 17654032
error.store()
@ -122,6 +124,7 @@ def test_listing_paginations(pub):
resp = app.get('/backoffice/studio/logged-errors/')
assert '1-20/67' in resp.text
assert resp.text.count('Lonely Logged Error') == 1
assert '<span class="extra-info">- Exception (foo bar)</span>' in resp.text
assert '<span class="badge">17,654,032</span>' in resp.text
assert resp.text.count('Logged Error n°') == 19
resp = resp.click(href=r'\?offset=60')

View File

@ -8,7 +8,7 @@
{% for error in errors %}
<li><a href="{{ error.id }}/">{{ error.summary }}
{% if error.exception_class or error.exception_message %}
<span class="extra-info">- {{error.exception_class}} ({{error.exception_message}}</span>
<span class="extra-info">- {{error.exception_class}} ({{error.exception_message}})</span>
{% endif %}
</a><span class="badge">{{ error.formatted_occurences_count }}</span></li>
{% endfor %}