Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filament-shield install, filament HasPageShield, config file name miss match and dark theme supports #10

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/** @noinspection PhpParamsInspection,PhpMethodMayBeStaticInspection */

declare(strict_types=1);


class Container_96877e6014 extends _PHPStan_3334735b2\Nette\DI\Container
{
Expand Down
149 changes: 75 additions & 74 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,77 @@
{
"name": "rabol/filament-logviewer",
"description": "Logviewer for Filament admin",
"keywords": [
"rabol",
"laravel",
"filament-logviewer"
],
"homepage": "https://github.com/rabol/filament-logviewer",
"license": "MIT",
"authors": [
{
"name": "Steen Rabol",
"email": "[email protected]",
"role": "Developer"
}
],
"require": {
"php": "^8.1|^8.2",
"filament/filament": "^3.0",
"filament/forms": "^3.0",
"filament/tables": "^3.0",
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0",
"calebporzio/sushi": "^2.3",
"jackiedo/log-reader": "^2.2"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.9",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
"psr-4": {
"Rabol\\FilamentLogviewer\\": "src",
"Rabol\\FilamentLogviewer\\Database\\Factories\\": "database/factories"
}
},
"autoload-dev": {
"psr-4": {
"Rabol\\FilamentLogviewer\\Tests\\": "tests"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest coverage"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true
}
},
"extra": {
"laravel": {
"providers": [
"Rabol\\FilamentLogviewer\\FilamentLogviewerServiceProvider"
],
"aliases": {
"Skeleton": "Rabol\\FilamentLogviewer\\Facades\\FilamentLogviewer"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
"name": "rabol/filament-logviewer",
"description": "Logviewer for Filament admin",
"keywords": [
"rabol",
"laravel",
"filament-logviewer"
],
"homepage": "https://github.com/rabol/filament-logviewer",
"license": "MIT",
"authors": [
{
"name": "Steen Rabol",
"email": "[email protected]",
"role": "Developer"
}
],
"require": {
"php": "^8.1|^8.2",
"bezhansalleh/filament-shield": "^3.0",
"filament/filament": "^3.0",
"filament/forms": "^3.0",
"filament/tables": "^3.0",
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0",
"calebporzio/sushi": "^2.3",
"jackiedo/log-reader": "^2.2"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.9",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
"psr-4": {
"Rabol\\FilamentLogviewer\\": "src",
"Rabol\\FilamentLogviewer\\Database\\Factories\\": "database/factories"
}
},
"autoload-dev": {
"psr-4": {
"Rabol\\FilamentLogviewer\\Tests\\": "tests"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest coverage"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true
}
},
"extra": {
"laravel": {
"providers": [
"Rabol\\FilamentLogviewer\\FilamentLogviewerServiceProvider"
],
"aliases": {
"Skeleton": "Rabol\\FilamentLogviewer\\Facades\\FilamentLogviewer"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
113 changes: 26 additions & 87 deletions resources/views/log-viewer-view-details.blade.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
@php use Illuminate\Support\Carbon; @endphp
<x-filament::page>
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
<div
class="border border-gray-300 shadow-sm bg-white rounded-xl filament-tables-container dark:bg-gray-800 dark:border-gray-700">
<div class="px-4 py-5 sm:px-6">
<h3 class="text-lg leading-6 font-medium text-gray-900">
<h3 class="text-lg leading-6 font-medium dark:text-gray-900">
Details
</h3>
</div>
<div class="border-t border-gray-200">
<div class="border border-gray-300 dark:bg-gray-800 dark:border-gray-700">
<dl>
<div class="bg-gray-50 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">
<div class="dark:bg-gray-800 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium">
Date
</dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
{{$entry->date}}
<dd class="mt-1 text-sm sm:mt-0 sm:col-span-2">
{{Carbon::parse($entry->date)->format('M d, Y h:i A')}}
</dd>
</div>
<div class="bg-white px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">
<div class="dark:bg-gray-800 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium">
Environment
</dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
<dd class="mt-1 text-sm sm:mt-0 sm:col-span-2">
{{$entry->environment}}
</dd>
</div>
<div class="bg-gray-50 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">
<div class="dark:bg-gray-800 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium">
Level
</dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
<dd class="mt-1 text-sm sm:mt-0 sm:col-span-2">
@if($entry->level == 'error')
<span
class="inline-flex items-center px-3 py-0.5 rounded-full text-sm font-medium bg-red-100 text-red-800">
Expand All @@ -46,41 +48,41 @@ class="inline-flex items-center px-3 py-0.5 rounded-full text-sm font-medium bg-
@endif
</dd>
</div>
<div class="bg-gray-50 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">
<div class="dark:bg-gray-800 px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium">
Context
</dt>
</div>
<div class="bg-gray-50 px-4 pb-5">
<div class="dark:bg-gray-800 px-4 pb-5">
<dd>
<pre
class="whitespace-pre-wrap">{{$entry->context}}</pre>
</dd>
</div>
<div class="bg-gray-50 px-4 pt-5">
<dt class="text-sm font-medium text-gray-500">
<div class="dark:bg-gray-800 px-4 pt-5">
<dt class="text-sm font-medium">
Stack trace
</dt>
</div>
<div class="bg-gray-50 px-4 py-5 w-full">
<dd class="mt-1 text-sm text-gray-900">
<div class="dark:bg-gray-800 px-4 py-5 w-full">
<dd class="mt-1 text-sm">
@if($entry->stack_traces && $entry->stack_traces->count())
@foreach ($entry->stack_traces as $st)
<div
class="{{!$loop->last ? 'border-b': ''}} {{$loop->first ? 'border-t': ''}} border-gray-200 py-3">
<div class="grid grid-cols-3 w-full py-0.5 px-1 hover:bg-gray-100 rounded">
<div class="grid grid-cols-3 w-full py-0.5 px-1 rounded break-words">
<div class="col-span-1 font-bold">Caught at</div>
<div class="col-span-2">{{$st->caught_at}}</div>
</div>
<div class="grid grid-cols-3 w-full py-0.5 px-1 hover:bg-gray-100 rounded">
<div class="grid grid-cols-3 w-full py-0.5 px-1 rounded break-words">
<div class="col-span-1 font-bold">In</div>
<div class="col-span-2">{{$st->in}}</div>
</div>
<div class="grid grid-cols-3 w-full py-0.5 px-1 hover:bg-gray-100 rounded">
<div class="grid grid-cols-3 w-full py-0.5 px-1 rounded break-words">
<div class="col-span-1 font-bold">Line</div>
<div class="col-span-2">{{$st->line}}</div>
</div>
<div class="grid grid-cols-3 w-full pt-0.5 px-1 hover:bg-gray-100 rounded">
<div class="grid grid-cols-3 w-full pt-0.5 px-1 rounded break-words">
<div class="col-span-1 font-bold">content</div>
<div class="col-span-2">{{$st->__toString()}}</div>
</div>
Expand All @@ -92,67 +94,4 @@ class="{{!$loop->last ? 'border-b': ''}} {{$loop->first ? 'border-t': ''}} borde
</dl>
</div>
</div>

{{-- <div>--}}

{{-- <div class="">--}}
{{-- <table class="w-full text-left rtl:text-right divide-y table-auto">--}}
{{-- <tr>--}}
{{-- <td>Date:</td>--}}
{{-- <td>{{$entry->date}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>Environment:</td>--}}
{{-- <td>{{$entry->environment}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>Level:</td>--}}
{{-- <td>{{$entry->level}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>Context:</td>--}}
{{-- <td>{{$entry->context}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>Stack trace:</td>--}}
{{-- <td>--}}
{{-- @if($entry->stack_traces && $entry->stack_traces->count())--}}

{{-- @foreach ($entry->stack_traces as $st)--}}
{{-- <table>--}}
{{-- <tr>--}}
{{-- <td>Caught at</td>--}}
{{-- <td>{{$st->caught_at}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>In</td>--}}
{{-- <td>{{$st->in}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>Line</td>--}}
{{-- <td>{{$st->line}}</td>--}}
{{-- </tr>--}}
{{-- <tr>--}}
{{-- <td>content</td>--}}
{{-- <td>--}}
{{-- {{$st->__toString()}}--}}
{{-- </td>--}}
{{-- </tr>--}}
{{-- </table>--}}
{{-- @endforeach--}}

{{-- @endif--}}
{{-- </td>--}}
{{-- </tr>--}}


{{-- @if ($footer)--}}
{{-- <tfoot>--}}
{{-- <tr class="bg-gray-50">--}}
{{-- {{ $footer }}--}}
{{-- </tr>--}}
{{-- </tfoot>--}}
{{-- @endif--}}
{{-- </table>--}}
{{-- </div>--}}
</x-filament::page>
Loading