nimuli/resources/views/livewire/pages/ai/anomalies.blade.php

38 lines
1.9 KiB
PHP

<div class="max-w-3xl mx-auto">
<div class="flex items-center justify-between mb-6">
<div>
<h1 class="text-2xl font-bold text-t1">Anomaly Detection</h1>
<p class="text-sm text-t3 mt-1">Detect suspicious traffic patterns with AI</p>
</div>
<button wire:click="detect" wire:loading.attr="disabled" wire:target="detect"
class="px-4 py-2 bg-accent-gradient text-white rounded-lg text-sm font-medium hover:opacity-90 transition-opacity disabled:opacity-60 flex items-center gap-2">
<span wire:loading.remove wire:target="detect">
<x-heroicon-o-shield-exclamation class="w-4 h-4 inline mr-1" />
Scan for Anomalies
</span>
<span wire:loading wire:target="detect" class="flex items-center gap-2">
<svg class="animate-spin h-4 w-4" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path>
</svg>
Scanning…
</span>
</button>
</div>
@if($report)
<div class="p-5 bg-s1 border border-white/[.06] rounded-xl">
<div class="flex items-center gap-2 mb-3 text-amber text-xs font-medium">
<x-heroicon-o-shield-exclamation class="w-3.5 h-3.5" />
Anomaly Report
</div>
<div class="text-sm text-t1 whitespace-pre-wrap leading-relaxed">{{ $report }}</div>
</div>
@else
<div class="p-8 bg-s1 border border-white/[.06] rounded-xl text-center">
<x-heroicon-o-shield-exclamation class="w-10 h-10 mx-auto text-t3 mb-3" />
<p class="text-sm text-t2">Click "Scan for Anomalies" to analyze your link traffic patterns.</p>
</div>
@endif
</div>