Skip to content

Commit

Permalink
Vendor publishes
Browse files Browse the repository at this point in the history
  • Loading branch information
libern committed Apr 25, 2019
1 parent 591b7a4 commit 9fa9ee4
Show file tree
Hide file tree
Showing 23 changed files with 212 additions and 168 deletions.
Empty file.
117 changes: 83 additions & 34 deletions resources/views/vendor/laravel-log-viewer/log.blade.php
Expand Up @@ -3,19 +3,13 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex, nofollow">
<title>Laravel log viewer</title>

<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap4.min.css">


<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
body {
padding: 25px;
Expand All @@ -39,7 +33,6 @@
font-size: 0.7rem;
}
.stack {
font-size: 0.85em;
}
Expand All @@ -61,6 +54,19 @@
.list-group-item {
word-wrap: break-word;
}
.folder {
padding-top: 15px;
}
.div-scroll {
height: 80vh;
overflow: hidden auto;
}
.nowrap {
white-space: nowrap;
}
</style>
</head>
<body>
Expand All @@ -69,7 +75,24 @@
<div class="col sidebar mb-3">
<h1><i class="fa fa-calendar" aria-hidden="true"></i> Laravel Log Viewer</h1>
<p class="text-muted"><i>by Rap2h</i></p>
<div class="list-group">
<div class="list-group div-scroll">
@foreach($folders as $folder)
<div class="list-group-item">
<a href="?f={{ \Illuminate\Support\Facades\Crypt::encrypt($folder) }}">
<span class="fa fa-folder"></span> {{$folder}}
</a>
@if ($current_folder == $folder)
<div class="list-group folder">
@foreach($folder_files as $file)
<a href="?l={{ \Illuminate\Support\Facades\Crypt::encrypt($file) }}&f={{ \Illuminate\Support\Facades\Crypt::encrypt($folder) }}"
class="list-group-item @if ($current_file == $file) llv-active @endif">
{{$file}}
</a>
@endforeach
</div>
@endif
</div>
@endforeach
@foreach($files as $file)
<a href="?l={{ \Illuminate\Support\Facades\Crypt::encrypt($file) }}"
class="list-group-item @if ($current_file == $file) llv-active @endif">
Expand All @@ -84,33 +107,47 @@ class="list-group-item @if ($current_file == $file) llv-active @endif">
Log file >50M, please download it.
</div>
@else
<table id="table-log" class="table table-striped">
<table id="table-log" class="table table-striped" data-ordering-index="{{ $standardFormat ? 2 : 0 }}">
<thead>
<tr>
<th>Level</th>
<th>Context</th>
<th>Date</th>
@if ($standardFormat)
<th>Level</th>
<th>Context</th>
<th>Date</th>
@else
<th>Line number</th>
@endif
<th>Content</th>
</tr>
</thead>
<tbody>

