-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from andreapollastri/4.x
Dashboard and Server Wip
- Loading branch information
Showing
16 changed files
with
750 additions
and
662 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,58 @@ | ||
<?php | ||
|
||
namespace App\Filament\Pages; | ||
|
||
use App\Helpers\Scripts; | ||
use Filament\Actions\Action; | ||
use Filament\Notifications\Actions\ActionGroup; | ||
use Filament\Notifications\Notification; | ||
use Filament\Pages\Dashboard as BaseDashboard; | ||
|
||
class Dashboard extends BaseDashboard | ||
{ | ||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
ActionGroup::make([ | ||
Action::make('restart-nginx') | ||
->label('Restart nginx') | ||
->icon('heroicon-o-arrow-path'), | ||
Action::make('restart-php') | ||
->label('Restart PHP-FPM') | ||
->icon('heroicon-o-arrow-path'), | ||
Action::make('restart-mysql') | ||
->label('Restart MySql') | ||
->icon('heroicon-o-arrow-path'), | ||
Action::make('restart-redis') | ||
->label('Restart Redis') | ||
->icon('heroicon-o-arrow-path'), | ||
Action::make('restart-supervisor') | ||
->label('Restart Supervisor') | ||
->icon('heroicon-o-arrow-path'), | ||
Action::make('edit-server-name') | ||
->label('Edit Server Name') | ||
->icon('heroicon-o-pencil-square') | ||
->fillForm(fn (): array => [ | ||
'serverName' => config('panel.serverName'), | ||
]) | ||
->form([ | ||
\Filament\Forms\Components\TextInput::make('serverName') | ||
->label('Name') | ||
->hint('The name of the server, e.g. "Production Server", "Staging Server", etc.') | ||
->required(), | ||
]) | ||
->action(function (array $data): void { | ||
Scripts::updateServerName($data['serverName']); | ||
|
||
Notification::make() | ||
->title('Server name updated successfully.') | ||
->success() | ||
->send(); | ||
}), | ||
Action::make('reset-server-password') | ||
->label('Reset Server Password') | ||
->icon('heroicon-o-key'), | ||
]), | ||
]; | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,16 @@ | ||
#!/bin/bash | ||
|
||
cp .env.example .env | ||
|
||
docker run --rm \ | ||
-u "$(id -u):$(id -g)" \ | ||
-v "$(pwd):/var/www/html" \ | ||
-w /var/www/html \ | ||
laravelsail/php83-composer:latest \ | ||
composer install --ignore-platform-reqs | ||
|
||
./vendor/bin/sail up -d | ||
|
||
./vendor/bin/sail bash -c "php artisan key:generate" | ||
|
||
./vendor/bin/sail bash -c "php artisan storage:link" |
File renamed without changes.
Oops, something went wrong.