happydemon/nova-horizon
最新稳定版本:1.0.2
Composer 安装命令:
composer require happydemon/nova-horizon
包简介
Horizon statistics in Nova
README 文档
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.
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-19
