Improve user experience of error viewer

This commit is contained in:
Tim 2019-09-02 17:58:36 +02:00
parent b847b3fba4
commit 033edcb345

View File

@ -1,21 +1,26 @@
{% extends '@ArdentLogger/layout.html.twig' %}
{% block ardent_logger_user_content %}
Error overview <br>
<div class="m-3">
<h2>Error overview</h2><br>
{% for log in logs %}
{# @var log \App\Ardent\LoggerBundle\Entity\LogEntry #}
<div class="card">
<div class="card-header bg-dark text-white" role="button" data-toggle="collapse" data-target="#log-body{{ log.id }}">{{ log.levelName }} #{{ log.id }}</div>
<div class="card-body collapse" id="log-body{{ log.id }}">
<p class="card-text">{{ log.message }}</p>
<ul class="list-group list-group-flush">
{% for context in log.context %}
<li class="list-group-item">{{ context }}</li>
{% endfor %}
</ul>
{% for log in logs %}
{# @var log \App\Ardent\LoggerBundle\Entity\LogEntry #}
<div class="card">
<div class="card-header bg-secondary" role="button" data-toggle="collapse" data-target="#log-body{{ log.id }}" style="cursor: pointer">
{{ log.levelName }} #{{ log.id }}
<span class="float-right">Click to expand</span>
</div>
<div class="card-body collapse" id="log-body{{ log.id }}">
<p class="card-text">{{ log.message }}</p>
<ul class="list-group list-group-flush">
{% for context in log.context %}
<li class="list-group-item">{{ context }}</li>
{% endfor %}
</ul>
</div>
<div class="card-footer">{{ log.createdAt | date('D, d M y H:i:s') }} </div>
</div>
<div class="card-footer">{{ log.createdAt | date('D, d M y H:i:s') }} </div>
</div>
{% endfor %}
{% endfor %}
</div>
{% endblock %}