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