Files
ladill-servers/resources/views/hosting/panel/logs.blade.php
T
isaaccladandCursor b6c8ac343f Extract Ladill Servers as standalone app at servers.ladill.com.
VPS and dedicated server ordering, managed panels, SSO, billing, and launcher integration — forked from hosting infrastructure with server-focused routes and dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 19:18:30 +00:00

81 lines
5.5 KiB
PHP

<x-hosting-panel-layout :account="$account">
<x-slot name="title">Error Logs - {{ $account->username }}</x-slot>
<x-slot name="header">Error Logs</x-slot>
<div class="space-y-6">
@if(session('success'))
<div class="rounded-lg bg-emerald-50 border border-emerald-200 p-4">
<p class="text-sm text-emerald-800">{{ session('success') }}</p>
</div>
@endif
@if(session('error'))
<div class="rounded-lg bg-red-50 border border-red-200 p-4">
<p class="text-sm text-red-800">{{ session('error') }}</p>
</div>
@endif
<div class="flex flex-wrap items-center gap-4">
<div class="flex rounded-lg border border-slate-200 bg-white p-1">
<a href="{{ route('hosting.panel.logs', ['account' => $account, 'type' => 'error', 'lines' => $lines]) }}"
class="rounded-md px-4 py-2 text-sm font-medium transition {{ $logType === 'error' ? 'bg-indigo-600 text-white' : 'text-slate-600 hover:bg-slate-50' }}">
Error Log
</a>
<a href="{{ route('hosting.panel.logs', ['account' => $account, 'type' => 'access', 'lines' => $lines]) }}"
class="rounded-md px-4 py-2 text-sm font-medium transition {{ $logType === 'access' ? 'bg-indigo-600 text-white' : 'text-slate-600 hover:bg-slate-50' }}">
Access Log
</a>
</div>
<form action="{{ route('hosting.panel.logs', $account) }}" method="GET" class="flex items-center gap-2">
<input type="hidden" name="type" value="{{ $logType }}">
<select name="lines" onchange="this.form.submit()" class="rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value="50" {{ $lines == 50 ? 'selected' : '' }}>Last 50 lines</option>
<option value="100" {{ $lines == 100 ? 'selected' : '' }}>Last 100 lines</option>
<option value="200" {{ $lines == 200 ? 'selected' : '' }}>Last 200 lines</option>
<option value="500" {{ $lines == 500 ? 'selected' : '' }}>Last 500 lines</option>
</select>
</form>
<form action="{{ route('hosting.panel.logs.clear', $account) }}" method="POST" onsubmit="return confirm('Clear this log file?')" class="ml-auto">
@csrf
<input type="hidden" name="type" value="{{ $logType }}">
<button type="submit" class="inline-flex items-center gap-2 rounded-lg border border-red-200 bg-white px-4 py-2 text-sm font-medium text-red-600 hover:bg-red-50 transition">
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"/></svg>
Clear Log
</button>
</form>
</div>
<div class="rounded-xl border border-slate-200 bg-white overflow-hidden">
<div class="px-6 py-4 border-b border-slate-200 flex items-center justify-between">
<div>
<h3 class="text-base font-semibold text-slate-900">{{ $logType === 'error' ? 'Error Log' : 'Access Log' }}</h3>
<p class="mt-1 text-xs text-slate-500">{{ $logFilePath }}</p>
</div>
<a href="{{ route('hosting.panel.logs', ['account' => $account, 'type' => $logType, 'lines' => $lines]) }}" class="inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-3 py-1.5 text-xs font-medium text-slate-600 hover:bg-slate-50 transition">
<svg class="h-3.5 w-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"/></svg>
Refresh
</a>
</div>
<div class="bg-slate-900 p-4 overflow-x-auto max-h-[600px] overflow-y-auto">
<pre class="text-xs font-mono text-slate-300 whitespace-pre-wrap break-all">{{ $logContent }}</pre>
</div>
</div>
<div class="rounded-xl border border-blue-200 bg-blue-50 p-6">
<h3 class="text-base font-semibold text-blue-900 mb-2">Log File Locations</h3>
<div class="grid gap-3 sm:grid-cols-2">
<div>
<p class="text-xs font-medium text-blue-700">Error Log</p>
<code class="text-xs font-mono text-blue-800 bg-blue-100 px-1.5 py-0.5 rounded">{{ $errorLogPath }}</code>
</div>
<div>
<p class="text-xs font-medium text-blue-700">Access Log</p>
<code class="text-xs font-mono text-blue-800 bg-blue-100 px-1.5 py-0.5 rounded">{{ $accessLogPath }}</code>
</div>
</div>
</div>
</div>
</x-hosting-panel-layout>