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,12 +1,16 @@
{% 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">
{{ log.levelName }} #{{ log.id }}
<span class="float-right">Click to expand</span>
</div>
<div class="card-body collapse" id="log-body{{ log.id }}"> <div class="card-body collapse" id="log-body{{ log.id }}">
<p class="card-text">{{ log.message }}</p> <p class="card-text">{{ log.message }}</p>
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
@ -18,4 +22,5 @@
<div class="card-footer">{{ log.createdAt | date('D, d M y H:i:s') }} </div> <div class="card-footer">{{ log.createdAt | date('D, d M y H:i:s') }} </div>
</div> </div>
{% endfor %} {% endfor %}
</div>
{% endblock %} {% endblock %}