2020-05-01 16:29:28 +02:00
|
|
|
{% extends 'layouts/app.twig' %}
|
|
|
|
{% import 'macros/base.twig' as m %}
|
|
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
|
|
|
|
{% set title %}{% block title %}{{ __('log.log') }}{% endblock %}{% endset %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h1>{{ block('title') }}</h1>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2021-07-24 20:42:19 +02:00
|
|
|
<div class="mb-3">
|
2022-12-10 02:24:20 +01:00
|
|
|
<form method="post" action="{{ url('/admin/logs') }}" class="form-inline">
|
2020-05-01 16:29:28 +02:00
|
|
|
{{ csrf() }}
|
|
|
|
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.input('search', __('form.search'), {
|
|
|
|
'value': search,
|
|
|
|
'hide_label': true,
|
|
|
|
}) }}
|
2020-05-01 16:29:28 +02:00
|
|
|
|
|
|
|
{{ f.submit(__('form.search')) }}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
<tr>
|
|
|
|
<th>{{ __('log.time') }}</th>
|
|
|
|
<th>{{ __('log.level') }}</th>
|
|
|
|
<th>{{ __('log.message') }}</th>
|
|
|
|
</tr>
|
|
|
|
{% for entry in entries %}
|
|
|
|
{%- set type = 'default' %}
|
|
|
|
{%- if entry.level in ['notice', 'info'] %}
|
|
|
|
{%- set type = 'info' %}
|
|
|
|
{%- endif %}
|
|
|
|
{%- if entry.level in ['error', 'warning'] %}
|
|
|
|
{%- set type = 'warning' %}
|
|
|
|
{%- endif %}
|
|
|
|
{%- if entry.level in ['emergency', 'alert', 'critical'] %}
|
|
|
|
{%- set type = 'danger' %}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
{%- set td_type = '' %}
|
|
|
|
{%- if type in ['warning', 'danger'] %}
|
|
|
|
{%- set td_type = type %}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
<tr>
|
2021-07-24 17:04:45 +02:00
|
|
|
<td class="table-{{ td_type }}">{{ entry.created_at.format(__('Y-m-d H:i')) }}</td>
|
|
|
|
<td class="table-{{ td_type }}">
|
2021-04-17 14:49:53 +02:00
|
|
|
<span class="badge bg-{{ type }}">{{ entry.level|capitalize }}</span> <!-- //todo bs5 -->
|
2020-05-01 16:29:28 +02:00
|
|
|
</td>
|
|
|
|
<td>{{ entry.message|nl2br }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|