Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old admin area #648

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
7 changes: 0 additions & 7 deletions app/Exceptions/AccountNotFoundException.php

This file was deleted.

7 changes: 0 additions & 7 deletions app/Exceptions/AutoDeploymentException.php

This file was deleted.

4 changes: 0 additions & 4 deletions app/Exceptions/DisplayException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Psr\Log\LoggerInterface;
use Illuminate\Http\Response;
use Illuminate\Container\Container;
use Prologue\Alerts\AlertsMessageBag;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

class DisplayException extends PanelException implements HttpExceptionInterface
Expand Down Expand Up @@ -67,9 +66,6 @@ public function render(Request $request): bool|RedirectResponse|JsonResponse
return response()->json(Handler::toArray($this), $this->getStatusCode(), $this->getHeaders());
}

// @phpstan-ignore-next-line
app(AlertsMessageBag::class)->danger($this->getMessage())->flash();

return redirect()->back()->withInput();
}

Expand Down
3 changes: 0 additions & 3 deletions app/Exceptions/Http/Connection/DaemonConnectionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use App\Exceptions\DisplayException;
use Illuminate\Support\Facades\Context;

/**
* @method \GuzzleHttp\Exception\GuzzleException getPrevious()
*/
class DaemonConnectionException extends DisplayException
{
private int $statusCode = Response::HTTP_GATEWAY_TIMEOUT;
Expand Down
9 changes: 0 additions & 9 deletions app/Exceptions/Http/Server/FileTypeNotEditableException.php

This file was deleted.

14 changes: 0 additions & 14 deletions app/Exceptions/ManifestDoesNotExistException.php

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions app/Exceptions/Repository/RepositoryException.php

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions app/Exceptions/Service/Egg/BadJsonFormatException.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions app/Extensions/Facades/Theme.php

This file was deleted.

21 changes: 0 additions & 21 deletions app/Extensions/Themes/Theme.php

This file was deleted.

14 changes: 0 additions & 14 deletions app/Facades/LogBatch.php

This file was deleted.

9 changes: 5 additions & 4 deletions app/Filament/Resources/ServerResource/Pages/EditServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
use App\Enums\ContainerStatus;
use App\Enums\ServerState;
use App\Filament\Resources\ServerResource;
use App\Http\Controllers\Admin\ServersController;
use App\Models\Database;
use App\Models\Egg;
use App\Models\Server;
use App\Models\ServerVariable;
use App\Services\Databases\DatabaseManagementService;
use App\Services\Databases\DatabasePasswordService;
use App\Services\Servers\RandomWordService;
use App\Services\Servers\ReinstallServerService;
use App\Services\Servers\ServerDeletionService;
use App\Services\Servers\SuspensionService;
use App\Services\Servers\ToggleInstallService;
use App\Services\Servers\TransferServerService;
use Closure;
use Exception;
Expand Down Expand Up @@ -631,8 +632,8 @@ public function form(Form $form): Form
Action::make('toggleInstall')
->label('Toggle Install Status')
->disabled(fn (Server $server) => $server->isSuspended())
->action(function (ServersController $serversController, Server $server) {
$serversController->toggleInstall($server);
->action(function (ToggleInstallService $service, Server $server) {
$service->handle($server);

$this->refreshFormData(['status', 'docker']);
}),
Expand Down Expand Up @@ -718,7 +719,7 @@ public function form(Form $form): Form
->modalHeading('Are you sure you want to reinstall this server?')
->modalDescription('!! This can result in unrecoverable data loss !!')
->disabled(fn (Server $server) => $server->isSuspended())
->action(fn (ServersController $serversController, Server $server) => $serversController->reinstallServer($server)),
->action(fn (ReinstallServerService $service, Server $server) => $service->handle($server)),
])->fullWidth(),
ToggleButtons::make('')
->hint('This will reinstall the server with the assigned egg install script.'),
Expand Down
20 changes: 0 additions & 20 deletions app/Helpers/Time.php

This file was deleted.

90 changes: 0 additions & 90 deletions app/Http/Controllers/Admin/ApiController.php

This file was deleted.

25 changes: 0 additions & 25 deletions app/Http/Controllers/Admin/BaseController.php

This file was deleted.

Loading
Loading