-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
229 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Http\Livewire\Services; | ||
|
||
use App\Actions\Service\InstallPHPMyAdmin as InstallPHPMyAdminAction; | ||
use App\Models\Server; | ||
use Illuminate\Contracts\View\View; | ||
use Livewire\Component; | ||
|
||
class InstallPHPMyAdmin extends Component | ||
{ | ||
public Server $server; | ||
|
||
public string $allowed_ip; | ||
|
||
public string $port = '5433'; | ||
|
||
public function install(): void | ||
{ | ||
app(InstallPHPMyAdminAction::class)->install($this->server, $this->all()); | ||
|
||
$this->dispatchBrowserEvent('started', true); | ||
|
||
$this->emitTo(ServicesList::class, '$refresh'); | ||
} | ||
|
||
public function render(): View | ||
{ | ||
return view('livewire.services.install-phpmyadmin'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,7 +324,6 @@ | |
'https' => 443, | ||
'mysql' => 3306, | ||
'ftp' => 21, | ||
'phpmyadmin' => 54331, | ||
'tcp' => '', | ||
'udp' => '', | ||
], | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
server { | ||
listen 54331; | ||
listen __port__; | ||
server_name _; | ||
root /home/vito/phpmyadmin; | ||
|
||
|
33 changes: 33 additions & 0 deletions
33
resources/views/livewire/services/install-phpmyadmin.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<x-modal name="install-phpmyadmin"> | ||
<form wire:submit.prevent="install" class="p-6"> | ||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> | ||
{{ __('Install PHPMyAdmin') }} | ||
</h2> | ||
|
||
<div class="mt-6"> | ||
<x-input-label for="allowed_ip" :value="__('Allowed IP')" /> | ||
<x-text-input wire:model.defer="allowed_ip" id="allowed_ip" name="allowed_ip" class="mt-1 w-full" /> | ||
@error('allowed_ip') | ||
<x-input-error class="mt-2" :messages="$message" /> | ||
@enderror | ||
</div> | ||
|
||
<div class="mt-6"> | ||
<x-input-label for="port" :value="__('Port')" /> | ||
<x-text-input wire:model.defer="port" id="port" name="port" class="mt-1 w-full" /> | ||
@error('port') | ||
<x-input-error class="mt-2" :messages="$message" /> | ||
@enderror | ||
</div> | ||
|
||
<div class="mt-6 flex justify-end"> | ||
<x-secondary-button type="button" x-on:click="$dispatch('close')"> | ||
{{ __('Cancel') }} | ||
</x-secondary-button> | ||
|
||
<x-primary-button class="ml-3" @started.window="$dispatch('close')"> | ||
{{ __('Install') }} | ||
</x-primary-button> | ||
</div> | ||
</form> | ||
</x-modal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.