show/hide debug logs
This commit is contained in:
parent
c1a0fbc66f
commit
c97efda49b
@ -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 @@ public function show_debug()
|
||||
$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()
|
||||
|
@ -1,6 +1,10 @@
|
||||
<div class="flex items-center gap-2 pb-4">
|
||||
<h2>Logs</h2>
|
||||
@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>
|
||||
|
Loading…
Reference in New Issue
Block a user