Skip to content

Commit

Permalink
fix: add finished_at to app deployment jobs
Browse files Browse the repository at this point in the history
fix: show deployment job running measurements
fix: terminal should not be wire:navigated
  • Loading branch information
andrasbacsai committed Jan 16, 2025
1 parent 11414d3 commit 55d61ff
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 29 deletions.
4 changes: 4 additions & 0 deletions app/Jobs/ApplicationDeploymentJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ public function handle(): void
$this->fail($e);
throw $e;
} finally {
$this->application_deployment_queue->update([
'finished_at' => now(),
]);

if ($this->use_build_server) {
$this->server = $this->build_server;
} else {
Expand Down
4 changes: 2 additions & 2 deletions app/Livewire/Project/Application/Deployment/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Index extends Component

public int $skip = 0;

public int $default_take = 40;
public int $default_take = 10;

public bool $show_next = false;

Expand All @@ -42,7 +42,7 @@ public function mount()
if (! $application) {
return redirect()->route('dashboard');
}
['deployments' => $deployments, 'count' => $count] = $application->deployments(0, 40);
['deployments' => $deployments, 'count' => $count] = $application->deployments(0, $this->default_take);
$this->application = $application;
$this->deployments = $deployments;
$this->deployments_count = $count;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up()
{
Schema::table('application_deployment_queues', function (Blueprint $table) {
$table->timestamp('finished_at')->nullable();
});
}

public function down()
{
Schema::table('application_deployment_queues', function (Blueprint $table) {
$table->dropColumn('finished_at');
});
}
};
1 change: 1 addition & 0 deletions public/js/dayjs-plugin-relativeTime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/js/dayjs-plugin-utc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/js/dayjs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/views/components/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class="{{ request()->is('tags*') ? 'menu-item-active menu-item' : 'menu-item' }}
</a>
</li>
<li>
<a title="Terminal" wire:navigate
<a title="Terminal"
class="{{ request()->is('terminal*') ? 'menu-item-active menu-item' : 'menu-item' }}"
href="{{ route('terminal') }}">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/server/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
]) }}">
<button>Resources</button>
</a>
<a wire:navigate class="{{ request()->routeIs('server.command') ? 'dark:text-white' : '' }}"
<a class="{{ request()->routeIs('server.command') ? 'dark:text-white' : '' }}"
href="{{ route('server.command', [
'server_uuid' => data_get($server, 'uuid'),
]) }}">
Expand Down
4 changes: 3 additions & 1 deletion resources/views/layouts/base.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
<script type="text/javascript" src="{{ URL::asset('js/echo.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('js/pusher.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('js/apexcharts.js') }}"></script>

<script type="text/javascript" src="{{ URL::asset('js/dayjs.min.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('js/dayjs-plugin-utc.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('js/dayjs-plugin-relativeTime.js') }}"></script>
@endauth
</head>
@section('body')
Expand Down
Loading

0 comments on commit 55d61ff

Please sign in to comment.