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.

show/hide debug logs

Andras Bacsaic97efda49ba3
diff --git a/app/Http/Livewire/Project/Application/DeploymentNavbar.php b/app/Http/Livewire/Project/Application/DeploymentNavbar.php
index cbc280fde8..5daa2f84fc 100644
--- a/app/Http/Livewire/Project/Application/DeploymentNavbar.php
+++ b/app/Http/Livewire/Project/Application/DeploymentNavbar.php
@@ -15,6 +15,7 @@ class DeploymentNavbar extends Component
protected $listeners = ['deploymentFinished'];
public ApplicationDeploymentQueue $application_deployment_queue;
+ public bool $is_debug_enabled = false;
public function deploymentFinished()
{
@@ -25,6 +26,7 @@ class DeploymentNavbar extends Component
$application = Application::find($this->application_deployment_queue->application_id);
$application->settings->is_debug_enabled = !$application->settings->is_debug_enabled;
$application->settings->save();
+ $this->is_debug_enabled = $application->settings->is_debug_enabled;
$this->emit('refreshQueue');
}
public function cancel()
diff --git a/resources/views/livewire/project/application/deployment-navbar.blade.php b/resources/views/livewire/project/application/deployment-navbar.blade.php
index 8566c1faf5..28866083f7 100644
--- a/resources/views/livewire/project/application/deployment-navbar.blade.php
+++ b/resources/views/livewire/project/application/deployment-navbar.blade.php
@@ -1,6 +1,10 @@
<div class="flex items-center gap-2 pb-4">
<h2>Logs</h2>
- <x-forms.button wire:click.prevent="show_debug">Show Debug Logs</x-forms.button>
+ @if ($is_debug_enabled)
+ <x-forms.button wire:click.prevent="show_debug">Hide Debug Logs</x-forms.button>
+ @else
+ <x-forms.button wire:click.prevent="show_debug">Show Debug Logs</x-forms.button>
+ @endif
@if (data_get($application_deployment_queue, 'status') === 'in_progress' ||
data_get($application_deployment_queue, 'status') === 'queued')
<x-forms.button wire:click.prevent="cancel">Cancel deployment</x-forms.button>