Upgrade boilerplate

This commit is contained in:
Ludovic CANDELLIER
2021-09-22 21:01:43 +02:00
parent ffb9f81353
commit e98266e556
56 changed files with 1477 additions and 701 deletions

View File

@@ -13,7 +13,7 @@
@section('content')
<div class="row">
<div class="col-12 py-2 sticky-toolbar">
<div class="col-12 pb-3">
<a href="{{ route('boilerplate.logs.list') }}" class="btn btn-default">
<span class="far fa-arrow-alt-circle-left text-muted"></span>
</a>
@@ -28,127 +28,79 @@
</span>
</span>
</div>
<div class="col-12">
<div class="col-3">
@component('boilerplate::card', ['title' => __('boilerplate::logs.show.levels'), 'color' => 'info'])
@include('boilerplate::logs._partials.levels')
@endcomponent
@component('boilerplate::card', ['title' => __('boilerplate::logs.show.loginfo'), 'color' => 'warning'])
@include('boilerplate::logs._partials.informations')
@endcomponent
</div>
<div class="col-9">
@component('boilerplate::card', ['title' => ucfirst(__('boilerplate::logs.show.file', ['date' => $date]))])
<div class="row">
<div class="col-md-2">
@include('boilerplate::logs._partials.menu')
</div>
<div class="col-md-10">
<div class="card no-shadow">
<div class="card-header bg-gray font-weight-bold py-1">
{{ __('boilerplate::logs.show.loginfo') }}
</div>
<div class="card-body py-1 px-0">
<div class="table-responsive">
<table class="table no-border table-sm mb-0">
<tbody>
<tr class="border-bottom">
<td class="pl-2">{{ __('boilerplate::logs.show.filepath') }}</td>
<td colspan="7">{{ $log->getPath() }}</td>
</tr>
<tr>
<td class="pl-2">{{ __('boilerplate::logs.show.logentries') }}</td>
<td>
<span class="badge badge-pill badge-secondary">{{ $entries->total() }}</span>
</td>
<td>{{ __('boilerplate::logs.show.size') }}</td>
<td>
<span class="badge badge-pill badge-secondary">{{ $log->size() }}</span>
</td>
<td>{{ __('boilerplate::logs.show.createdat') }}</td>
<td>
<span class="badge badge-pill badge-secondary">
{{ $log->createdAt()->isoFormat(__('boilerplate::date.YmdHis')) }}
</span>
</td>
<td>{{ __('boilerplate::logs.show.updatedat') }}</td>
<td>
<span class="badge badge-pill badge-secondary">
{{ $log->updatedAt()->isoFormat(__('boilerplate::date.YmdHis')) }}
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@if ($entries->hasPages())
<div class="d-flex justify-content-between text-sm align-items-center mb-3">
<span class="text-sm text-muted ">
{{ __('boilerplate::logs.show.page', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()]) }}
<div class="table-responsive">
<table id="entries" class="table table-sm">
<thead>
<tr class="text-center">
<th>{{ __('boilerplate::logs.show.env') }}</th>
<th style="width: 120px;">{{ __('boilerplate::logs.show.level') }}</th>
<th style="width: 65px;">{{ __('boilerplate::logs.show.time') }}</th>
<th>{{ __('boilerplate::logs.show.header') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($entries as $key => $entry)
<tr class="{{ $key %2 ? 'even' : 'odd' }}">
<td class="px-2">
<span class="badge badge-pill bg-purple">
{{ $entry->env }}
</span>
{!! $entries->render() !!}
</div>
@endif
<div class="table-responsive">
<table id="entries" class="table table-hover table-sm border-left border-right">
<thead class="bg-gray">
<tr class="text-center">
<th>{{ __('boilerplate::logs.show.env') }}</th>
<th style="width: 120px;">{{ __('boilerplate::logs.show.level') }}</th>
<th style="width: 65px;">{{ __('boilerplate::logs.show.time') }}</th>
<th>{{ __('boilerplate::logs.show.header') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($entries as $key => $entry)
<tr class="{{ $key %2 ? 'even' : 'odd' }}">
<td class="px-2">
<span class="badge badge-pill bg-purple">
{{ $entry->env }}
</span>
</td>
<td class="px-2">
<span class="badge badge-pill level-{{ $entry->level }}">
{!! $entry->level() !!}
</span>
</td>
<td class="px-2">
<span class="badge badge-pill bg-secondary">
{{ $entry->datetime->format('H:i:s') }}
</span>
</td>
<td class="text-sm">
{{ $entry->header }}
</td>
<td class="text-right px-2">
@if ($entry->hasStack())
<a class="btn btn-xs btn-default" role="button" data-toggle="collapse" href="#log-stack-{{ $key }}" aria-expanded="false" aria-controls="log-stack-{{ $key }}">
Stack
</a>
@endif
</td>
</tr>
@if ($entry->hasStack())
<tr>
<td colspan="5" class="stack">
<div class="stack-content collapse" id="log-stack-{{ $key }}">
{!! preg_replace('`#([0-9]*)\s`', "<br /><strong>#$1</strong> ", $entry->stack()) !!}
</div>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
@if ($entries->hasPages())
<div class="panel-footer d-flex justify-content-between align-items-center text-sm">
<span class="pull-right small text-muted mtm">
{{ __('boilerplate::logs.show.page', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()]) }}
</td>
<td class="px-2">
<span class="badge badge-pill level-{{ $entry->level }}">
{!! $entry->level() !!}
</span>
{!! $entries->render() !!}
</div>
</td>
<td class="px-2">
<span class="badge badge-pill bg-secondary">
{{ $entry->datetime->format('H:i:s') }}
</span>
</td>
<td class="text-sm">
{{ $entry->header }}
</td>
<td class="text-right px-2">
@if ($entry->hasStack())
<a class="btn btn-xs btn-default" role="button" data-toggle="collapse" href="#log-stack-{{ $key }}" aria-expanded="false" aria-controls="log-stack-{{ $key }}">
Stack
</a>
@endif
</td>
</tr>
@if ($entry->hasStack())
<tr class="log-stack {{ $key %2 ? 'even' : 'odd' }}">
<td colspan="5" class="stack">
<div class="stack-content collapse" id="log-stack-{{ $key }}">
{!! preg_replace('`#([0-9]*)\s`', "<br /><strong>#$1</strong> ", $entry->stack()) !!}
</div>
</td>
</tr>
@endif
</div>
@endforeach
</tbody>
</table>
</div>
@if ($entries->hasPages())
<div class="panel-footer d-flex justify-content-between align-items-center text-sm">
<span class="pull-right small text-muted mtm">
{{ __('boilerplate::logs.show.page', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()]) }}
</span>
{!! $entries->render() !!}
</div>
@endif
@slot('footer')
<div class="text-muted text-right small">
{!! __('boilerplate::logs.vendor') !!}