-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated Aryeh’s Logbook. More prettier
- Loading branch information
Erin Dalzell
authored and
Erin Dalzell
committed
Dec 12, 2017
1 parent
e2f8736
commit f2b101d
Showing
11 changed files
with
185 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
.idea | ||
Thumbs.db |
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,6 @@ | ||
{ | ||
"name": "edalzell/powertools", | ||
"require": { | ||
"rap2hpoutre/laravel-log-viewer": "*" | ||
} | ||
} |
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,16 @@ | ||
document.addEventListener('DOMContentLoaded', function(e) { | ||
|
||
$('#logbook .log-picker').on('change', function () { | ||
$(this).submit(); | ||
}); | ||
|
||
$('#logbook .dossier .expandable').click(function() { | ||
$(this).toggleClass('open'); | ||
$('#' + $(this).data('display')).toggle(); | ||
}); | ||
|
||
$('#delete-log, #delete-all-log').click(function() { | ||
return confirm('Are you sure?'); | ||
}); | ||
|
||
}); |
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 was deleted.
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
@extends('layout') | ||
|
||
@section('content') | ||
<div id="logbook"> | ||
|
||
<div class="card sticky flat-bottom"> | ||
<div class="head"> | ||
<h1>Logbook</h1> | ||
</div> | ||
</div> | ||
|
||
@if (count($files)) | ||
<div class="card flat-top flat-bottom"> | ||
<form class="log-picker" method="GET" action="{{ $action_path }}"> | ||
<div class="select" data-content="@if($current_file) {{ $current_file }} @endif"> | ||
<select name="log"> | ||
@foreach($files as $file) | ||
<option value="{{ base64_encode($file) }}" @if ($file == $current_file) selected @endif>{{ $file }}</option> | ||
@endforeach | ||
</select> | ||
</div> | ||
</form> | ||
|
||
@if ($current_file) | ||
<div class="pull-right"> | ||
@if (count($logs)) | ||
<a id="download-log" class="btn btn-primary" href="?dl={{ base64_encode($current_file) }}">Download file</a> | ||
@endif | ||
|
||
@if (count($files) > 1) | ||
<div class="btn-group"> | ||
<a id="delete-log" class="btn btn-danger" href="?del={{ base64_encode($current_file) }}">Delete file</a> | ||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li><a id="delete-all-log" href="?delall=true">Delete all files</a></li> | ||
</ul> | ||
</div> | ||
@else | ||
<a id="delete-log" class="btn btn-danger" href="?del={{ base64_encode($current_file) }}">Delete file</a> | ||
@endif | ||
</div> | ||
@endif | ||
</div> | ||
@endif | ||
|
||
<div class="card flat-top"> | ||
@if (count($logs) === 0) | ||
Log file is empty. | ||
@elseif ($logs === null) | ||
Log file >50M, please download it. | ||
@else | ||
<table class="dossier"> | ||
<thead> | ||
<tr> | ||
<th>Level</th> | ||
<th>Context</th> | ||
<th>Date</th> | ||
<th>Content</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach ($logs as $key => $log) | ||
<tr class="@if ($log['stack']) expandable @endif" data-display="stack{{{$key}}}"> | ||
<td class="level"> | ||
<span class="level-icon icon-{{{ $log['level_img'] }}}" aria-hidden="true"></span> | ||
{{ $log['level'] }} | ||
</td> | ||
<td class="context"> | ||
{{ $log['context'] }} | ||
</td> | ||
<td class="date"> | ||
{{{ $log['date'] }}} | ||
</td> | ||
<td class="text"> | ||
{{{ $log['text'] }}} | ||
|
||
@if (isset($log['in_file'])) <br>{{{ $log['in_file'] }}} @endif | ||
|
||
@if ($log['stack']) | ||
<div id="stack{{{ $key }}}" class="stack-trace" style="display: none;">{{{ trim($log['stack']) }}}</div> | ||
@endif | ||
</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
@endif | ||
</div> | ||
|
||
</div> | ||
@endsection |
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