kreitje/nova-horizon-stats

A Laravel Nova card.
177,705 28
Install
composer require kreitje/nova-horizon-stats
Latest Version:v0.3
PHP:>=7.1.0
License:MIT
Last Updated:Oct 23, 2018
Links: GitHub  ·  Packagist
Maintainer: kreitje

Nova Horizon Stats

For sites that use Laravel Horizon, this provides a few cards to show stats you will find on /horizon.

horizon stats screenshot

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require kreitje/nova-horizon-stats

In your app/Providers/NovaServiceProvider.php add the cards to the cards method array.

Usage:

public function cards() {
    return [
        new \Kreitje\NovaHorizonStats\JobsPastHour,
        new \Kreitje\NovaHorizonStats\FailedJobsPastHour,
        new \Kreitje\NovaHorizonStats\Processes,
        new \Kreitje\NovaHorizonStats\Workload
    ];
}

You can pass an argument into the classes for how many seconds to automatically refresh. It defaults to the 30 seconds.

public function cards() {
    return [
        new \Kreitje\NovaHorizonStats\JobsPastHour(5),
        new \Kreitje\NovaHorizonStats\FailedJobsPastHour(10),
        new \Kreitje\NovaHorizonStats\Processes(15),
        new \Kreitje\NovaHorizonStats\Workload(30),
    ];
}

If you want to change the title of the cards, pass a second argument to the card classes.

public function cards() {
    return [
        new \Kreitje\NovaHorizonStats\JobsPastHour(5, 'Jobs from the past hour')
    ];
}

The Workload card allows you to only watch for specific queues running. To only show specific queues, the third parameter takes an array of queue names.

public function cards() {
    return [
        new \Kreitje\NovaHorizonStats\Workload(5, 'Queue Workload', ['default', 'encoding'])
    ];
}

License

The MIT License (MIT). Please see License File for more information.

Related Packages

maatwebsite/laravel-nova-excel

Supercharged Excel exports for Laravel Nova Resources

6,756,314 402
vyuldashev/nova-permission

A Laravel Nova tool for Spatie's Permission library.

2,612,884 430
unm/laravel4-opencloud

A laravel 4.1 service provider package that wraps the Rackspace/Openstack PHP SD...

4 7
spatie/nova-backup-tool

A Laravel Nova tool to backup your application.

585,373 362
spatie/nova-tail-tool

A Laravel Nova tool to display the application log.

129,222 119