ohdearapp/ohdear-pulse

Integrate Oh Dear with Laravel Pulse

Installs: 70 921

Dependents: 0

Suggesters: 0

Security: 0

Stars: 20

Watchers: 1

Forks: 2

Open Issues: 2

Language:Blade

1.1.0 2024-03-28 12:00 UTC

This package is not auto-updated.

Last update: 2024-10-25 20:30:46 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package contains Pulse cards that show results from Oh Dear in your Laravel Pulse dashboard.

Currently, there are three cards available:

screenshot

screenshot

Installation

You can install the package via composer:

composer require ohdearapp/ohdear-pulse

In your config/services.php file, add the following lines:

'oh_dear' => [
    'pulse' => [
        'api_key' => env('OH_DEAR_API_TOKEN'),
        'site_id' => env('OH_DEAR_SITE_ID'),
    ],
],

You can create an API token on the "API Tokens" page at Oh Dear. You'll find the site ID on the "Settings" page of a site on Oh Dear.

You can execute this artisan command to verify if you set up the configuration correctly.

php artisan ohdear-pulse:verify

Usage

There are currently three cards available:

  • ohdear.pulse.uptime: displays the uptime and performance of a site
  • ohdear.pulse.cron: displays the results of the cron job monitoring
  • ohdear.pulse.brokenLinks: displays any broken links that were detected

You can add the cards to your Pulse dashboard, by first publishing the Pulse's dashboard view:

php artisan vendor:publish --tag=pulse-dashboard

Next, add the cards to the resources/views/vendor/pulse/dashboard.blade.php file:

<x-pulse>
    <livewire:ohdear.pulse.uptime cols="4" />
    
    <livewire:ohdear.pulse.cron cols="8" />

    <livewire:ohdear.pulse.brokenLinks cols="8" />
    
    {{-- Add more cards here --}}
</x-pulse>

All these cards accept an optional site-id attribute. If you don't provide it, the site ID from the config/services.php file will be used.

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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