Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Merge branch 'next' into docker-cleanup-executions-ui

🏔️ Peak881914dc866e
diff --cc resources/views/components/server/sidebar.blade.php
index f1413b4744,9c6d572581..93ec207855
--- a/resources/views/components/server/sidebar.blade.php
+++ b/resources/views/components/server/sidebar.blade.php
@@@ -1,7 -1,12 +1,7 @@@
<div class="flex flex-col items-start gap-2 min-w-fit">
- <a class="menu-item {{ $activeMenu === 'general' ? 'menu-item-active' : '' }}"
+ <a wire:navigate class="menu-item {{ $activeMenu === 'general' ? 'menu-item-active' : '' }}"
href="{{ route('server.show', ['server_uuid' => $server->uuid]) }}">General</a>
- @if ($server->isFunctional())
- <a wire:navigate class="menu-item {{ $activeMenu === 'advanced' ? 'menu-item-active' : '' }}"
- href="{{ route('server.advanced', ['server_uuid' => $server->uuid]) }}">Advanced
- </a>
- @endif
- <a wire:navigate class="menu-item {{ $activeMenu === 'private-key' ? 'menu-item-active' : '' }}"
+ <a class="menu-item {{ $activeMenu === 'private-key' ? 'menu-item-active' : '' }}"
href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">Private Key
</a>
@if (!$server->isLocalhost())
@@@ -10,19 -15,13 +10,19 @@@
Tunnels</a>
@endif
@if ($server->isFunctional())
- <a wire:navigate class="menu-item {{ $activeMenu === 'destinations' ? 'menu-item-active' : '' }}"
+ <a class="menu-item {{ $activeMenu === 'docker-cleanup' ? 'menu-item-active' : '' }}"
+ href="{{ route('server.docker-cleanup', ['server_uuid' => $server->uuid]) }}">Docker Cleanup
+ </a>
+ <a class="menu-item {{ $activeMenu === 'destinations' ? 'menu-item-active' : '' }}"
href="{{ route('server.destinations', ['server_uuid' => $server->uuid]) }}">Destinations
</a>
- <a wire:navigate class="menu-item {{ $activeMenu === 'log-drains' ? 'menu-item-active' : '' }}"
+ <a class="menu-item {{ $activeMenu === 'advanced' ? 'menu-item-active' : '' }}"
+ href="{{ route('server.advanced', ['server_uuid' => $server->uuid]) }}">Advanced
+ </a>
+ <a class="menu-item {{ $activeMenu === 'log-drains' ? 'menu-item-active' : '' }}"
href="{{ route('server.log-drains', ['server_uuid' => $server->uuid]) }}">Log
Drains</a>
- <a class="menu-item {{ $activeMenu === 'metrics' ? 'menu-item-active' : '' }}"
+ <a wire:navigate class="menu-item {{ $activeMenu === 'metrics' ? 'menu-item-active' : '' }}"
href="{{ route('server.charts', ['server_uuid' => $server->uuid]) }}">Metrics</a>
@endif
@if (!$server->isLocalhost())
diff --cc resources/views/livewire/project/application/deployment/index.blade.php
index 0555f90d74,81ed9832af..9256ac73de
--- a/resources/views/livewire/project/application/deployment/index.blade.php
+++ b/resources/views/livewire/project/application/deployment/index.blade.php
@@@ -32,55 -32,38 +32,55 @@@
@forelse ($deployments as $deployment)
<div @class([
'dark:bg-coolgray-100 p-2 border-l-2 transition-colors hover:no-underline box-without-bg-without-border bg-white flex-col cursor-pointer dark:hover:text-neutral-400 dark:hover:bg-coolgray-200',
- 'border-white border-dashed ' =>
- data_get($deployment, 'status') === 'in_progress' ||
- data_get($deployment, 'status') === 'cancelled-by-user',
- 'border-error border-dashed ' =>
- data_get($deployment, 'status') === 'failed',
+ 'border-blue-500/50 border-dashed' => data_get($deployment, 'status') === 'in_progress',
+ 'border-purple-500/50 border-dashed' => data_get($deployment, 'status') === 'queued',
+ 'border-white border-dashed' => data_get($deployment, 'status') === 'cancelled-by-user',
+ 'border-error' => data_get($deployment, 'status') === 'failed',
'border-success' => data_get($deployment, 'status') === 'finished',
])
- x-on:click.stop="goto('{{ $current_url . '/' . data_get($deployment, 'deployment_uuid') }}')">
+ wire:navigate href="{{ $current_url . '/' . data_get($deployment, 'deployment_uuid') }}">
<div class="flex flex-col justify-start">
- <div class="flex gap-1">
- {{ $deployment->created_at }} UTC
- <span class=" dark:text-warning">></span>
- {{ $deployment->status }}
+ <div class="flex items-center gap-2 mb-2">
+ <span @class([
+ 'px-3 py-1 rounded-md text-xs font-medium tracking-wide shadow-sm',
+ 'bg-blue-100/80 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300 dark:shadow-blue-900/5' => data_get($deployment, 'status') === 'in_progress',
+ 'bg-purple-100/80 text-purple-700 dark:bg-purple-500/20 dark:text-purple-300 dark:shadow-purple-900/5' => data_get($deployment, 'status') === 'queued',
+ 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-200 dark:shadow-red-900/5' => data_get($deployment, 'status') === 'failed',
+ 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 dark:shadow-green-900/5' => data_get($deployment, 'status') === 'finished',
+ 'bg-gray-100 text-gray-700 dark:bg-gray-600/30 dark:text-gray-300 dark:shadow-gray-900/5' => data_get($deployment, 'status') === 'cancelled-by-user',
+ ])>
+ @php
+ $statusText = match(data_get($deployment, 'status')) {
+ 'finished' => 'Success',
+ 'in_progress' => 'In Progress',
+ 'cancelled-by-user' => 'Cancelled',
+ 'queued' => 'Queued',
+ default => ucfirst(data_get($deployment, 'status'))
+ };
+ @endphp
+ {{ $statusText }}
+ </span>
</div>
- @if (data_get($deployment, 'is_webhook') || data_get($deployment, 'pull_request_id'))
- <div class="flex items-center gap-1">
- @if (data_get($deployment, 'is_webhook'))
- Webhook
- @endif
- @if (data_get($deployment, 'pull_request_id'))
- @if (data_get($deployment, 'is_webhook'))
- |
- @endif
- Pull Request #{{ data_get($deployment, 'pull_request_id') }}
+ @if(data_get($deployment, 'status') !== 'queued')
+ <div class="text-gray-600 dark:text-gray-400 text-sm">
+ Started: {{ formatDateInServerTimezone(data_get($deployment, 'created_at'), data_get($application, 'destination.server')) }}
+ @if($deployment->status !== 'in_progress')
+ <br>Ended: {{ formatDateInServerTimezone(data_get($deployment, 'updated_at'), data_get($application, 'destination.server')) }}
+ <br>Duration: {{ calculateDuration(data_get($deployment, 'created_at'), data_get($deployment, 'updated_at')) }}
+ @else
+ <br>Running for: {{ calculateDuration(data_get($deployment, 'created_at'), now()) }}
@endif
+ </div>
+ @endif
+
+ <div class="text-gray-600 dark:text-gray-400 text-sm mt-2">
+ <div class="flex items-center gap-2">
@if (data_get($deployment, 'commit'))
- <div class="dark:hover:text-white"
- wire:navigate.prevent href="{{ $application->gitCommitLink(data_get($deployment, 'commit')) }}">
- <div class="text-xs underline">
+ <span>
+ Commit: <span class="dark:hover:text-white cursor-pointer underline"
+ x-on:click.stop="goto('{{ $application->gitCommitLink(data_get($deployment, 'commit')) }}')">
@if ($deployment->commitMessage())
- ({{ data_get_str($deployment, 'commit')->limit(7) }} -
- {{ $deployment->commitMessage() }})
+ {{ data_get_str($deployment, 'commit')->limit(7) }} - {{ $deployment->commitMessage() }}
@else
{{ data_get_str($deployment, 'commit')->limit(7) }}
@endif
@@@ -116,13 -119,46 +116,6 @@@
@empty
<div class="">No deployments found</div>
@endforelse
--
-- @if ($deployments_count > 0)
- <script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/utc.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js"></script>
-- <script>
- function goto(url) {
- window.location.href = url;
- };
- let timers = {};
-
- dayjs.extend(window.dayjs_plugin_utc);
- dayjs.extend(window.dayjs_plugin_relativeTime);
-
- Alpine.data('elapsedTime', (uuid, status, created_at, updated_at) => ({
- finished_time: 'calculating...',
- started_time: 'calculating...',
- init() {
- if (timers[uuid]) {
- clearInterval(timers[uuid]);
- }
- if (status === 'in_progress') {
- timers[uuid] = setInterval(() => {
- this.finished_time = dayjs().diff(dayjs.utc(created_at),
- 'second') + 's'
- }, 1000);
- } else {
- let seconds = dayjs.utc(updated_at).diff(dayjs.utc(created_at), 'second')
- this.finished_time = seconds + 's';
- }
- },
- measure_finished_time() {
- if (this.finished_time > 2000) {
- return 0;
- } else {
- return this.finished_time;
- }
- },
- measure_since_started() {
- return dayjs.utc(created_at).fromNow(true); // "true" prevents the "ago" suffix
- },
- }))
-- </script>
@endif
</div>
</div>