clusev/app/Livewire/Wireguard/Index.php

23 lines
549 B
PHP

<?php
namespace App\Livewire\Wireguard;
use App\Services\WgStatus;
use Livewire\Attributes\Layout;
use Livewire\Component;
/**
* WireGuard dashboard — live status (read-only, Phase 1). Renders the host-collected
* run/wg-status.json (via WgStatus) and wire:polls every 5s. No writes here (P3/P4).
*/
#[Layout('layouts.app')]
class Index extends Component
{
public function render(WgStatus $wg)
{
return view('livewire.wireguard.index', [
'status' => $wg->read(),
])->title(__('wireguard.title'));
}
}