70 lines
3.1 KiB
PHP
70 lines
3.1 KiB
PHP
<div class="glass-card p-4 rounded-2xl border border-white/10 bg-white/5">
|
||
<div class="flex items-center justify-between mb-3">
|
||
<div class="inline-flex items-center gap-2 bg-white/5 border border-white/10 px-2.5 py-1 rounded-full">
|
||
<i class="ph ph-shield-checkered text-white/70 text-[13px]"></i>
|
||
<span class="text-[11px] uppercase text-white/70">Fail2Ban</span>
|
||
</div>
|
||
|
||
@if($available)
|
||
<span class="px-2 py-0.5 rounded-full border text-xs
|
||
{{ $activeBans>0 ? 'text-amber-200 border-amber-400/30 bg-amber-500/10' : 'text-emerald-300 border-emerald-400/30 bg-emerald-500/10' }}">
|
||
{{ $activeBans }} aktuell
|
||
</span>
|
||
@else
|
||
<span class="px-2 py-0.5 rounded-full border text-xs text-rose-300 border-rose-400/30 bg-rose-500/10">
|
||
nicht installiert
|
||
</span>
|
||
@endif
|
||
</div>
|
||
|
||
@if(!$available)
|
||
<div class="text-sm text-white/60">fail2ban-client wurde nicht gefunden.</div>
|
||
@else
|
||
{{-- Jails --}}
|
||
<div class="space-y-2">
|
||
@forelse($jails as $j)
|
||
<div class="rounded-xl border border-white/10 bg-white/5 px-3 py-2">
|
||
<div class="flex items-center justify-between">
|
||
<div class="text-white/85 font-medium">{{ $j['name'] }}</div>
|
||
<span class="px-2 py-0.5 rounded-full border text-[11px]
|
||
{{ $j['banned']>0 ? 'text-amber-200 border-amber-400/30 bg-amber-500/10' : 'text-white/60 border-white/20 bg-white/5' }}">
|
||
{{ $j['banned'] }} gebannt
|
||
</span>
|
||
</div>
|
||
@if(!empty($j['ips']))
|
||
<div class="mt-1 text-[12px] text-white/65 font-mono break-words">
|
||
{{ implode(', ', $j['ips']) }}
|
||
</div>
|
||
@endif
|
||
</div>
|
||
@empty
|
||
<div class="text-sm text-white/60">Keine Jails gefunden.</div>
|
||
@endforelse
|
||
</div>
|
||
|
||
{{-- Top IPs aus Ban-Events --}}
|
||
<div class="mt-3">
|
||
<div class="text-sm text-white/70">Top IPs (letzte Fail2Ban-Logs):</div>
|
||
<ul class="mt-2 space-y-1 text-sm">
|
||
@forelse($topIps as $i)
|
||
<li class="flex justify-between">
|
||
<span class="text-white/80 font-mono">{{ $i['ip'] }}</span>
|
||
<span class="text-white/60">{{ $i['count'] }}</span>
|
||
</li>
|
||
@empty
|
||
<li class="text-white/50">–</li>
|
||
@endforelse
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="mt-4 flex justify-end">
|
||
<button wire:click="refresh" wire:loading.attr="disabled"
|
||
class="px-3 py-1.5 text-[12px] rounded-lg bg-white/5 border border-white/10 hover:bg-white/10">
|
||
<i class="ph ph-arrows-clockwise text-[13px]"></i>
|
||
<span wire:loading.remove>Neu prüfen</span>
|
||
<span wire:loading>prüfe…</span>
|
||
</button>
|
||
</div>
|
||
@endif
|
||
</div>
|