devlabor/laravel-dashboard-honeybadger-tile

A Honeybadger tile for Laravel Dashboard

3.1.2 2024-02-09 12:39 UTC

This package is auto-updated.

Last update: 2024-04-09 13:02:00 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This tile can used on the Laravel Dashboard to display unresolved Honeybadger faults count.

Screenshot

Installation

You can install the tile via composer:

composer require devlabor/laravel-dashboard-honeybadger-tile

Sign up to https://honeybadger.io and create a new project. To obtain HONEYBADGER_AUTH_TOKEN you have to create a new api token under your user authentication settings. After that add the token to your .env file.

HONEYBADGER_AUTH_TOKEN=YourGeneratedToken

In the config/dashboard.php config file, you must add this configuration in the tiles key.

// in config/dashboard.php

return [
    // ...
    'tiles' => [
        'honeybadger' => [
            //'description' => 'Unresolved faults',
            'auth_token' => env('HONEYBADGER_AUTH_TOKEN'),
            'refresh_interval_in_seconds' => 300
        ],
    ],
];

In app\Console\Kernel.php you should schedule the DevLabor\HoneybadgerTile\FetchHoneybadgerProjectsCommand to run every five minutes.

// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(\DevLabor\HoneybadgerTile\Commands\FetchHoneybadgerProjectsCommand::class)->everyFiveMinutes();
}

You are also able to execute the command manually.

php artisan dashboard:fetch-honeybadger-projects

Usage

In your dashboard view you use the livewire:honeybadger-tile component.

<x-dashboard>
    <livewire:honeybadger-unresolved-faults-tile position="a1" title="Honeybadger" description="Unresolved Faults" />
    <livewire:honeybadger-offline-sites-tile position="b1" title="Honeybadger" description="Offline Sites" />
    <!-- or -->
    <livewire:honeybadger-overview-tile position="a2:b2" title="Honeybadger" description_faults="Unresolved Faults" description_offline="Offline Sites" />
</x-dashboard>

Customizing the view

If you want to customize the view used to render this tile, run this command:

php artisan vendor:publish --provider="DevLabor\HoneybadgerTile\HoneybadgerTileServiceProvider" --tag="dashboard-honeybadger-tile-views"

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email reichardt@devlabor.com instead of using the issue tracker.

Credits

License

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