Add Horizon statistics to your Nova dashboard.
You can install the package via composer:
composer require appstract/nova-horizon
There are two ways to use this package. One is to enable the Horizon dashboard in your application's NovaServiceProvider
. This will add a new dashboard to Nova, shown in the screenshot above.
class NovaServiceProvider extends NovaApplicationServiceProvider
{
protected function dashboards()
{
return [
new \Appstract\NovaHorizon\Dashboard,
];
}
}
Second way is by adding cards to the main dashboard or your own dashboard(s).
class NovaServiceProvider extends NovaApplicationServiceProvider
{
protected function cards()
{
return [
// Like the dashboard
new \Appstract\NovaHorizon\Cards\Stats,
new \Appstract\NovaHorizon\Cards\Workload,
new \Appstract\NovaHorizon\Cards\PendingJobs,
new \Appstract\NovaHorizon\Cards\FailedJobs,
new \Appstract\NovaHorizon\Cards\CompletedJobs,
// Stats as seperate cards
new \Appstract\NovaHorizon\Cards\JobsPerMinute,
new \Appstract\NovaHorizon\Cards\RecentJobsCount,
new \Appstract\NovaHorizon\Cards\FailedJobsCount,
new \Appstract\NovaHorizon\Cards\Status,
new \Appstract\NovaHorizon\Cards\TotalProcesses,
new \Appstract\NovaHorizon\Cards\MaxWaitTime,
new \Appstract\NovaHorizon\Cards\MaxRuntime,
new \Appstract\NovaHorizon\Cards\MaxThroughput,
];
}
}
Contributions are welcome, thanks to y'all :)
Appstract is a small team from The Netherlands. We create (open source) tools for Web Developers and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon.
The MIT License (MIT). Please see License File for more information.