feat: add resources and view components

This commit is contained in:
2026-05-21 16:05:19 +07:00
parent 28a06315b8
commit b2d60e680d
249 changed files with 37379 additions and 0 deletions
@@ -0,0 +1,37 @@
<x-mail::message>
# System Health Digest
@php
$cpu = (int) ($stats['cpu'] ?? 0);
$ram = (int) ($stats['ram']['percentage'] ?? 0);
$cpuLabel = $cpu >= 85 ? '🔴 Critical' : ($cpu >= 65 ? '🟡 Elevated' : '🟢 Healthy');
$ramLabel = $ram >= 85 ? '🔴 Critical' : ($ram >= 65 ? '🟡 Elevated' : '🟢 Healthy');
@endphp
Dear System Administrator,
Please find enclosed the automated system performance and health report for **{{ config('app.name') }}**, generated on {{ now()->format('d M Y, H:i T') }}.
<x-mail::table>
| Metric | Value | Status |
|:-------------------------------|:----------------------------------------------------------------------------|:-----------|
| CPU load | {{ $cpu }}% | {{ $cpuLabel }} |
| Memory usage | {{ $stats['ram']['used'] ?? 'n/a' }} / {{ $stats['ram']['total'] ?? 'n/a' }} ({{ $ram }}%) | {{ $ramLabel }} |
| Active sessions | {{ $stats['users'] ?? 0 }} | |
| Queue backlog | {{ $stats['queues']['pending'] ?? 0 }} pending | |
| Database size | {{ $stats['db_stats']['size'] ?? 'n/a' }} | |
</x-mail::table>
## Diagnostic Analysis Summary
{{ $analysis }}
<x-mail::button :url="config('app.url') . '/monitoring'" color="primary">
Open Monitoring Dashboard
</x-mail::button>
This is an automated administrative notification. You are receiving this communication because your account holds the necessary privileges (`view health and logs`) to monitor system diagnostics. To manage your communication preferences, please navigate to **System Settings Notifications**.
Sincerely,
**{{ config('app.name') }} IT Operations**
</x-mail::message>
@@ -0,0 +1,38 @@
<x-mail::message>
# Authentication Verification Required
@if($userName)
Dear {{ $userName }},
@else
Greetings,
@endif
A request has been made to access your **{{ config('app.name') }}** account. To proceed with the secure authentication process, please input the following One-Time Password (OTP).
<x-mail::panel>
{{ $otp }}
</x-mail::panel>
For security purposes, this verification code is valid for a single use and will expire in **{{ $expiresInMinutes }} minutes**. Please ensure the strict confidentiality of this credential. Authorized personnel will never solicit this code from you under any circumstances.
@if($ipAddress || $browser !== 'Unknown')
---
**Authentication Request Origin Details**
@if($requestedAt)
- Time: {{ $requestedAt }}
@endif
@if($ipAddress)
- IP address: {{ $ipAddress }}
@endif
@if($browser !== 'Unknown' || $os !== 'Unknown')
- Device: {{ $browser }} on {{ $os }}
@endif
@endif
If you did not explicitly authorize this access attempt, please disregard this communication. Should you persistently receive unauthorized verification requests, we strongly mandate an immediate review and update of your security credentials.
Sincerely,
**{{ config('app.name') }} Security Operations**
</x-mail::message>