@extends('layouts.app') @php $pageTitle = 'Users'; $pageHeading = 'Manage Users'; $pageDescription = 'Kelola user login ADMS (admin only).'; @endphp @section('content') @php($blacklistedIps = $blacklists->pluck('ip_address')->all()) @php($activeBlacklistCount = $blacklists->where('is_active', true)->count()) @php($activeLockoutCount = $lockouts->filter(fn ($row) => filled($row->blocked_until) && \Illuminate\Support\Carbon::parse($row->blocked_until)->isFuture())->count()) @php($failedAttemptCount = $recentAttempts->where('is_success', false)->count()) @php($successfulAttemptCount = $recentAttempts->where('is_success', true)->count())
| Username | Name | Role | Status | Last Login | Action | |
|---|---|---|---|---|---|---|
| {{ $row->username }} | {{ trim(($row->first_name ?? '').' '.($row->last_name ?? '')) ?: '-' }} | {{ $row->email ?: '-' }} | @php($resolvedRole = strtolower((string) ($row->role ?? ((int) ($row->is_superuser ?? 0) === 1 ? 'admin' : 'viewer')))) @if ($resolvedRole === 'admin') ADMIN @elseif ($resolvedRole === 'operator') OPERATOR @else DEMO / VIEWER @endif | @if ((int) ($row->is_active ?? 0) === 1) ACTIVE @else INACTIVE @endif | {{ $row->last_login ?: '-' }} | Edit |
| Belum ada user. | ||||||
| IP | Status | Reason | Last Hit | Action |
|---|---|---|---|---|
| {{ $blacklist->ip_address }} | @if ($blacklist->is_active) BLOCKED @else INACTIVE @endif | {{ $blacklist->reason ?: '-' }} | {{ $blacklist->last_hit_at ?: '-' }} | |
| Belum ada IP yang diblacklist. | ||||
| Login | Attempts | Blocked Until | Last IP | Action |
|---|---|---|---|---|
| {{ $lockout->login_identifier }} | {{ (int) $lockout->failed_attempts }}x | {{ $lockout->blocked_until ?: '-' }} | {{ $lockout->last_ip_address ?: '-' }} | |
| Belum ada lockout tercatat. | ||||
| Attempted At | Login | IP | Status | Reason | User Agent | Action |
|---|---|---|---|---|---|---|
| {{ $attempt->attempted_at }} | {{ $attempt->login_identifier }} | {{ $attempt->ip_address }} | @if ($attempt->is_success) SUCCESS @else FAILED @endif | {{ $attempt->failure_reason ?: '-' }} | {{ $attempt->user_agent ?: '-' }} | @if (! $attempt->is_success && ! in_array($attempt->ip_address, $blacklistedIps, true)) @else - @endif |
| Belum ada login attempt tercatat. | ||||||