@foreach($logs as $key => $log)
<tr data-display="stack{{{$key}}}">
<td class="text-{{{$log['level_class']}}}"><span class="fa fa-{{{$log['level_img']}}}"
aria-hidden="true"></span> &nbsp;{{$log['level']}}</td>
<td class="text">{{$log['context']}}</td>
@if ($standardFormat)
<td class="nowrap text-{{{$log['level_class']}}}">
<span class="fa fa-{{{$log['level_img']}}}" aria-hidden="true"></span>&nbsp;&nbsp;{{$log['level']}}
</td>
<td class="text">{{$log['context']}}</td>
@endif
<td class="date">{{{$log['date']}}}</td>
<td class="text">
@if ($log['stack']) <button type="button" class="float-right expand btn btn-outline-dark btn-sm mb-2 ml-2"
data-display="stack{{{$key}}}"><span
class="fa fa-search"></span></button>@endif
@if ($log['stack'])
<button type="button"
class="float-right expand btn btn-outline-dark btn-sm mb-2 ml-2"
data-display="stack{{{$key}}}">
<span class="fa fa-search"></span>
</button>
@endif
{{{$log['text']}}}
@if (isset($log['in_file'])) <br/>{{{$log['in_file']}}}@endif
@if (isset($log['in_file']))
<br/>{{{$log['in_file']}}}
@endif
@if ($log['stack'])
<div class="stack" id="stack{{{$key}}}"
style="display: none; white-space: pre-wrap;">{{{ trim($log['stack']) }}}
</div>@endif
</div>
@endif
</td>
</tr>
@endforeach
Expand All @@ -120,23 +157,35 @@ class="fa fa-search"></span></button>@endif
@endif
<div class="p-3">
@if($current_file)
<a href="?dl={{ \Illuminate\Support\Facades\Crypt::encrypt($current_file) }}"><span class="fa fa-download"></span>
Download file</a>
<a href="?dl={{ \Illuminate\Support\Facades\Crypt::encrypt($current_folder ? $current_folder . "/" . $current_file : $current_file) }}{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">
<span class="fa fa-download"></span> Download file
</a>
-
<a id="clean-log" href="?clean={{ \Illuminate\Support\Facades\Crypt::encrypt($current_folder ? $current_folder . "/" . $current_file : $current_file) }}{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">
<span class="fa fa-sync"></span> Clean file
</a>
-
<a id="delete-log" href="?del={{ \Illuminate\Support\Facades\Crypt::encrypt($current_file) }}"><span
class="fa fa-trash"></span> Delete file</a>
<a id="delete-log" href="?del={{ \Illuminate\Support\Facades\Crypt::encrypt($current_folder ? $current_folder . "/" . $current_file : $current_file) }}{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">
<span class="fa fa-trash"></span> Delete file
</a>
@if(count($files) > 1)
-
<a id="delete-all-log" href="?delall=true"><span class="fa fa-trash"></span> Delete all files</a>
<a id="delete-all-log" href="?delall=true{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">
<span class="fa fa-trash-alt"></span> Delete all files
</a>
@endif
@endif
</div>
</div>
</div>
</div>
<!-- jQuery for Bootstrap -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<!-- FontAwesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<!-- Datatables -->
Expand All @@ -148,7 +197,7 @@ class="fa fa-trash"></span> Delete file</a>
$('#' + $(this).data('display')).toggle();
});
$('#table-log').DataTable({
"order": [1, 'desc'],
"order": [$('#table-log').data('orderingIndex'), 'desc'],
"stateSave": true,
"stateSaveCallback": function (settings, data) {
window.localStorage.setItem("datatable", JSON.stringify(data));
Expand All @@ -159,7 +208,7 @@ class="fa fa-trash"></span> Delete file</a>
return data;
}
});
$('#delete-log, #delete-all-log').click(function () {
$('#delete-log, #clean-log, #delete-all-log').click(function () {
return confirm('Are you sure?');
});
});
Expand Down
2 changes: 1 addition & 1 deletion resources/views/vendor/mail/html/button.blade.php
Expand Up @@ -7,7 +7,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="{{ $url }}" class="button button-{{ $color or 'blue' }}" target="_blank">{{ $slot }}</a>
<a href="{{ $url }}" class="button button-{{ $color ?? 'primary' }}" target="_blank">{{ $slot }}</a>
</td>
</tr>
</table>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/vendor/mail/html/layout.blade.php
Expand Up @@ -27,7 +27,7 @@
<tr>
<td align="center">
<table class="content" width="100%" cellpadding="0" cellspacing="0">
{{ $header or '' }}
{{ $header ?? '' }}

<!-- Email Body -->
<tr>
Expand All @@ -38,14 +38,14 @@
<td class="content-cell">
{{ Illuminate\Mail\Markdown::parse($slot) }}

{{ $subcopy or '' }}
{{ $subcopy ?? '' }}
</td>
</tr>
</table>
</td>
</tr>

{{ $footer or '' }}
{{ $footer ?? '' }}
</table>
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/vendor/mail/html/message.blade.php
Expand Up @@ -10,18 +10,18 @@
{{ $slot }}

{{-- Subcopy --}}
@if (isset($subcopy))
@isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
@endif
@endisset

{{-- Footer --}}
@slot('footer')
@component('mail::footer')
&copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
@endcomponent
@endslot
@endcomponent

0 comments on commit 9fa9ee4

Please sign in to comment.