forked from ARCANEDEV/LogViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: stats, local dates, bootstrap 5
- Loading branch information
Showing
19 changed files
with
571 additions
and
772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
206 changes: 72 additions & 134 deletions
206
resources/views/bootstrap-4/show.blade.php → resources/views/bootstrap-5/_log.blade.php
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,10 @@ | |
<meta name="author" content="ARCANEDEV"> | ||
<title>LogViewer - Created by ARCANEDEV</title> | ||
{{-- Styles --}} | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" crossorigin="anonymous"> | ||
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700|Source+Sans+Pro:400,600' rel='stylesheet' type='text/css'> | ||
@include('log-viewer::bootstrap-4._styles') | ||
@include('log-viewer::bootstrap-5._styles') | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-expand-md navbar-dark sticky-top bg-dark p-0"> | ||
|
@@ -56,7 +56,10 @@ | |
<footer class="main-footer"> | ||
<div class="container-fluid d-flex flex-wrap justify-content-between"> | ||
<p class="text-muted"> | ||
LogViewer - <span class="badge badge-info">version {{ log_viewer()->version() }}</span> | ||
<a href="https://github.com/ulcuber/LogViewer/tree/v9.x"> | ||
<i class="bi bi-github"></i> | ||
LogViewer | ||
</a> - <span class="badge text-bg-info">version {{ log_viewer()->version() }}</span> | ||
</p> | ||
<p class="text-muted"> | ||
{{ log_viewer()->memoryString() }} | ||
|
@@ -69,10 +72,38 @@ | |
|
||
{{-- Scripts --}} | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> | ||
{{-- with popper --}} | ||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script> | ||
|
||
<script> | ||
$(() => { | ||
const locale = undefined; | ||
const dateTimeFormat = new Intl.DateTimeFormat(locale, { | ||
dateStyle: 'short', | ||
timeStyle: 'short', | ||
}); | ||
const timeFormat = new Intl.DateTimeFormat(locale, { | ||
timeStyle: 'short', | ||
}); | ||
function local(selector, formatter) { | ||
const elements = document.querySelectorAll(selector); | ||
const dates = Array.from(elements); | ||
el = dates.pop(); | ||
while (el) { | ||
el.textContent = formatter.format( | ||
new Date(el.getAttribute('datetime')) | ||
); | ||
el = dates.pop(); | ||
} | ||
} | ||
local('time.datetime', dateTimeFormat); | ||
local('time.time', timeFormat); | ||
}); | ||
</script> | ||
|
||
@yield('modals') | ||
@yield('scripts') | ||
</body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ces/views/bootstrap-4/dashboard.blade.php → ...ces/views/bootstrap-5/dashboard.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
@extends('log-viewer::bootstrap-5._log') | ||
|
||
@section('section') | ||
<div class="card mb-4"> | ||
@if ($entries->hasPages()) | ||
<div class="card-header"> | ||
<span class="badge text-bg-info float-right"> | ||
{{ trans('log-viewer::general.page') }} {{ $entries->currentPage() }} {{ trans('log-viewer::general.of') }} {{ method_exists($entries, 'lastPage') ? $entries->lastPage() : 'N' }} | ||
</span> | ||
</div> | ||
@endif | ||
|
||
<div class="table-responsive"> | ||
<table id="entries" class="table mb-0"> | ||
<thead> | ||
<tr> | ||
<th>{{ trans('log-viewer::general.info-actions') }}</th> | ||
<th>{{ trans('log-viewer::general.header') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@forelse($entries as $key => $entry) | ||
<tr> | ||
<td> | ||
@foreach ($entry->extra as $propName => $extra) | ||
<a class="badge text-bg-env text-bg-extra-{{ $propName }}" href="{{ route('log-viewer::logs.show', array_merge(request()->input(), ['prefix' => $log->prefix, 'date' => $log->date, $propName => $extra])) }}"> | ||
{{ $extra }} | ||
</a> | ||
@endforeach | ||
<span class="badge text-bg-env">{{ $entry->env }}</span> | ||
<span class="badge text-bg-level-{{ $entry->level }}"> | ||
{!! $entry->level() !!} | ||
</span> | ||
<span class="badge text-bg-secondary"> | ||
<time | ||
class="time" | ||
datetime="{{ $entry->getDatetime()->format('Y-m-d\TH:i:s') . ".000Z" }}" | ||
>{{ $entry->getDatetime()->toTimeString() }}</time> | ||
</span> | ||
|
||
<br/> | ||
|
||
<div class="btn-group"> | ||
<a class="btn btn-sm btn-light" href="{{ route('log-viewer::logs.show', ['prefix' => $log->prefix, 'date' => $log->date, 'level' => $entry->level, 'search' => $entry->header, 'fuzzy' => true]) }}">{{ trans('log-viewer::general.similar') }}</a> | ||
@if (!request('search')) | ||
<a class="btn btn-sm btn-light" href="{{ route($route, array_merge($filters, ['exclude_similar' => array_merge($filters['exclude_similar'] ?? [], [$entry->header])])) }}">{{ trans('log-viewer::general.exclude-similar') }}</a> | ||
@endif | ||
</div> | ||
|
||
@if ($entry->hasContext()) | ||
<a class="btn btn-sm btn-light" role="button" data-bs-toggle="collapse" | ||
href="#log-context-{{ $key }}" aria-expanded="false" aria-controls="log-context-{{ $key }}"> | ||
<i class="bi bi-toggle-on"></i> Context | ||
</a> | ||
@endif | ||
|
||
@if ($entry->hasStack()) | ||
<a class="btn btn-sm btn-light" role="button" data-bs-toggle="collapse" | ||
href="#log-stack-{{ $key }}" aria-expanded="false" aria-controls="log-stack-{{ $key }}"> | ||
<i class="bi bi-toggle-on"></i> Stack | ||
</a> | ||
@endif | ||
</td> | ||
<td> | ||
{{ $entry->header }} | ||
</td> | ||
</tr> | ||
@if ($entry->hasStack() || $entry->hasContext()) | ||
<tr> | ||
<td colspan="5" class="stack py-0"> | ||
@if ($entry->hasContext()) | ||
<div class="stack-content collapse" id="log-context-{{ $key }}"> | ||
<pre>{{ $entry->context() }}</pre> | ||
</div> | ||
@endif | ||
|
||
@if ($entry->hasStack()) | ||
<div class="stack-content collapse" id="log-stack-{{ $key }}"> | ||
{!! $entry->stack() !!} | ||
</div> | ||
@endif | ||
</td> | ||
</tr> | ||
@endif | ||
@empty | ||
<tr> | ||
<td colspan="5" class="text-center"> | ||
<span class="badge text-bg-secondary">{{ trans('log-viewer::general.empty-logs') }}</span> | ||
</td> | ||
</tr> | ||
@endforelse | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
{!! $entries->appends(compact('search'))->render(method_exists($entries, 'total') ? 'pagination::bootstrap-5' : 'pagination::simple-bootstrap-5') !!} | ||
@endsection |
Oops, something went wrong.