Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vincentbean/horizon-extended-dashboard
An extended dashboard for Laravel Horizon written using Livewire
https://github.com/vincentbean/horizon-extended-dashboard
dashboard hacktoberfest horizon laravel livewire php8
Last synced: about 1 month ago
JSON representation
An extended dashboard for Laravel Horizon written using Livewire
- Host: GitHub
- URL: https://github.com/vincentbean/horizon-extended-dashboard
- Owner: VincentBean
- License: mit
- Created: 2022-06-21T18:19:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-18T13:36:36.000Z (10 months ago)
- Last Synced: 2024-10-11T18:41:06.240Z (about 1 month ago)
- Topics: dashboard, hacktoberfest, horizon, laravel, livewire, php8
- Language: JavaScript
- Homepage:
- Size: 538 KB
- Stars: 20
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Horizon Extended Dashboard
![Laravel Horizon Extended Dashboard](https://banners.beyondco.de/Horizon%20Extended%20Dashboard.png?theme=dark&packageManager=composer+require&packageName=vincentbean%2Fhorizon-extended-dashboard&pattern=deathStar&style=style_1&description=Alternative+Dashboard+for+Horizon&md=1&showWatermark=0&fontSize=100px&images=cube)
This is an alternative dashboard for Laravel Horizon written with Livewire.
The reason that I've created this is that the default Horizon dashboard lacks features such as controls and a queue filter.## Features
- Detailed overview of Horizon, all data that is available is shown
- Pause and terminate controls from the dashboard for the master process and supervisors
- Batch views
- Job Views for recent, pending, completed and failed
- Filtering on queue
- Catch all exceptions that occur on your jobs
- Detailed statistics
- Job runtime
- Queue runtime
- Attempts
- CPU/memory usage per queue
- And more
- Retry/requeue **any** job
- List all retries of a job
## Installation
Require this package via composer:
```shell
composer require vincentbean/horizon-extended-dashboard
```Then publish the assets:
```shell
php artisan horizon-dashboard:publish
```You can optionally add this to your post install or update composer script to make sure you always have the latest version published:
```json
{
"scripts": {
"post-update-cmd": [
"@php artisan horizon-dashboard:publish"
]
}
}
```### Statistics
To collect queue statistics you can add these commands to your scheduler:
```php
protected function schedule(Schedule $schedule)
{
$schedule->command('horizon:snapshot')->everyFifteenMinutes();
$schedule->command('horizon-dashboard:queue-snapshot')->everyFifteenMinutes();
}
```### Aggregating Data
To prevent your database from growing, this package includes two aggregate and cleanup commands. You can adjust the values to work best for your install.
The parameters for the aggregate commands are in minutes.
```php
protected function schedule(Schedule $schedule)
{
$schedule->command('horizon-dashboard:aggregate-queue-statistics --interval=60 --keep=240')->everyFifteenMinutes();
$schedule->command('horizon-dashboard:aggregate-job-statistics --interval=15 --keep=60')->everyFifteenMinutes();
}
```For this you have to disable strict mode in your MySQL database config in `config/database.php`
### Deleting old statistics
```php
protected function schedule(Schedule $schedule)
{
$schedule->command('horizon-dashboard:cleanup-statistics --hours=168')->daily();
$schedule->command('horizon-dashboard:cleanup-exceptions --hours=168')->everyFifteenMinutes();
}
```## Authentication
This package uses de same authentication middleware as Laravel Horizon.
## Usage
You can access the dashboard by going to `/horizon-dashboard`
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.