happydemon / nova-horizon
Horizon statistics in Nova
1.0.2
2025-07-19 14:11 UTC
Requires
- php: ^7.4|^8.0
- laravel/nova: ^4.0|^5.0
This package is auto-updated.
Last update: 2025-07-20 09:58:04 UTC
README
Add statistics to your Nova dashboard for 1 or more applications that are running horizon.
This is a fork of appstract/nova-horizon, some key differences:
- You can configure multiple horizon instances
- Improved request handling
Installation
You can install the package via composer:
composer require happydemon/nova-horizon php artisan vendor:publish --tag nova-horizon
Configuration
You will have to define your horizon instances in the nova-horizon.php
config file.
<?php return [ 'default_instance' => 'default', 'instances' => [ 'default' => [ // url to where horizon is accessible 'url' => 'https://yourapp.com/horizon', 'auth' => [ // Delete this section if not using basic auth to autheticate horizon requests ], 'headers' => [ // if using headers for authentication, add them here ] ], ] ];
The instance key can be passed to the cards by calling ->horizonInstance('{KEY}')
.
Usage
You can add cards to the main dashboard or your own dashboard(s).
class Main extends Dashboard { public function cards() { return [ \HappyDemon\NovaHorizon\Cards\Stats::make() ->horizonInstance('default'), \HappyDemon\NovaHorizon\Cards\Workload::make(), \HappyDemon\NovaHorizon\Cards\PendingJobs::make(), \HappyDemon\NovaHorizon\Cards\FailedJobs::make(), \HappyDemon\NovaHorizon\Cards\CompletedJobs::make(), // Stats as separate cards \HappyDemon\NovaHorizon\Cards\JobsPerMinute::make(), \HappyDemon\NovaHorizon\Cards\RecentJobsCount::make(), \HappyDemon\NovaHorizon\Cards\FailedJobsCount::make(), \HappyDemon\NovaHorizon\Cards\Status::make(), \HappyDemon\NovaHorizon\Cards\TotalProcesses::make(), \HappyDemon\NovaHorizon\Cards\MaxWaitTime::make(), \HappyDemon\NovaHorizon\Cards\MaxRuntime::make(), \HappyDemon\NovaHorizon\Cards\MaxThroughput::make(), ]; } }
Contributing
Contributions are welcome, thanks to all the contributors :)
License
The MIT License (MIT). Please see License File for more information.