feat: dashboard live deployment view
This commit is contained in:
@@ -19,7 +19,7 @@ button[isError] {
|
||||
}
|
||||
|
||||
.main {
|
||||
@apply pt-4 pl-24 pr-10 mx-auto;
|
||||
@apply pt-4 pl-24 pr-10 lg:pr-32 lg:pl-44;
|
||||
}
|
||||
|
||||
.custom-modal {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@auth
|
||||
<livewire:realtime-connection />
|
||||
@endauth
|
||||
<main class="pb-10 main max-w-screen-2xl">
|
||||
<main class="pb-10 main">
|
||||
{{ $slot }}
|
||||
</main>
|
||||
@endsection
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>Your subscription has been activated! Welcome onboard! <br>It could take a few seconds before your subscription is activated.<br> Please be patient.</span>
|
||||
<span>Your subscription has been activated! Welcome onboard! <br>It could take a few seconds before your
|
||||
subscription is activated.<br> Please be patient.</span>
|
||||
</div>
|
||||
@endif
|
||||
@if ($projects->count() === 0 && $servers->count() === 0)
|
||||
@@ -29,14 +30,14 @@
|
||||
@foreach ($projects as $project)
|
||||
<div class="gap-2 border border-transparent cursor-pointer box group">
|
||||
@if (data_get($project, 'environments.0.name'))
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<div class="font-bold text-white">{{ $project->name }}</div>
|
||||
<div class="description">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
@else
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<div class="font-bold text-white">{{ $project->name }}</div>
|
||||
<div class="description">
|
||||
@@ -44,11 +45,11 @@
|
||||
</a>
|
||||
@endif
|
||||
<div class="flex items-center">
|
||||
<a class="mx-4 rounded group-hover:text-white hover:no-underline"
|
||||
<a class="mx-4 rounded group-hover:text-white hover:no-underline"
|
||||
href="{{ route('project.resource.create', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<span class="font-bold hover:text-warning">+ New Resource</span>
|
||||
</a>
|
||||
<a class="mx-4 rounded group-hover:text-white"
|
||||
<a class="mx-4 rounded group-hover:text-white"
|
||||
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
@@ -72,12 +73,11 @@
|
||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||
@endif
|
||||
@foreach ($servers as $server)
|
||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
||||
@class([
|
||||
'gap-2 border cursor-pointer box group',
|
||||
'border-transparent' => $server->settings->is_reachable,
|
||||
'border-red-500' => !$server->settings->is_reachable,
|
||||
])>
|
||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}" @class([
|
||||
'gap-2 border cursor-pointer box group',
|
||||
'border-transparent' => $server->settings->is_reachable,
|
||||
'border-red-500' => !$server->settings->is_reachable,
|
||||
])>
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="font-bold text-white">
|
||||
{{ $server->name }}
|
||||
@@ -99,6 +99,38 @@
|
||||
<div class="flex-1"></div>
|
||||
</a>
|
||||
@endforeach
|
||||
<div class="flex items-center gap-2">
|
||||
<h3 class="py-4">Deployments </h3>
|
||||
@if ($deployments_per_server->count() > 0)
|
||||
<x-loading />
|
||||
@endif
|
||||
</div>
|
||||
<div wire:poll.1000ms="get_deployments" class="grid grid-cols-1 gap-2 lg:grid-cols-3">
|
||||
@forelse ($deployments_per_server as $deployment)
|
||||
<a href="{{ url($deployment->deployment_url) }}" @class([
|
||||
'gap-2 cursor-pointer box group border-l-2 border-dotted',
|
||||
'border-yellow-500' => $deployment->status === 'queued',
|
||||
'border-green-500' => $deployment->status === 'in_progress',
|
||||
])>
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="font-bold text-white">
|
||||
{{ $deployment->application_name }}
|
||||
</div>
|
||||
@if ($deployment->pull_request_id !== 0)
|
||||
<div class="description">
|
||||
PR #{{ $deployment->pull_request_id }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="description">
|
||||
{{ $deployment->status }} on server {{ $deployment->server_name }}.
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1"></div>
|
||||
</a>
|
||||
@empty
|
||||
<div>No queued / in progress deployments</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function gotoProject(uuid, environment = 'production') {
|
||||
|
||||
Reference in New Issue
Block a user