Files
Mark Gregory bc9427ac33 Deployment environments
* Development, staging, and production environment types
* Protected-environment support
* Deployment targets
* Local, SSH, Docker, and Kubernetes driver foundation
* Deployment pipelines
* Configurable pipeline steps
* Manual and approval-based releases
* Deployment release history
* Individual deployment-step tracking
* HTTP health checks
* Response-time tracking
* Rollback records
* Secret-reference metadata
* Encrypted target configuration
* Encrypted environment variables
* Administration dashboard
* Authenticated API endpoints
* Health-check command
* Release-history pruning command
* Permissions
* Sidebar integration
* Module registration
* Feature test
2026-07-24 13:57:56 +01:00

45 lines
3.8 KiB
PHP

<x-layouts.app :title="__('Cloud & DevOps')">
<div class="flex h-full w-full flex-1 flex-col gap-6 rounded-xl">
<div>
<flux:heading size="xl">Cloud & DevOps</flux:heading>
<flux:subheading>Manage environments, deployment releases, pipelines and service health.</flux:subheading>
</div>
@if (session('status'))
<flux:callout variant="success">{{ session('status') }}</flux:callout>
@endif
<div class="grid gap-4 md:grid-cols-3">
<div class="rounded-xl border p-5"><p class="text-sm text-zinc-500">Environments</p><p class="mt-2 text-3xl font-semibold">{{ $environments->count() }}</p></div>
<div class="rounded-xl border p-5"><p class="text-sm text-zinc-500">Recent releases</p><p class="mt-2 text-3xl font-semibold">{{ $releases->count() }}</p></div>
<div class="rounded-xl border p-5"><p class="text-sm text-zinc-500">Healthy checks</p><p class="mt-2 text-3xl font-semibold">{{ $checks->where('status', 'healthy')->count() }}</p></div>
</div>
@can('cloud-devops.manage')
<form method="POST" action="{{ route('administration.cloud-devops.environments.store') }}" class="grid gap-3 rounded-xl border p-5 md:grid-cols-4">
@csrf
<flux:input name="name" label="Environment name" required />
<flux:input name="slug" label="Slug" required />
<flux:select name="type" label="Type"><option value="development">Development</option><option value="staging">Staging</option><option value="production">Production</option></flux:select>
<div class="flex items-end"><flux:button type="submit" variant="primary">Create environment</flux:button></div>
</form>
@endcan
<section class="space-y-3">
<flux:heading size="lg">Environments</flux:heading>
<div class="grid gap-4 lg:grid-cols-2">
@forelse ($environments as $environment)
<article class="rounded-xl border p-5">
<div class="flex items-center justify-between gap-3"><div><h2 class="font-semibold">{{ $environment->name }}</h2><p class="text-sm text-zinc-500">{{ ucfirst($environment->type) }} · {{ ucfirst($environment->status) }}</p></div>@if ($environment->is_protected)<flux:badge color="amber">Protected</flux:badge>@endif</div>
<div class="mt-4 grid grid-cols-3 gap-3 text-sm"><div><span class="text-zinc-500">Targets</span><p>{{ $environment->targets_count }}</p></div><div><span class="text-zinc-500">Pipelines</span><p>{{ $environment->pipelines_count }}</p></div><div><span class="text-zinc-500">Releases</span><p>{{ $environment->releases_count }}</p></div></div>
</article>
@empty
<div class="col-span-full rounded-xl border p-8 text-center text-zinc-500">No deployment environments configured.</div>
@endforelse
</div>
</section>
<section class="space-y-3"><flux:heading size="lg">Recent releases</flux:heading><div class="overflow-hidden rounded-xl border"><table class="w-full text-sm"><thead class="bg-zinc-50 dark:bg-zinc-900"><tr><th class="p-3 text-left">Version</th><th class="p-3 text-left">Environment</th><th class="p-3 text-left">Status</th><th class="p-3 text-left">Created</th></tr></thead><tbody>@forelse ($releases as $release)<tr class="border-t"><td class="p-3">{{ $release->version }}</td><td class="p-3">{{ $release->environment?->name }}</td><td class="p-3">{{ ucfirst(str_replace('_', ' ', $release->status)) }}</td><td class="p-3">{{ $release->created_at?->diffForHumans() }}</td></tr>@empty<tr><td colspan="4" class="p-6 text-center text-zinc-500">No releases yet.</td></tr>@endforelse</tbody></table></div></section>
</div>
</x-layouts.app>