astrotomic / laravel-dashboard-pingping-tile
A PingPing tile for Laravel Dashboard
Fund package maintenance!
Gummibeer
SarahSibert
Issuehunt
forest.astrotomic.info
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^6.5 || ^7.0
- illuminate/console: ^8.0
- illuminate/http: ^8.0
- illuminate/support: ^8.0
- nesbot/carbon: ^2.0
- spatie/laravel-dashboard: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- dev-main
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- dev-dependabot/composer/phpunit/phpunit-tw-11.4
- dev-dependabot/composer/illuminate/http-tw-11.15
- dev-dependabot/composer/illuminate/console-tw-11.15
- dev-dependabot/composer/illuminate/support-tw-11.15
- dev-dependabot/composer/nesbot/carbon-tw-3.6
- dev-dependabot/composer/spatie/laravel-dashboard-tw-3.1
This package is auto-updated.
Last update: 2024-12-07 02:15:22 UTC
README
This tile can be used on the Laravel Dashboard to display the status of PingPing Monitors.
Installation
You can install the package via composer:
composer require astrotomic/laravel-dashboard-pingping-tile
In the dashboard
config file, you must add this configuration in the tiles
key. The stations
should contain the IDs of the PingPing stations that you want to display on the dashboard.
// in config/dashboard.php return [ // ... 'tiles' => [ 'pingping' => [ 'api_key' => '', // https://pingping.io/account/api 'monitors' => [ // IDs can be found in URL https://pingping.io/monitors/[0-9]+ ], 'refresh_interval_in_seconds' => 60, ], ], ];
In app\Console\Kernel.php
you should schedule the \Astrotomic\PingPingTile\FetchPingPingMonitorsCommand
to run. You can let it run every minute if you want. You could also run it less frequently if fast updates on the dashboard aren't that important for this tile.
// in app/console/Kernel.php protected function schedule(Schedule $schedule) { // ... $schedule->command(\Astrotomic\PingPingTile\FetchPingPingMonitorsCommand::class)->everyMinute(); }
Usage
In your dashboard view you use the livewire:pingping-tile
component.
<x-dashboard> <livewire:pingping-tile position="a1" /> </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="Astrotomic\PingPingTile\PingPingTileServiceProvider" --tag="dashboard-pingping-tile-views"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details. You could also be interested in CODE OF CONDUCT.
Security
If you discover any security related issues, please check SECURITY for steps to report it.
Credits
License
The MIT License (MIT). Please see License file for more information.
Treeware
You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.
It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.
You can buy trees at offset.earth/treeware
Read more about Treeware at treeware.earth