added a help system, replaced the words "tenant" and "Pwa" with better alternatives. corrected and implemented cron jobs. prepared going live on a coolify-powered system.

This commit is contained in:
Codex Agent
2025-11-10 16:23:09 +01:00
parent ba9e64dfcb
commit 447a90a742
123 changed files with 6398 additions and 153 deletions

View File

@@ -0,0 +1,69 @@
<x-filament-panels::page>
<div class="space-y-6">
<x-filament::section heading="Service Controls">
<div class="grid gap-4 md:grid-cols-2">
@foreach($services as $service)
<div class="rounded-2xl border border-slate-200/70 bg-white/80 p-4 shadow-sm dark:border-white/10 dark:bg-slate-900/60">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-semibold text-slate-700 dark:text-slate-200">{{ $service['label'] }}</p>
<p class="text-xs text-slate-500 dark:text-slate-400">{{ $service['service_id'] }}</p>
</div>
<span class="rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-700 dark:bg-slate-800 dark:text-slate-100">
{{ ucfirst($service['status'] ?? 'unknown') }}
</span>
</div>
<div class="mt-4 flex flex-wrap gap-2">
<x-filament::button size="sm" color="warning" wire:click="restart('{{ $service['service_id'] }}')">
Restart
</x-filament::button>
<x-filament::button size="sm" color="gray" wire:click="redeploy('{{ $service['service_id'] }}')">
Redeploy
</x-filament::button>
@if($coolifyWebUrl)
<x-filament::button tag="a" size="sm" color="gray" href="{{ $coolifyWebUrl }}/services/{{ $service['service_id'] }}" target="_blank">
Open in Coolify
</x-filament::button>
@endif
</div>
</div>
@endforeach
</div>
</x-filament::section>
<x-filament::section heading="Recent Actions">
<div class="overflow-x-auto">
<table class="min-w-full text-sm">
<thead>
<tr class="text-left text-xs uppercase tracking-wide text-slate-500">
<th class="px-3 py-2">When</th>
<th class="px-3 py-2">User</th>
<th class="px-3 py-2">Service</th>
<th class="px-3 py-2">Action</th>
<th class="px-3 py-2">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100">
@forelse($recentLogs as $log)
<tr>
<td class="px-3 py-2 text-slate-700 dark:text-slate-200">{{ $log['created_at'] }}</td>
<td class="px-3 py-2 text-slate-600">{{ $log['user'] }}</td>
<td class="px-3 py-2 font-mono text-xs">{{ $log['service_id'] }}</td>
<td class="px-3 py-2">{{ ucfirst($log['action']) }}</td>
<td class="px-3 py-2">{{ $log['status_code'] ?? '—' }}</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-3 py-4 text-center text-slate-500">No actions recorded yet.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<x-filament::link href="{{ route('filament.superadmin.resources.coolify-action-logs.index') }}" class="mt-3 inline-flex text-sm text-primary-600">
View full log
</x-filament::link>
</x-filament::section>
</div>
</x-filament-panels::page>

View File

@@ -0,0 +1,48 @@
<x-filament-widgets::widget>
<x-filament::section heading="Infra Status (Coolify)">
<div class="grid gap-4 md:grid-cols-2">
@forelse($services as $service)
<div class="rounded-2xl border border-slate-200/70 bg-white/80 p-4 shadow-sm dark:border-white/10 dark:bg-slate-900/60">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-semibold text-slate-600 dark:text-slate-200">{{ $service['label'] }}</p>
<p class="text-xs text-slate-500 dark:text-slate-400">{{ $service['service_id'] }}</p>
</div>
<span @class([
'rounded-full px-3 py-1 text-xs font-semibold',
'bg-emerald-100 text-emerald-800' => $service['status'] === 'running',
'bg-amber-100 text-amber-800' => $service['status'] === 'deploying',
'bg-rose-100 text-rose-800' => $service['status'] === 'unreachable' || $service['status'] === 'error',
'bg-slate-100 text-slate-600' => ! in_array($service['status'], ['running', 'deploying', 'unreachable', 'error']),
])>
{{ ucfirst($service['status']) }}
</span>
</div>
@if(isset($service['error']))
<p class="mt-3 text-xs text-rose-600 dark:text-rose-400">{{ $service['error'] }}</p>
@else
<dl class="mt-3 grid grid-cols-3 gap-2 text-xs">
<div>
<dt class="text-slate-500 dark:text-slate-400">CPU</dt>
<dd class="font-semibold text-slate-900 dark:text-white">{{ $service['cpu'] ?? '—' }}%</dd>
</div>
<div>
<dt class="text-slate-500 dark:text-slate-400">Memory</dt>
<dd class="font-semibold text-slate-900 dark:text-white">{{ $service['memory'] ?? '—' }}%</dd>
</div>
<div>
<dt class="text-slate-500 dark:text-slate-400">Last Deploy</dt>
<dd class="font-semibold text-slate-900 dark:text-white">
{{ $service['last_deploy'] ? \Illuminate\Support\Carbon::parse($service['last_deploy'])->diffForHumans() : '—' }}
</dd>
</div>
</dl>
@endif
</div>
@empty
<p class="text-sm text-slate-500 dark:text-slate-300">No Coolify services configured.</p>
@endforelse
</div>
</x-filament::section>
</x-filament-widgets::widget>