feat: initial commit — UniFi snap-in package
Full UniFi dashboard snap-in including: - WiFi/client/device stats with time-series snapshots - Client Dashboard with traffic, satisfaction, signal, download charts - Webhook alerting with debounced offline/online detection - AP snapshot collection, client snapshot collection - Device classification (type and OS) from OUI/hostname heuristics - Webhook cooldown, templates, and multi-platform delivery Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
22
src/Console/CheckWebhooks.php
Normal file
22
src/Console/CheckWebhooks.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Dashboard\Unifi\Console;
|
||||
|
||||
use Dashboard\Unifi\Services\UnifiApiClient;
|
||||
use Dashboard\Unifi\Services\WebhookCheckService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class CheckWebhooks extends Command
|
||||
{
|
||||
protected $signature = 'unifi:check-webhooks';
|
||||
protected $description = 'Evaluate UniFi webhook conditions and fire alerts';
|
||||
|
||||
public function handle(WebhookCheckService $service, UnifiApiClient $unifi): int
|
||||
{
|
||||
$fired = $service->checkAll($unifi);
|
||||
if ($fired > 0) {
|
||||
$this->info("Fired {$fired} webhook(s).");
|
||||
}
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user