From 175b104ebcf3c8987cc29b0640e150013079136b Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 30 Aug 2022 10:09:06 +0200 Subject: [PATCH] wip --- composer.json | 1 + composer.lock | 82 ++++++++++++++++++- config/filament-laravel-log.php | 63 ++++++++++++++ .../en/filament-laravel-log.php | 22 +++++ 4 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 config/filament-laravel-log.php create mode 100644 resources/lang/vendor/filament-laravel-log/en/filament-laravel-log.php diff --git a/composer.json b/composer.json index 05c183b..a3ee14b 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "laravel/tinker": "^2.0", "laravel/ui": "^2.1|^3.3.0", "predis/predis": "^1.1", + "saade/filament-laravel-log": "^1.1", "spatie/laravel-data": "^1.5.1", "spiral/roadrunner": "^2.8.2", "stechstudio/filament-impersonate": "^2.5", diff --git a/composer.lock b/composer.lock index 54a6939..b775fb4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "12149e6cac1e064fd81b4133af9e73e5", + "content-hash": "1f5f0722a85e2afd5c7465a172814bb9", "packages": [ { "name": "akaunting/laravel-money", @@ -5666,6 +5666,84 @@ ], "time": "2022-08-05T17:58:37+00:00" }, + { + "name": "saade/filament-laravel-log", + "version": "v1.1.2", + "source": { + "type": "git", + "url": "https://github.com/saade/filament-laravel-log.git", + "reference": "4fe4bce62df5861d30d2e0c2b20c54afb038de41" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/saade/filament-laravel-log/zipball/4fe4bce62df5861d30d2e0c2b20c54afb038de41", + "reference": "4fe4bce62df5861d30d2e0c2b20c54afb038de41", + "shasum": "" + }, + "require": { + "filament/filament": "^2.10", + "illuminate/contracts": "^9.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9.2" + }, + "require-dev": { + "nunomaduro/collision": "^6.0", + "nunomaduro/larastan": "^2.0.1", + "orchestra/testbench": "^7.0", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Saade\\FilamentLaravelLog\\FilamentLaravelLogServiceProvider" + ], + "aliases": { + "FilamentLaravelLog": "Saade\\FilamentLaravelLog\\Facades\\FilamentLaravelLog" + } + } + }, + "autoload": { + "psr-4": { + "Saade\\FilamentLaravelLog\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Saade", + "email": "saade@outlook.com.br", + "role": "Developer" + } + ], + "description": "Access laravel.log file through Filament admin panel", + "homepage": "https://github.com/saade/filament-laravel-log", + "keywords": [ + "filament-laravel-log", + "laravel", + "saade" + ], + "support": { + "issues": "https://github.com/saade/filament-laravel-log/issues", + "source": "https://github.com/saade/filament-laravel-log/tree/v1.1.2" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2022-06-21T12:34:33+00:00" + }, { "name": "sabberworm/php-css-parser", "version": "8.4.0", @@ -13512,5 +13590,5 @@ "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/config/filament-laravel-log.php b/config/filament-laravel-log.php new file mode 100644 index 0000000..d84d7fd --- /dev/null +++ b/config/filament-laravel-log.php @@ -0,0 +1,63 @@ + false, + + /** + * The directory(ies) containing the log files. + */ + 'logsDir' => [ + storage_path('logs'), + ], + + /** + * Files to ignore when searching for log files. + * Accepts wildcards eg: *.log + */ + 'exclude' => [ + // + ], + + /** + * Navigation group. + */ + 'navigationGroup' => 'Settings', + + /** + * Navigation sort. + */ + 'navigationSort' => 50, + + /** + * Navigation icon. + */ + 'navigationIcon' => 'heroicon-o-document-text', + + /** + * Navigation label. + */ + 'navigationLabel' => 'Logs', + + /** + * Navigation slug. + */ + 'slug' => 'system-logs', + + /** + * Maximum amount of lines that editor will render. + */ + 'maxLines' => 50, + + /** + * Minimum amount of lines that editor will render. + */ + 'minLines' => 10, + + /** + * Editor font size. + */ + 'fontSize' => 12 +]; diff --git a/resources/lang/vendor/filament-laravel-log/en/filament-laravel-log.php b/resources/lang/vendor/filament-laravel-log/en/filament-laravel-log.php new file mode 100644 index 0000000..2674210 --- /dev/null +++ b/resources/lang/vendor/filament-laravel-log/en/filament-laravel-log.php @@ -0,0 +1,22 @@ + [ + 'title' => 'System Logs' + ], + 'forms' => [ + 'search' => [ + 'placeholder' => 'Select or search a log file...' + ] + ], + 'modals' => [ + 'clear' => [ + 'heading' => 'Clear Site Logs?', + 'subheading' => 'Are you sure you want to clear all site logs?', + 'actions' => [ + 'cancel' => 'Cancel', + 'confirm' => 'Clear logs' + ] + ] + ] +];