update php fpm ini (#258)

This commit is contained in:
Saeed Vaziry
2024-07-27 12:51:13 +02:00
committed by GitHub
parent 55269dbcde
commit 9473d198e1
9 changed files with 77 additions and 33 deletions

View File

@ -37,16 +37,19 @@ class="cursor-pointer"
>
{{ __("Install Extension") }}
</x-dropdown-link>
<x-dropdown-link
class="cursor-pointer"
x-on:click="version = '{{ $php->version }}'; $dispatch('open-modal', 'update-php-ini'); document.getElementById('ini').value = 'Loading...';"
hx-get="{{ route('servers.php.get-ini', ['server' => $server, 'version' => $php->version]) }}"
hx-swap="outerHTML"
hx-target="#update-php-ini-form"
hx-select="#update-php-ini-form"
>
{{ __("Edit php.ini") }}
</x-dropdown-link>
@foreach ([\App\Enums\PHPIniType::FPM, \App\Enums\PHPIniType::CLI] as $type)
<x-dropdown-link
class="cursor-pointer"
x-on:click="version = '{{ $php->version }}'; $dispatch('open-modal', 'update-php-ini-{{ $type }}'); document.getElementById('ini').value = 'Loading...';"
hx-get="{{ route('servers.php.get-ini', ['server' => $server, 'version' => $php->version, 'type' => $type]) }}"
hx-swap="outerHTML"
hx-target="#update-php-ini-{{ $type }}-form"
hx-select="#update-php-ini-{{ $type }}-form"
>
{{ __("Edit php.ini (:type)", ["type" => $type]) }}
</x-dropdown-link>
@endforeach
<x-dropdown-link
class="cursor-pointer"
href="{{ route('servers.services.restart', ['server' => $server, 'service' => $php]) }}"
@ -85,6 +88,7 @@ class="cursor-pointer"
method="delete"
x-bind:action="uninstallAction"
/>
@include("php.partials.update-php-ini")
@include("php.partials.update-php-ini", ["type" => \App\Enums\PHPIniType::CLI])
@include("php.partials.update-php-ini", ["type" => \App\Enums\PHPIniType::FPM])
@include("php.partials.install-extension")
</div>

View File

@ -1,15 +1,16 @@
<x-modal name="update-php-ini">
<x-modal name="update-php-ini-{{ $type }}">
<form
id="update-php-ini-form"
id="update-php-ini-{{ $type }}-form"
hx-post="{{ route("servers.php.update-ini", ["server" => $server]) }}"
hx-swap="outerHTML"
hx-select="#update-php-ini-form"
hx-select="#update-php-ini-{{ $type }}-form"
class="p-6"
>
<input type="hidden" name="type" value="{{ $type }}" />
<input type="hidden" name="version" :value="version" />
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
{{ __("Update php.ini") }}
{{ __("Update php.ini (:type)", ["type" => $type]) }}
</h2>
<div class="mt-6">