diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php index 3c9e9c5bc4a..bc1aa5b9a6a 100644 --- a/app/Actions/Fortify/CreateNewUser.php +++ b/app/Actions/Fortify/CreateNewUser.php @@ -3,9 +3,9 @@ namespace Convoy\Actions\Fortify; use Convoy\Models\User; +use Illuminate\Validation\Rule; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; -use Illuminate\Validation\Rule; use Laravel\Fortify\Contracts\CreatesNewUsers; class CreateNewUser implements CreatesNewUsers diff --git a/app/Actions/Fortify/UpdateUserProfileInformation.php b/app/Actions/Fortify/UpdateUserProfileInformation.php index f49aa9f43c8..331e65f911e 100644 --- a/app/Actions/Fortify/UpdateUserProfileInformation.php +++ b/app/Actions/Fortify/UpdateUserProfileInformation.php @@ -2,9 +2,9 @@ namespace Convoy\Actions\Fortify; -use Illuminate\Contracts\Auth\MustVerifyEmail; -use Illuminate\Support\Facades\Validator; use Illuminate\Validation\Rule; +use Illuminate\Support\Facades\Validator; +use Illuminate\Contracts\Auth\MustVerifyEmail; use Laravel\Fortify\Contracts\UpdatesUserProfileInformation; class UpdateUserProfileInformation implements UpdatesUserProfileInformation diff --git a/app/Casts/MebibytesToAndFromBytes.php b/app/Casts/MebibytesToAndFromBytes.php index 01bc78d6335..f84a591bbd7 100644 --- a/app/Casts/MebibytesToAndFromBytes.php +++ b/app/Casts/MebibytesToAndFromBytes.php @@ -2,8 +2,8 @@ namespace Convoy\Casts; -use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; +use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class MebibytesToAndFromBytes implements CastsAttributes { diff --git a/app/Casts/NullableEncrypter.php b/app/Casts/NullableEncrypter.php index 57139d4f91f..c4dd6756bf9 100644 --- a/app/Casts/NullableEncrypter.php +++ b/app/Casts/NullableEncrypter.php @@ -2,9 +2,9 @@ namespace Convoy\Casts; -use Illuminate\Contracts\Database\Eloquent\CastsAttributes; -use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Database\Eloquent\Model; +use Illuminate\Contracts\Encryption\Encrypter; +use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class NullableEncrypter implements CastsAttributes { diff --git a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php index 7784f20edf7..d0c31a4fe9d 100644 --- a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php +++ b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php @@ -3,9 +3,9 @@ namespace Convoy\Console\Commands\Maintenance; use Carbon\CarbonImmutable; -use Convoy\Repositories\Eloquent\BackupRepository; -use Illuminate\Console\Command; use InvalidArgumentException; +use Illuminate\Console\Command; +use Convoy\Repositories\Eloquent\BackupRepository; class PruneOrphanedBackupsCommand extends Command { diff --git a/app/Console/Commands/Maintenance/PruneUsersCommand.php b/app/Console/Commands/Maintenance/PruneUsersCommand.php index b6750bc1c06..1c9b8a31d33 100644 --- a/app/Console/Commands/Maintenance/PruneUsersCommand.php +++ b/app/Console/Commands/Maintenance/PruneUsersCommand.php @@ -2,9 +2,9 @@ namespace Convoy\Console\Commands\Maintenance; -use Convoy\Jobs\Node\PruneUsersJob; use Convoy\Models\Node; use Illuminate\Console\Command; +use Convoy\Jobs\Node\PruneUsersJob; use Illuminate\Console\View\Components\Task; class PruneUsersCommand extends Command diff --git a/app/Console/Commands/Server/UpdateRateLimitsCommand.php b/app/Console/Commands/Server/UpdateRateLimitsCommand.php index 6dc9c28e1ac..2cfdc7b7512 100644 --- a/app/Console/Commands/Server/UpdateRateLimitsCommand.php +++ b/app/Console/Commands/Server/UpdateRateLimitsCommand.php @@ -2,10 +2,10 @@ namespace Convoy\Console\Commands\Server; -use Convoy\Jobs\Node\SyncServerRateLimitsJob; use Convoy\Models\Node; use Illuminate\Console\Command; use Illuminate\Console\View\Components\Task; +use Convoy\Jobs\Node\SyncServerRateLimitsJob; class UpdateRateLimitsCommand extends Command { diff --git a/app/Console/Commands/Server/UpdateUsagesCommand.php b/app/Console/Commands/Server/UpdateUsagesCommand.php index dce29a4916b..42b6d77ca25 100644 --- a/app/Console/Commands/Server/UpdateUsagesCommand.php +++ b/app/Console/Commands/Server/UpdateUsagesCommand.php @@ -2,9 +2,9 @@ namespace Convoy\Console\Commands\Server; -use Convoy\Jobs\Node\SyncServerUsagesJob; use Convoy\Models\Node; use Illuminate\Console\Command; +use Convoy\Jobs\Node\SyncServerUsagesJob; use Illuminate\Console\View\Components\Task; class UpdateUsagesCommand extends Command diff --git a/app/Console/Commands/User/MakeUserCommand.php b/app/Console/Commands/User/MakeUserCommand.php index abd97a22ca7..e5927689f69 100644 --- a/app/Console/Commands/User/MakeUserCommand.php +++ b/app/Console/Commands/User/MakeUserCommand.php @@ -25,11 +25,11 @@ namespace Convoy\Console\Commands\User; -use Convoy\Exceptions\Model\DataValidationException; -use Convoy\Models\User; use Exception; +use Convoy\Models\User; use Illuminate\Console\Command; use Illuminate\Support\Facades\Hash; +use Convoy\Exceptions\Model\DataValidationException; class MakeUserCommand extends Command { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 9f9d869b84e..fdff99fc683 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,15 +2,15 @@ namespace Convoy\Console; -use Convoy\Console\Commands\Maintenance\PruneOrphanedBackupsCommand; -use Convoy\Console\Commands\Maintenance\PruneUsersCommand; -use Convoy\Console\Commands\Server\ResetUsagesCommand; -use Convoy\Console\Commands\Server\UpdateRateLimitsCommand; -use Convoy\Console\Commands\Server\UpdateUsagesCommand; use Convoy\Models\ActivityLog; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Database\Console\PruneCommand; +use Convoy\Console\Commands\Server\ResetUsagesCommand; +use Convoy\Console\Commands\Server\UpdateUsagesCommand; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use Convoy\Console\Commands\Maintenance\PruneUsersCommand; +use Convoy\Console\Commands\Server\UpdateRateLimitsCommand; +use Convoy\Console\Commands\Maintenance\PruneOrphanedBackupsCommand; class Kernel extends ConsoleKernel { diff --git a/app/Contracts/Repository/ActivityRepositoryInterface.php b/app/Contracts/Repository/ActivityRepositoryInterface.php index e20568ffb46..8141abfba2b 100644 --- a/app/Contracts/Repository/ActivityRepositoryInterface.php +++ b/app/Contracts/Repository/ActivityRepositoryInterface.php @@ -2,8 +2,8 @@ namespace Convoy\Contracts\Repository; -use Convoy\Models\ActivityLog; use Convoy\Models\Server; +use Convoy\Models\ActivityLog; interface ActivityRepositoryInterface extends RepositoryInterface { diff --git a/app/Contracts/Repository/RepositoryInterface.php b/app/Contracts/Repository/RepositoryInterface.php index ab9907cc633..ba61e7521d9 100644 --- a/app/Contracts/Repository/RepositoryInterface.php +++ b/app/Contracts/Repository/RepositoryInterface.php @@ -3,10 +3,10 @@ namespace Convoy\Contracts\Repository; use Closure; +use Illuminate\Support\Collection; use Convoy\Exceptions\Model\DataValidationException; -use Convoy\Exceptions\Repository\RecordNotFoundException; use Illuminate\Contracts\Pagination\LengthAwarePaginator; -use Illuminate\Support\Collection; +use Convoy\Exceptions\Repository\RecordNotFoundException; interface RepositoryInterface { diff --git a/app/Contracts/Repository/ServerRepositoryInterface.php b/app/Contracts/Repository/ServerRepositoryInterface.php index 2d048a6c9b6..5b64f196594 100644 --- a/app/Contracts/Repository/ServerRepositoryInterface.php +++ b/app/Contracts/Repository/ServerRepositoryInterface.php @@ -2,8 +2,8 @@ namespace Convoy\Contracts\Repository; -use Convoy\Exceptions\Repository\RecordNotFoundException; use Convoy\Models\Server; +use Convoy\Exceptions\Repository\RecordNotFoundException; interface ServerRepositoryInterface extends RepositoryInterface { diff --git a/app/Data/Helpers/ChecksumData.php b/app/Data/Helpers/ChecksumData.php index b3871235d44..54c7a61466a 100644 --- a/app/Data/Helpers/ChecksumData.php +++ b/app/Data/Helpers/ChecksumData.php @@ -2,14 +2,15 @@ namespace Convoy\Data\Helpers; -use Convoy\Enums\Helpers\ChecksumAlgorithm; use Spatie\LaravelData\Data; +use Convoy\Enums\Helpers\ChecksumAlgorithm; class ChecksumData extends Data { public function __construct( - public string $checksum, + public string $checksum, public ChecksumAlgorithm $algorithm, - ) { + ) + { } } diff --git a/app/Data/Node/Access/CreateUserData.php b/app/Data/Node/Access/CreateUserData.php index fdee36e5604..48313e88c3e 100644 --- a/app/Data/Node/Access/CreateUserData.php +++ b/app/Data/Node/Access/CreateUserData.php @@ -3,24 +3,25 @@ namespace Convoy\Data\Node\Access; use Carbon\Carbon; +use Spatie\LaravelData\Data; +use Spatie\LaravelData\Casts\EnumCast; use Convoy\Enums\Node\Access\RealmType; -use Spatie\LaravelData\Attributes\Validation\Max; -use Spatie\LaravelData\Attributes\Validation\Min; use Spatie\LaravelData\Attributes\WithCast; -use Spatie\LaravelData\Casts\EnumCast; -use Spatie\LaravelData\Data; +use Spatie\LaravelData\Attributes\Validation\Min; +use Spatie\LaravelData\Attributes\Validation\Max; class CreateUserData extends Data { public function __construct( - #[WithCast(EnumCast::class)] - public RealmType $realm_type, - public bool $enabled, - #[Min(1), Max(60)] - public ?string $username = null, - #[Min(1), Max(64)] - public ?string $password = null, - public ?Carbon $expires_at = null, - ) { + #[WithCast(EnumCast::class)] + public RealmType $realm_type, + public bool $enabled, + #[Min(1), Max(60)] + public ?string $username = null, + #[Min(1), Max(64)] + public ?string $password = null, + public ?Carbon $expires_at = null, + ) + { } } diff --git a/app/Data/Node/Access/UserCredentialsData.php b/app/Data/Node/Access/UserCredentialsData.php index 3d9b5ea21c7..f1e23e540c7 100644 --- a/app/Data/Node/Access/UserCredentialsData.php +++ b/app/Data/Node/Access/UserCredentialsData.php @@ -2,8 +2,8 @@ namespace Convoy\Data\Node\Access; -use Convoy\Enums\Node\Access\RealmType; use Spatie\LaravelData\Data; +use Convoy\Enums\Node\Access\RealmType; class UserCredentialsData extends Data { diff --git a/app/Data/Node/Access/UserData.php b/app/Data/Node/Access/UserData.php index 946a0c23fed..bc30b20a550 100644 --- a/app/Data/Node/Access/UserData.php +++ b/app/Data/Node/Access/UserData.php @@ -3,22 +3,23 @@ namespace Convoy\Data\Node\Access; use Carbon\Carbon; -use Convoy\Enums\Node\Access\RealmType; use Illuminate\Support\Arr; -use Spatie\LaravelData\Attributes\WithCast; -use Spatie\LaravelData\Casts\EnumCast; use Spatie\LaravelData\Data; +use Spatie\LaravelData\Casts\EnumCast; +use Convoy\Enums\Node\Access\RealmType; +use Spatie\LaravelData\Attributes\WithCast; class UserData extends Data { public function __construct( - public string $username, - public ?string $email, - #[WithCast(EnumCast::class)] - public RealmType $realm_type, - public bool $enabled, - public ?Carbon $expires_at, - ) { + public string $username, + public ?string $email, + #[WithCast(EnumCast::class)] + public RealmType $realm_type, + public bool $enabled, + public ?Carbon $expires_at, + ) + { } public static function fromRaw(array $raw): UserData @@ -27,7 +28,7 @@ public static function fromRaw(array $raw): UserData 'username' => explode('@', $raw['userid'])[0], 'email' => Arr::get($raw, 'email'), 'realm_type' => RealmType::from($raw['realm-type']), - 'enabled' => (bool) $raw['enable'], + 'enabled' => (bool)$raw['enable'], 'expires_at' => Arr::get($raw, 'expire') ? Carbon::createFromTimestamp($raw['expire']) : null, ]); } diff --git a/app/Data/Node/Storage/FileMetaData.php b/app/Data/Node/Storage/FileMetaData.php index 85b79910f39..12ced494a30 100644 --- a/app/Data/Node/Storage/FileMetaData.php +++ b/app/Data/Node/Storage/FileMetaData.php @@ -9,7 +9,8 @@ class FileMetaData extends Data public function __construct( public string $file_name, public string $mime_type, - public int $size, - ) { + public int $size, + ) + { } } diff --git a/app/Data/Node/Storage/IsoData.php b/app/Data/Node/Storage/IsoData.php index 79c32d4dd7a..79484df4bf0 100644 --- a/app/Data/Node/Storage/IsoData.php +++ b/app/Data/Node/Storage/IsoData.php @@ -2,7 +2,6 @@ namespace Convoy\Data\Node\Storage; -use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use Spatie\LaravelData\Data; diff --git a/app/Data/Server/Deployments/CloudinitAddressConfigData.php b/app/Data/Server/Deployments/CloudinitAddressConfigData.php index ccfff3af53e..6733f429787 100644 --- a/app/Data/Server/Deployments/CloudinitAddressConfigData.php +++ b/app/Data/Server/Deployments/CloudinitAddressConfigData.php @@ -2,14 +2,15 @@ namespace Convoy\Data\Server\Deployments; -use Convoy\Data\Server\Eloquent\AddressData; use Spatie\LaravelData\Data; +use Convoy\Data\Server\Eloquent\AddressData; class CloudinitAddressConfigData extends Data { public function __construct( - public ?AddressData $ipv4, - public ?AddressData $ipv6, - ) { + public ?AddressData $ipv4, + public ?AddressData $ipv6, + ) + { } } diff --git a/app/Data/Server/Deployments/ServerDeploymentData.php b/app/Data/Server/Deployments/ServerDeploymentData.php index 83f471cba72..2026f5823b1 100644 --- a/app/Data/Server/Deployments/ServerDeploymentData.php +++ b/app/Data/Server/Deployments/ServerDeploymentData.php @@ -9,11 +9,12 @@ class ServerDeploymentData extends Data { public function __construct( - public Server $server, + public Server $server, public ?Template $template, - public ?string $account_password, - public bool $should_create_server, - public bool $start_on_completion, - ) { + public ?string $account_password, + public bool $should_create_server, + public bool $start_on_completion, + ) + { } } diff --git a/app/Data/Server/Eloquent/AddressData.php b/app/Data/Server/Eloquent/AddressData.php index c6190f8d57d..ac7ceca088a 100644 --- a/app/Data/Server/Eloquent/AddressData.php +++ b/app/Data/Server/Eloquent/AddressData.php @@ -2,23 +2,24 @@ namespace Convoy\Data\Server\Eloquent; -use Spatie\LaravelData\Attributes\Validation\In; -use Spatie\LaravelData\Attributes\Validation\IP; use Spatie\LaravelData\Data; +use Spatie\LaravelData\Attributes\Validation\IP; +use Spatie\LaravelData\Attributes\Validation\In; class AddressData extends Data { public function __construct( - public int $id, - public int $address_pool_id, - public ?int $server_id, - #[In(['ipv4', 'ipv6'])] - public string $type, - #[IP] - public string $address, - public int $cidr, - public string $gateway, - public ?string $mac_address, - ) { + public int $id, + public int $address_pool_id, + public ?int $server_id, + #[In(['ipv4', 'ipv6'])] + public string $type, + #[IP] + public string $address, + public int $cidr, + public string $gateway, + public ?string $mac_address, + ) + { } } diff --git a/app/Data/Server/Eloquent/ServerAddressesData.php b/app/Data/Server/Eloquent/ServerAddressesData.php index 876ccae1638..c9b7c471e90 100644 --- a/app/Data/Server/Eloquent/ServerAddressesData.php +++ b/app/Data/Server/Eloquent/ServerAddressesData.php @@ -2,17 +2,18 @@ namespace Convoy\Data\Server\Eloquent; -use Spatie\LaravelData\Attributes\DataCollectionOf; use Spatie\LaravelData\Data; use Spatie\LaravelData\DataCollection; +use Spatie\LaravelData\Attributes\DataCollectionOf; class ServerAddressesData extends Data { public function __construct( - #[DataCollectionOf(AddressData::class)] - public DataCollection $ipv4, - #[DataCollectionOf(AddressData::class)] - public DataCollection $ipv6, - ) { + #[DataCollectionOf(AddressData::class)] + public DataCollection $ipv4, + #[DataCollectionOf(AddressData::class)] + public DataCollection $ipv6, + ) + { } } diff --git a/app/Data/Server/Eloquent/ServerEloquentData.php b/app/Data/Server/Eloquent/ServerEloquentData.php index eb2b5eb61ae..8c5fc846546 100644 --- a/app/Data/Server/Eloquent/ServerEloquentData.php +++ b/app/Data/Server/Eloquent/ServerEloquentData.php @@ -7,16 +7,17 @@ class ServerEloquentData extends Data { public function __construct( - public int $id, - public string $uuid_short, - public string $uuid, - public int $node_id, - public string $hostname, - public string $name, - public ?string $description, - public ?string $status, + public int $id, + public string $uuid_short, + public string $uuid, + public int $node_id, + public string $hostname, + public string $name, + public ?string $description, + public ?string $status, public ServerUsagesData $usages, public ServerLimitsData $limits, - ) { + ) + { } } diff --git a/app/Data/Server/Eloquent/ServerLimitsData.php b/app/Data/Server/Eloquent/ServerLimitsData.php index cf451b936ae..1cb237ddcdc 100644 --- a/app/Data/Server/Eloquent/ServerLimitsData.php +++ b/app/Data/Server/Eloquent/ServerLimitsData.php @@ -7,14 +7,15 @@ class ServerLimitsData extends Data { public function __construct( - public int $cpu, - public int $memory, - public int $disk, - public ?int $snapshots, - public ?int $backups, - public ?int $bandwidth, - public ServerAddressesData $addresses, - public ?string $mac_address, - ) { + public int $cpu, + public int $memory, + public int $disk, + public ?int $snapshots, + public ?int $backups, + public ?int $bandwidth, + public ServerAddressesData $addresses, + public ?string $mac_address, + ) + { } } diff --git a/app/Data/Server/Eloquent/ServerUsagesData.php b/app/Data/Server/Eloquent/ServerUsagesData.php index 5be46bb03ec..767c82bf6b0 100644 --- a/app/Data/Server/Eloquent/ServerUsagesData.php +++ b/app/Data/Server/Eloquent/ServerUsagesData.php @@ -7,7 +7,8 @@ class ServerUsagesData extends Data { public function __construct( - public int $bandwidth - ) { + public int $bandwidth, + ) + { } } diff --git a/app/Data/Server/MacAddressData.php b/app/Data/Server/MacAddressData.php index 49dd53c20f4..3d10d9e6fdb 100644 --- a/app/Data/Server/MacAddressData.php +++ b/app/Data/Server/MacAddressData.php @@ -7,8 +7,9 @@ class MacAddressData extends Data { public function __construct( - public ?string $proxmox, - public ?string $eloquent, - ) { + public ?string $proxmox, + public ?string $eloquent, + ) + { } } diff --git a/app/Data/Server/Proxmox/Config/AddressConfigData.php b/app/Data/Server/Proxmox/Config/AddressConfigData.php index edea9930a92..0a7e7d1014b 100644 --- a/app/Data/Server/Proxmox/Config/AddressConfigData.php +++ b/app/Data/Server/Proxmox/Config/AddressConfigData.php @@ -7,8 +7,9 @@ class AddressConfigData extends Data { public function __construct( - public ?AddressData $ipv4, - public ?AddressData $ipv6, - ) { + public ?AddressData $ipv4, + public ?AddressData $ipv6, + ) + { } } diff --git a/app/Data/Server/Proxmox/Config/AddressData.php b/app/Data/Server/Proxmox/Config/AddressData.php index b926685c7f4..fdc16652899 100644 --- a/app/Data/Server/Proxmox/Config/AddressData.php +++ b/app/Data/Server/Proxmox/Config/AddressData.php @@ -7,9 +7,10 @@ class AddressData extends Data { public function __construct( - public string $address, - public int $cidr, - public string $gateway, - ) { + public string $address, + public int $cidr, + public string $gateway, + ) + { } } diff --git a/app/Data/Server/Proxmox/Config/DiskData.php b/app/Data/Server/Proxmox/Config/DiskData.php index 1c62e28c2be..8e33fb6c3a2 100644 --- a/app/Data/Server/Proxmox/Config/DiskData.php +++ b/app/Data/Server/Proxmox/Config/DiskData.php @@ -2,22 +2,23 @@ namespace Convoy\Data\Server\Proxmox\Config; +use Spatie\LaravelData\Data; +use Spatie\LaravelData\Casts\EnumCast; use Convoy\Enums\Server\DiskInterface; use Spatie\LaravelData\Attributes\WithCast; -use Spatie\LaravelData\Casts\EnumCast; -use Spatie\LaravelData\Data; class DiskData extends Data { public function __construct( #[WithCast(EnumCast::class)] public DiskInterface $interface, - public bool $is_primary_disk, + public bool $is_primary_disk, - public bool $is_media, - public ?string $media_name, + public bool $is_media, + public ?string $media_name, - public int $size, - ) { + public int $size, + ) + { } } diff --git a/app/Data/Server/Proxmox/Config/MediaData.php b/app/Data/Server/Proxmox/Config/MediaData.php index c9e543d79d1..00740a063b0 100644 --- a/app/Data/Server/Proxmox/Config/MediaData.php +++ b/app/Data/Server/Proxmox/Config/MediaData.php @@ -7,7 +7,8 @@ class MediaData extends Data { public function __construct( - // - ) { + // + ) + { } } diff --git a/app/Data/Server/Proxmox/Config/ServerConfigData.php b/app/Data/Server/Proxmox/Config/ServerConfigData.php index d0c3cb0d421..1313303b032 100644 --- a/app/Data/Server/Proxmox/Config/ServerConfigData.php +++ b/app/Data/Server/Proxmox/Config/ServerConfigData.php @@ -2,19 +2,20 @@ namespace Convoy\Data\Server\Proxmox\Config; -use Spatie\LaravelData\Attributes\DataCollectionOf; use Spatie\LaravelData\Data; use Spatie\LaravelData\DataCollection; +use Spatie\LaravelData\Attributes\DataCollectionOf; class ServerConfigData extends Data { public function __construct( - public string $mac_address, - #[DataCollectionOf(DiskData::class)] - public DataCollection $boot_order, - #[DataCollectionOf(DiskData::class)] - public DataCollection $disks, - /* public AddressConfigData $addresses */ - ) { + public string $mac_address, + #[DataCollectionOf(DiskData::class)] + public DataCollection $boot_order, + #[DataCollectionOf(DiskData::class)] + public DataCollection $disks, + /* public AddressConfigData $addresses */ + ) + { } } diff --git a/app/Data/Server/Proxmox/Console/XTermCredentialsData.php b/app/Data/Server/Proxmox/Console/XTermCredentialsData.php index 0056adc6e5c..f2c57ebb0db 100644 --- a/app/Data/Server/Proxmox/Console/XTermCredentialsData.php +++ b/app/Data/Server/Proxmox/Console/XTermCredentialsData.php @@ -2,17 +2,18 @@ namespace Convoy\Data\Server\Proxmox\Console; -use Convoy\Data\Node\Access\UserCredentialsData; -use Convoy\Enums\Node\Access\RealmType; use Spatie\LaravelData\Data; +use Convoy\Enums\Node\Access\RealmType; class XTermCredentialsData extends Data { public function __construct( - public int $port, - public string $ticket, - public string $username, - public RealmType $realm_type, - public string $pve_auth_cookie, - ) {} + public int $port, + public string $ticket, + public string $username, + public RealmType $realm_type, + public string $pve_auth_cookie, + ) + { + } } diff --git a/app/Data/Server/Proxmox/ServerProxmoxData.php b/app/Data/Server/Proxmox/ServerProxmoxData.php index ceebd29a90f..47ed1fdf8d3 100644 --- a/app/Data/Server/Proxmox/ServerProxmoxData.php +++ b/app/Data/Server/Proxmox/ServerProxmoxData.php @@ -2,19 +2,20 @@ namespace Convoy\Data\Server\Proxmox; -use Convoy\Data\Server\Proxmox\Config\ServerConfigData; use Spatie\LaravelData\Data; +use Convoy\Data\Server\Proxmox\Config\ServerConfigData; class ServerProxmoxData extends Data { public function __construct( - public int $id, - public string $uuid_short, - public string $uuid, - public int $node_id, - public string $state, - public bool $locked, + public int $id, + public string $uuid_short, + public string $uuid, + public int $node_id, + public string $state, + public bool $locked, public ServerConfigData $config, - ) { + ) + { } } diff --git a/app/Data/Server/Proxmox/ServerStateData.php b/app/Data/Server/Proxmox/ServerStateData.php index e95104238ea..a82ab6dc6a8 100644 --- a/app/Data/Server/Proxmox/ServerStateData.php +++ b/app/Data/Server/Proxmox/ServerStateData.php @@ -2,18 +2,19 @@ namespace Convoy\Data\Server\Proxmox; -use Convoy\Enums\Server\State; use Spatie\LaravelData\Data; +use Convoy\Enums\Server\State; class ServerStateData extends Data { public function __construct( public State $state, public float $cpu_used, - public int $memory_total, - public int $memory_used, - public int $uptime, - ) { + public int $memory_total, + public int $memory_used, + public int $uptime, + ) + { } public static function fromRaw(array $raw) diff --git a/app/Data/Server/Proxmox/Usages/ServerDiskData.php b/app/Data/Server/Proxmox/Usages/ServerDiskData.php index a73b09d70d9..cbf2a638352 100644 --- a/app/Data/Server/Proxmox/Usages/ServerDiskData.php +++ b/app/Data/Server/Proxmox/Usages/ServerDiskData.php @@ -7,8 +7,9 @@ class ServerDiskData extends Data { public function __construct( - public int $write, - public int $read, - ) { + public int $write, + public int $read, + ) + { } } diff --git a/app/Data/Server/Proxmox/Usages/ServerNetworkData.php b/app/Data/Server/Proxmox/Usages/ServerNetworkData.php index 337ecef576a..76f1ad80059 100644 --- a/app/Data/Server/Proxmox/Usages/ServerNetworkData.php +++ b/app/Data/Server/Proxmox/Usages/ServerNetworkData.php @@ -7,8 +7,9 @@ class ServerNetworkData extends Data { public function __construct( - public int $in, - public int $out, - ) { + public int $in, + public int $out, + ) + { } } diff --git a/app/Data/Server/Proxmox/Usages/ServerUsagesData.php b/app/Data/Server/Proxmox/Usages/ServerUsagesData.php index 2cb4896a230..4856372dfad 100644 --- a/app/Data/Server/Proxmox/Usages/ServerUsagesData.php +++ b/app/Data/Server/Proxmox/Usages/ServerUsagesData.php @@ -7,9 +7,10 @@ class ServerUsagesData extends Data { public function __construct( - public int $bandwidth, - public ServerNetworkData $network, - public ServerDiskData $disk, - ) { + public int $bandwidth, + public ServerNetworkData $network, + public ServerDiskData $disk, + ) + { } } diff --git a/app/Events/Activity/Activity.php b/app/Events/Activity/Activity.php index fa0cf57c01b..d37958d61ee 100644 --- a/app/Events/Activity/Activity.php +++ b/app/Events/Activity/Activity.php @@ -2,9 +2,9 @@ namespace Convoy\Events\Activity; +use Illuminate\Support\Str; use Convoy\Models\ActivityLog; use Illuminate\Database\Eloquent\Model; -use Illuminate\Support\Str; abstract class Activity { diff --git a/app/Exceptions/DisplayException.php b/app/Exceptions/DisplayException.php index 756c5397f86..c833e25e2f2 100644 --- a/app/Exceptions/DisplayException.php +++ b/app/Exceptions/DisplayException.php @@ -3,14 +3,14 @@ namespace Convoy\Exceptions; use Exception; -use Illuminate\Container\Container; -use Illuminate\Http\JsonResponse; -use Illuminate\Http\RedirectResponse; +use Throwable; +use Psr\Log\LoggerInterface; use Illuminate\Http\Request; use Illuminate\Http\Response; -use Psr\Log\LoggerInterface; +use Illuminate\Http\JsonResponse; +use Illuminate\Container\Container; +use Illuminate\Http\RedirectResponse; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Throwable; class DisplayException extends ConvoyException implements HttpExceptionInterface { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index fc17b5533db..d610a11bcd0 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,9 +3,9 @@ namespace Convoy\Exceptions; use Exception; +use Throwable; use Illuminate\Container\Container; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; -use Throwable; class Handler extends ExceptionHandler { diff --git a/app/Exceptions/Http/Server/ServerStatusConflictException.php b/app/Exceptions/Http/Server/ServerStatusConflictException.php index a457c64386b..44b492aa729 100644 --- a/app/Exceptions/Http/Server/ServerStatusConflictException.php +++ b/app/Exceptions/Http/Server/ServerStatusConflictException.php @@ -2,9 +2,9 @@ namespace Convoy\Exceptions\Http\Server; +use Throwable; use Convoy\Models\Server; use Symfony\Component\HttpKernel\Exception\ConflictHttpException; -use Throwable; class ServerStatusConflictException extends ConflictHttpException { diff --git a/app/Exceptions/Model/DataValidationException.php b/app/Exceptions/Model/DataValidationException.php index 9f6f1d76043..6b0ffa29e11 100644 --- a/app/Exceptions/Model/DataValidationException.php +++ b/app/Exceptions/Model/DataValidationException.php @@ -2,11 +2,11 @@ namespace Convoy\Exceptions\Model; +use Illuminate\Support\MessageBag; use Convoy\Exceptions\ConvoyException; -use Illuminate\Contracts\Support\MessageProvider; -use Illuminate\Contracts\Validation\Validator; use Illuminate\Database\Eloquent\Model; -use Illuminate\Support\MessageBag; +use Illuminate\Contracts\Validation\Validator; +use Illuminate\Contracts\Support\MessageProvider; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; class DataValidationException extends ConvoyException implements HttpExceptionInterface, MessageProvider diff --git a/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php b/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php index 6594fd4c890..4a21a0e7580 100644 --- a/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php +++ b/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php @@ -2,9 +2,9 @@ namespace Convoy\Exceptions\Repository\Proxmox; -use Convoy\Exceptions\Repository\RepositoryException; -use Illuminate\Http\Client\RequestException; use Illuminate\Http\Client\Response; +use Illuminate\Http\Client\RequestException; +use Convoy\Exceptions\Repository\RepositoryException; class ProxmoxConnectionException extends RepositoryException { diff --git a/app/Exceptions/Service/Api/InvalidJWTException.php b/app/Exceptions/Service/Api/InvalidJWTException.php index b9d4a28ab1f..8be4cb88064 100644 --- a/app/Exceptions/Service/Api/InvalidJWTException.php +++ b/app/Exceptions/Service/Api/InvalidJWTException.php @@ -1,8 +1,8 @@ [ // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', + \Illuminate\Routing\Middleware\ThrottleRequests::class . ':api', SubstituteBindings::class, ], ]; diff --git a/app/Http/Middleware/Activity/AccountSubject.php b/app/Http/Middleware/Activity/AccountSubject.php index ee5e6e12252..3e8e557f574 100644 --- a/app/Http/Middleware/Activity/AccountSubject.php +++ b/app/Http/Middleware/Activity/AccountSubject.php @@ -3,8 +3,8 @@ namespace Convoy\Http\Middleware\Activity; use Closure; -use Convoy\Facades\LogTarget; use Illuminate\Http\Request; +use Convoy\Facades\LogTarget; use Symfony\Component\HttpFoundation\Response; class AccountSubject diff --git a/app/Http/Middleware/Activity/ServerSubject.php b/app/Http/Middleware/Activity/ServerSubject.php index c296e27a8ef..cceb80485a9 100644 --- a/app/Http/Middleware/Activity/ServerSubject.php +++ b/app/Http/Middleware/Activity/ServerSubject.php @@ -3,9 +3,9 @@ namespace Convoy\Http\Middleware\Activity; use Closure; -use Convoy\Facades\LogTarget; use Convoy\Models\Server; use Illuminate\Http\Request; +use Convoy\Facades\LogTarget; use Symfony\Component\HttpFoundation\Response; class ServerSubject diff --git a/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php b/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php index 7975ba1e274..e74986cceda 100644 --- a/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php +++ b/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php @@ -3,11 +3,11 @@ namespace Convoy\Http\Middleware\Admin\Server; use Closure; -use Convoy\Enums\Server\Status; -use Convoy\Exceptions\Http\Server\ServerStatusConflictException; use Convoy\Models\Server; use Illuminate\Http\Request; +use Convoy\Enums\Server\Status; use Symfony\Component\HttpFoundation\Response; +use Convoy\Exceptions\Http\Server\ServerStatusConflictException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class ValidateServerStatusMiddleware diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index b2af5a7679c..03586133e01 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Middleware; -use Illuminate\Auth\Middleware\Authenticate as Middleware; use Illuminate\Http\Request; +use Illuminate\Auth\Middleware\Authenticate as Middleware; class Authenticate extends Middleware { diff --git a/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php b/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php index 6855f5246e0..5a35d92af26 100644 --- a/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php +++ b/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php @@ -3,10 +3,10 @@ namespace Convoy\Http\Middleware\Client\Server; use Closure; -use Convoy\Exceptions\Http\Server\ServerStatusConflictException; use Convoy\Models\Server; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; +use Convoy\Exceptions\Http\Server\ServerStatusConflictException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class AuthenticateServerAccess diff --git a/app/Http/Middleware/Client/Server/SubstituteBindings.php b/app/Http/Middleware/Client/Server/SubstituteBindings.php index 8c6b1a3c403..0ca1a9fc75c 100644 --- a/app/Http/Middleware/Client/Server/SubstituteBindings.php +++ b/app/Http/Middleware/Client/Server/SubstituteBindings.php @@ -5,8 +5,8 @@ use Closure; use Convoy\Models\Server; use Illuminate\Http\Request; -use Illuminate\Routing\Middleware\SubstituteBindings as Middleware; use Symfony\Component\HttpFoundation\Response; +use Illuminate\Routing\Middleware\SubstituteBindings as Middleware; class SubstituteBindings extends Middleware { diff --git a/app/Http/Middleware/Coterm/CotermAuthenticate.php b/app/Http/Middleware/Coterm/CotermAuthenticate.php index f3c62d12b9b..9b48efd1f92 100644 --- a/app/Http/Middleware/Coterm/CotermAuthenticate.php +++ b/app/Http/Middleware/Coterm/CotermAuthenticate.php @@ -3,10 +3,10 @@ namespace Convoy\Http\Middleware\Coterm; use Convoy\Models\Node; -use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Http\Request; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; class CotermAuthenticate { diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 81f8d7ff1d4..25fdfb0c746 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -3,9 +3,9 @@ namespace Convoy\Http\Middleware; use Closure; -use Convoy\Providers\RouteServiceProvider; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Convoy\Providers\RouteServiceProvider; class RedirectIfAuthenticated { diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 2adc8f2c5fa..6a1ceebd733 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Middleware; -use Illuminate\Http\Middleware\TrustProxies as Middleware; use Illuminate\Http\Request; +use Illuminate\Http\Middleware\TrustProxies as Middleware; class TrustProxies extends Middleware { diff --git a/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php b/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php index 57d766a43dd..5f989fbbb91 100644 --- a/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php +++ b/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php @@ -31,7 +31,10 @@ public function withValidator(Validator $validator): void $rules = []; if ($this->boolean('is_bulk_action')) { - $rules[] = new ValidateAddressType($this->enum('type', AddressType::class), ['starting_address', 'ending_address', 'gateway']); + $rules[] = new ValidateAddressType( + $this->enum('type', AddressType::class), + ['starting_address', 'ending_address', 'gateway'], + ); } if (!$this->boolean('is_bulk_action')) { diff --git a/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php b/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php index 5b44d8caf2b..72eb6c1f860 100644 --- a/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php +++ b/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php @@ -13,7 +13,7 @@ public function rules(): array return [ ...$rules, 'node_ids' => 'sometimes|array', - 'node_ids.*' => 'exists:nodes,id|integer' + 'node_ids.*' => 'exists:nodes,id|integer', ]; } } diff --git a/app/Http/Requests/Admin/AddressPools/UpdateAddressPoolRequest.php b/app/Http/Requests/Admin/AddressPools/UpdateAddressPoolRequest.php index fbab84389cd..747dde64386 100644 --- a/app/Http/Requests/Admin/AddressPools/UpdateAddressPoolRequest.php +++ b/app/Http/Requests/Admin/AddressPools/UpdateAddressPoolRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\AddressPools; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\AddressPool; +use Convoy\Http\Requests\FormRequest; class UpdateAddressPoolRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Nodes/Addresses/StoreAddressRequest.php b/app/Http/Requests/Admin/Nodes/Addresses/StoreAddressRequest.php index 58a9e497046..7ec0cd3a69d 100644 --- a/app/Http/Requests/Admin/Nodes/Addresses/StoreAddressRequest.php +++ b/app/Http/Requests/Admin/Nodes/Addresses/StoreAddressRequest.php @@ -3,12 +3,12 @@ namespace Convoy\Http\Requests\Admin\Nodes\Addresses; use Convoy\Models\Address; +use Illuminate\Support\Arr; use Convoy\Models\AddressPool; +use Illuminate\Validation\Validator; use Convoy\Enums\Network\AddressType; use Convoy\Validation\ValidateAddressType; use Illuminate\Foundation\Http\FormRequest; -use Illuminate\Support\Arr; -use Illuminate\Validation\Validator; use Convoy\Validation\ValidateAddressUniqueness; class StoreAddressRequest extends FormRequest @@ -31,7 +31,10 @@ public function withValidator(Validator $validator): void $rules = []; if ($this->boolean('is_bulk_action')) { - $rules[] = new ValidateAddressType($this->enum('type', AddressType::class), ['starting_address', 'ending_address', 'gateway']); + $rules[] = new ValidateAddressType( + $this->enum('type', AddressType::class), + ['starting_address', 'ending_address', 'gateway'], + ); } if (!$this->boolean('is_bulk_action')) { diff --git a/app/Http/Requests/Admin/Nodes/Addresses/UpdateAddressRequest.php b/app/Http/Requests/Admin/Nodes/Addresses/UpdateAddressRequest.php index 2fc3b057c05..2767319671e 100644 --- a/app/Http/Requests/Admin/Nodes/Addresses/UpdateAddressRequest.php +++ b/app/Http/Requests/Admin/Nodes/Addresses/UpdateAddressRequest.php @@ -2,11 +2,11 @@ namespace Convoy\Http\Requests\Admin\Nodes\Addresses; -use Convoy\Models\AddressPool; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\Address; use Illuminate\Support\Arr; +use Convoy\Models\AddressPool; use Illuminate\Validation\Validator; +use Convoy\Http\Requests\FormRequest; use Convoy\Enums\Network\AddressType; use Convoy\Validation\ValidateAddressType; use Convoy\Validation\ValidateAddressUniqueness; diff --git a/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php b/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php index fff6d1ca79e..d68426bcf16 100644 --- a/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php +++ b/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php @@ -2,13 +2,13 @@ namespace Convoy\Http\Requests\Admin\Nodes\Isos; +use Convoy\Models\ISO; use Convoy\Models\Node; use Illuminate\Validation\Validator; use Convoy\Http\Requests\FormRequest; +use Illuminate\Validation\Rules\Enum; use Convoy\Services\Nodes\Isos\IsoService; use Convoy\Enums\Helpers\ChecksumAlgorithm; -use Convoy\Models\ISO; -use Illuminate\Validation\Rules\Enum; class StoreIsoRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php b/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php index 554e97da2a0..c81533f0b03 100644 --- a/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php +++ b/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Nodes\Isos; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\ISO; +use Convoy\Http\Requests\FormRequest; class UpdateIsoRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Nodes/Settings/UpdateCotermRequest.php b/app/Http/Requests/Admin/Nodes/Settings/UpdateCotermRequest.php index 82b8968be0d..02d12cbd661 100644 --- a/app/Http/Requests/Admin/Nodes/Settings/UpdateCotermRequest.php +++ b/app/Http/Requests/Admin/Nodes/Settings/UpdateCotermRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Nodes\Settings; -use Convoy\Http\Requests\FormRequest; use Illuminate\Validation\Rule; +use Convoy\Http\Requests\FormRequest; class UpdateCotermRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Nodes/StoreNodeRequest.php b/app/Http/Requests/Admin/Nodes/StoreNodeRequest.php index e51b45bffa9..0f6cdb57c49 100644 --- a/app/Http/Requests/Admin/Nodes/StoreNodeRequest.php +++ b/app/Http/Requests/Admin/Nodes/StoreNodeRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Nodes; -use Convoy\Models\Node; use Convoy\Rules\Fqdn; +use Convoy\Models\Node; use Illuminate\Foundation\Http\FormRequest; class StoreNodeRequest extends FormRequest diff --git a/app/Http/Requests/Admin/Nodes/TemplateGroups/UpdateGroupOrderRequest.php b/app/Http/Requests/Admin/Nodes/TemplateGroups/UpdateGroupOrderRequest.php index 076a840d6cc..e2f5f9be361 100644 --- a/app/Http/Requests/Admin/Nodes/TemplateGroups/UpdateGroupOrderRequest.php +++ b/app/Http/Requests/Admin/Nodes/TemplateGroups/UpdateGroupOrderRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Nodes\TemplateGroups; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; +use Illuminate\Foundation\Http\FormRequest; class UpdateGroupOrderRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Nodes/Templates/UpdateTemplateOrderRequest.php b/app/Http/Requests/Admin/Nodes/Templates/UpdateTemplateOrderRequest.php index 2bea22f9523..29f921058c2 100644 --- a/app/Http/Requests/Admin/Nodes/Templates/UpdateTemplateOrderRequest.php +++ b/app/Http/Requests/Admin/Nodes/Templates/UpdateTemplateOrderRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Nodes\Templates; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; +use Illuminate\Foundation\Http\FormRequest; class UpdateTemplateOrderRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Nodes/UpdateNodeRequest.php b/app/Http/Requests/Admin/Nodes/UpdateNodeRequest.php index 1896a24b701..e64a9f98e4e 100644 --- a/app/Http/Requests/Admin/Nodes/UpdateNodeRequest.php +++ b/app/Http/Requests/Admin/Nodes/UpdateNodeRequest.php @@ -2,10 +2,10 @@ namespace Convoy\Http\Requests\Admin\Nodes; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\Node; use Illuminate\Support\Arr; use Illuminate\Validation\Validator; +use Convoy\Http\Requests\FormRequest; class UpdateNodeRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Servers/Settings/UpdateBuildRequest.php b/app/Http/Requests/Admin/Servers/Settings/UpdateBuildRequest.php index af338e240d8..29b88ae9d80 100644 --- a/app/Http/Requests/Admin/Servers/Settings/UpdateBuildRequest.php +++ b/app/Http/Requests/Admin/Servers/Settings/UpdateBuildRequest.php @@ -2,11 +2,11 @@ namespace Convoy\Http\Requests\Admin\Servers\Settings; -use Convoy\Http\Requests\FormRequest; -use Convoy\Models\Address; use Convoy\Models\Node; use Convoy\Models\Server; +use Convoy\Models\Address; use Illuminate\Validation\Validator; +use Convoy\Http\Requests\FormRequest; class UpdateBuildRequest extends FormRequest { @@ -39,7 +39,10 @@ public function withValidator(Validator $validator) foreach ($addresses as $address) { if ($address->server_id !== null && $address->server_id !== $server->id) { - $validator->errors()->add('address_ids', 'One or more of the selected addresses are already in use'); + $validator->errors()->add( + 'address_ids', + 'One or more of the selected addresses are already in use', + ); break; } } diff --git a/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php b/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php index 50bd90d7366..99a724943ec 100644 --- a/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php +++ b/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Servers\Settings; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\Server; +use Convoy\Http\Requests\FormRequest; class UpdateDetailsRequest extends FormRequest { @@ -42,7 +42,7 @@ public function validated($key = null, $default = null): array $data = parent::validated(); // Adjust the limits field to match what is expected by the model. - if (! empty($data['limits'])) { + if (!empty($data['limits'])) { foreach ($data['limits'] as $key => $value) { $data[$key] = $value; } diff --git a/app/Http/Requests/Admin/Servers/Settings/UpdateGeneralInfoRequest.php b/app/Http/Requests/Admin/Servers/Settings/UpdateGeneralInfoRequest.php index d078633351d..c0180055929 100644 --- a/app/Http/Requests/Admin/Servers/Settings/UpdateGeneralInfoRequest.php +++ b/app/Http/Requests/Admin/Servers/Settings/UpdateGeneralInfoRequest.php @@ -2,9 +2,9 @@ namespace Convoy\Http\Requests\Admin\Servers\Settings; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\Server; use Convoy\Rules\Hostname; +use Convoy\Http\Requests\FormRequest; class UpdateGeneralInfoRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Servers/StoreServerRequest.php b/app/Http/Requests/Admin/Servers/StoreServerRequest.php index 61e3bf4196b..f9b3b857b15 100644 --- a/app/Http/Requests/Admin/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Admin/Servers/StoreServerRequest.php @@ -2,13 +2,13 @@ namespace Convoy\Http\Requests\Admin\Servers; -use Convoy\Http\Requests\FormRequest; -use Convoy\Models\Address; use Convoy\Models\Node; use Convoy\Models\Server; -use Convoy\Rules\EnglishKeyboardCharacters; +use Convoy\Models\Address; use Convoy\Rules\Password; use Illuminate\Validation\Validator; +use Convoy\Http\Requests\FormRequest; +use Convoy\Rules\EnglishKeyboardCharacters; /** * @property mixed $type @@ -39,7 +39,8 @@ public function rules(): array 'limits.bandwidth' => $rules['bandwidth_limit'], 'limits.address_ids' => 'sometimes|nullable|array', 'limits.address_ids.*' => 'integer|exists:ip_addresses,id', - 'account_password' => ['required_if:should_create_server,1', 'string', 'min:8', 'max:191', new Password(), new EnglishKeyboardCharacters()], + 'account_password' => ['required_if:should_create_server,1', 'string', 'min:8', 'max:191', new Password( + ), new EnglishKeyboardCharacters()], 'should_create_server' => 'present|boolean', 'template_uuid' => 'required_if:create_server,1|string|exists:templates,uuid', 'start_on_completion' => 'present|boolean', @@ -52,12 +53,15 @@ public function withValidator(Validator $validator) $validator->after(function ($validator) { $addressIds = $this->input('limits.address_ids'); - if (! is_null($addressIds)) { + if (!is_null($addressIds)) { $addresses = Address::whereIn('id', $addressIds)->get(); foreach ($addresses as $address) { if ($address->server_id !== null) { - $validator->errors()->add('limits.address_ids', 'One or more of the selected addresses are already in use'); + $validator->errors()->add( + 'limits.address_ids', + 'One or more of the selected addresses are already in use', + ); break; } } diff --git a/app/Http/Requests/Admin/Users/StoreUserRequest.php b/app/Http/Requests/Admin/Users/StoreUserRequest.php index efe883d9af4..204131844bf 100644 --- a/app/Http/Requests/Admin/Users/StoreUserRequest.php +++ b/app/Http/Requests/Admin/Users/StoreUserRequest.php @@ -3,8 +3,8 @@ namespace Convoy\Http\Requests\Admin\Users; use Convoy\Models\User; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Password; +use Illuminate\Foundation\Http\FormRequest; class StoreUserRequest extends FormRequest { diff --git a/app/Http/Requests/Admin/Users/UpdateUserRequest.php b/app/Http/Requests/Admin/Users/UpdateUserRequest.php index 7018cdbe29d..b956e54afee 100644 --- a/app/Http/Requests/Admin/Users/UpdateUserRequest.php +++ b/app/Http/Requests/Admin/Users/UpdateUserRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Admin\Users; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\User; +use Convoy\Http\Requests\FormRequest; use Illuminate\Validation\Rules\Password; class UpdateUserRequest extends FormRequest diff --git a/app/Http/Requests/Auth/LoginRequest.php b/app/Http/Requests/Auth/LoginRequest.php index 2edae1c7d47..360e6b472c0 100644 --- a/app/Http/Requests/Auth/LoginRequest.php +++ b/app/Http/Requests/Auth/LoginRequest.php @@ -2,11 +2,11 @@ namespace Convoy\Http\Requests\Auth; +use Illuminate\Support\Str; use Illuminate\Auth\Events\Lockout; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\RateLimiter; -use Illuminate\Support\Str; +use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\ValidationException; class LoginRequest extends FormRequest @@ -40,7 +40,7 @@ public function authenticate(): void { $this->ensureIsNotRateLimited(); - if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) { + if (!Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) { RateLimiter::hit($this->throttleKey()); throw ValidationException::withMessages([ @@ -59,7 +59,7 @@ public function authenticate(): void */ public function ensureIsNotRateLimited(): void { - if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { + if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { return; } @@ -80,6 +80,6 @@ public function ensureIsNotRateLimited(): void */ public function throttleKey(): string { - return Str::lower($this->input('email')).'|'.$this->ip(); + return Str::lower($this->input('email')) . '|' . $this->ip(); } } diff --git a/app/Http/Requests/Client/Servers/Backups/StoreBackupRequest.php b/app/Http/Requests/Client/Servers/Backups/StoreBackupRequest.php index 44e69e3cc65..c81d0c59441 100644 --- a/app/Http/Requests/Client/Servers/Backups/StoreBackupRequest.php +++ b/app/Http/Requests/Client/Servers/Backups/StoreBackupRequest.php @@ -2,11 +2,11 @@ namespace Convoy\Http\Requests\Client\Servers\Backups; -use Convoy\Enums\Server\BackupCompressionType; -use Convoy\Enums\Server\BackupMode; use Convoy\Models\Backup; -use Illuminate\Foundation\Http\FormRequest; +use Convoy\Enums\Server\BackupMode; use Illuminate\Validation\Rules\Enum; +use Illuminate\Foundation\Http\FormRequest; +use Convoy\Enums\Server\BackupCompressionType; class StoreBackupRequest extends FormRequest { diff --git a/app/Http/Requests/Client/Servers/CreateConsoleSessionRequest.php b/app/Http/Requests/Client/Servers/CreateConsoleSessionRequest.php index edf01c27d60..1a6dbd9b4c2 100644 --- a/app/Http/Requests/Client/Servers/CreateConsoleSessionRequest.php +++ b/app/Http/Requests/Client/Servers/CreateConsoleSessionRequest.php @@ -2,9 +2,9 @@ namespace Convoy\Http\Requests\Client\Servers; +use Convoy\Models\Server; use Convoy\Enums\Server\ConsoleType; use Convoy\Http\Requests\FormRequest; -use Convoy\Models\Server; use Illuminate\Validation\Rules\Enum; class CreateConsoleSessionRequest extends FormRequest @@ -17,7 +17,7 @@ public function rules(): array $server = $this->parameter('server', Server::class); return [ - 'type' => [$server->node->coterm_enabled ? 'required' : 'exclude', new Enum(ConsoleType::class)] + 'type' => [$server->node->coterm_enabled ? 'required' : 'exclude', new Enum(ConsoleType::class)], ]; } } diff --git a/app/Http/Requests/Client/Servers/SendPowerCommandRequest.php b/app/Http/Requests/Client/Servers/SendPowerCommandRequest.php index 131a7ccdef5..08cafdd75bd 100644 --- a/app/Http/Requests/Client/Servers/SendPowerCommandRequest.php +++ b/app/Http/Requests/Client/Servers/SendPowerCommandRequest.php @@ -3,8 +3,8 @@ namespace Convoy\Http\Requests\Client\Servers; use Convoy\Enums\Server\PowerAction; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Enum; +use Illuminate\Foundation\Http\FormRequest; class SendPowerCommandRequest extends FormRequest { diff --git a/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php b/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php index c8879ed7c15..2b70617a9cd 100644 --- a/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php +++ b/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php @@ -2,8 +2,8 @@ namespace Convoy\Http\Requests\Client\Servers\Settings; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\ISO; +use Convoy\Http\Requests\FormRequest; class MountMediaRequest extends FormRequest { @@ -12,7 +12,7 @@ public function authorize(): bool $iso = $this->parameter('iso', ISO::class); // check if they're authorized to mount a hidden media (iso) - if ($iso->hidden && ! $this->user()->root_admin) { + if ($iso->hidden && !$this->user()->root_admin) { return false; } diff --git a/app/Http/Requests/Client/Servers/Settings/ReinstallServerRequest.php b/app/Http/Requests/Client/Servers/Settings/ReinstallServerRequest.php index 25445fbaf61..5b163c53bbe 100644 --- a/app/Http/Requests/Client/Servers/Settings/ReinstallServerRequest.php +++ b/app/Http/Requests/Client/Servers/Settings/ReinstallServerRequest.php @@ -2,11 +2,11 @@ namespace Convoy\Http\Requests\Client\Servers\Settings; -use Convoy\Http\Requests\FormRequest; use Convoy\Models\Server; +use Convoy\Rules\Password; use Convoy\Models\Template; +use Convoy\Http\Requests\FormRequest; use Convoy\Rules\EnglishKeyboardCharacters; -use Convoy\Rules\Password; class ReinstallServerRequest extends FormRequest { @@ -27,7 +27,8 @@ public function rules(): array { return [ 'template_uuid' => 'required|string|exists:templates,uuid', - 'account_password' => ['required', 'string', 'min:8', 'max:191', new Password(), new EnglishKeyboardCharacters()], + 'account_password' => ['required', 'string', 'min:8', 'max:191', new Password( + ), new EnglishKeyboardCharacters()], 'start_on_completion' => 'present|boolean', ]; } diff --git a/app/Http/Requests/Client/Servers/Settings/UpdateBiosTypeRequest.php b/app/Http/Requests/Client/Servers/Settings/UpdateBiosTypeRequest.php index aa5b43e9dd5..d1c78838c2a 100644 --- a/app/Http/Requests/Client/Servers/Settings/UpdateBiosTypeRequest.php +++ b/app/Http/Requests/Client/Servers/Settings/UpdateBiosTypeRequest.php @@ -3,8 +3,8 @@ namespace Convoy\Http\Requests\Client\Servers\Settings; use Convoy\Enums\Server\BiosType; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Enum; +use Illuminate\Foundation\Http\FormRequest; class UpdateBiosTypeRequest extends FormRequest { diff --git a/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php b/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php index 3ae1e0490c8..f0ec26c4cb9 100644 --- a/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php +++ b/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php @@ -2,14 +2,14 @@ namespace Convoy\Http\Requests\Client\Servers\Settings; -use Convoy\Enums\Server\AuthenticationType; -use Convoy\Rules\EnglishKeyboardCharacters; -use Convoy\Rules\Password; use Exception; -use Illuminate\Foundation\Http\FormRequest; -use Illuminate\Validation\Rules\Enum; +use Convoy\Rules\Password; use Illuminate\Validation\Validator; +use Illuminate\Validation\Rules\Enum; use phpseclib3\Crypt\PublicKeyLoader; +use Convoy\Enums\Server\AuthenticationType; +use Convoy\Rules\EnglishKeyboardCharacters; +use Illuminate\Foundation\Http\FormRequest; class UpdateSecurityRequest extends FormRequest { @@ -29,7 +29,8 @@ public function rules(): array return [ 'type' => [new Enum(AuthenticationType::class), 'required'], 'ssh_keys' => ['nullable', 'string', 'exclude_unless:type,ssh_keys'], - 'password' => ['string', 'min:8', 'max:191', new Password(), new EnglishKeyboardCharacters(), 'exclude_unless:type,password'], + 'password' => ['string', 'min:8', 'max:191', new Password(), new EnglishKeyboardCharacters( + ), 'exclude_unless:type,password'], ]; } diff --git a/app/Http/Requests/Coterm/StoreSessionRequest.php b/app/Http/Requests/Coterm/StoreSessionRequest.php index 12f79f293f1..b6735465423 100644 --- a/app/Http/Requests/Coterm/StoreSessionRequest.php +++ b/app/Http/Requests/Coterm/StoreSessionRequest.php @@ -3,8 +3,8 @@ namespace Convoy\Http\Requests\Coterm; use Convoy\Enums\Server\ConsoleType; -use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Enum; +use Illuminate\Foundation\Http\FormRequest; class StoreSessionRequest extends FormRequest { @@ -14,7 +14,7 @@ class StoreSessionRequest extends FormRequest public function rules(): array { return [ - 'type' => ['required', new Enum(ConsoleType::class)] + 'type' => ['required', new Enum(ConsoleType::class)], ]; } } diff --git a/app/Http/Requests/FormRequest.php b/app/Http/Requests/FormRequest.php index 9f96e28e92d..7ed5f5b4940 100644 --- a/app/Http/Requests/FormRequest.php +++ b/app/Http/Requests/FormRequest.php @@ -2,9 +2,9 @@ namespace Convoy\Http\Requests; +use Webmozart\Assert\Assert; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Http\FormRequest as BaseFormRequest; -use Webmozart\Assert\Assert; abstract class FormRequest extends BaseFormRequest { @@ -51,7 +51,7 @@ public function requiredToOptional(array $rules): array * * @template T of Model * - * @param class-string $expect + * @param class-string $expect * @return T * * @noinspection PhpUndefinedClassInspection diff --git a/app/Jobs/Node/MonitorIsoDownloadJob.php b/app/Jobs/Node/MonitorIsoDownloadJob.php index 51bba2ba9c7..f787d1ba969 100644 --- a/app/Jobs/Node/MonitorIsoDownloadJob.php +++ b/app/Jobs/Node/MonitorIsoDownloadJob.php @@ -3,13 +3,13 @@ namespace Convoy\Jobs\Node; use Convoy\Models\ISO; -use Convoy\Services\Nodes\Isos\IsoMonitorService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; +use Convoy\Services\Nodes\Isos\IsoMonitorService; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; class MonitorIsoDownloadJob implements ShouldQueue { diff --git a/app/Jobs/Node/PruneUsersJob.php b/app/Jobs/Node/PruneUsersJob.php index 5ebe5fc1bb8..b3e8b914b8c 100644 --- a/app/Jobs/Node/PruneUsersJob.php +++ b/app/Jobs/Node/PruneUsersJob.php @@ -3,12 +3,12 @@ namespace Convoy\Jobs\Node; use Convoy\Models\Node; -use Convoy\Services\Nodes\UserPruneService; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Foundation\Bus\Dispatchable; +use Convoy\Services\Nodes\UserPruneService; +use Illuminate\Contracts\Queue\ShouldQueue; class PruneUsersJob implements ShouldQueue { diff --git a/app/Jobs/Node/SyncServerRateLimitsJob.php b/app/Jobs/Node/SyncServerRateLimitsJob.php index 69aaa8b2d9a..6b18eedfac3 100644 --- a/app/Jobs/Node/SyncServerRateLimitsJob.php +++ b/app/Jobs/Node/SyncServerRateLimitsJob.php @@ -3,12 +3,12 @@ namespace Convoy\Jobs\Node; use Convoy\Models\Node; -use Convoy\Services\Nodes\ServerRateLimitsSyncService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\SerializesModels; +use Convoy\Services\Nodes\ServerRateLimitsSyncService; class SyncServerRateLimitsJob implements ShouldQueue { diff --git a/app/Jobs/Node/SyncServerUsagesJob.php b/app/Jobs/Node/SyncServerUsagesJob.php index a4fc0154176..d216dcaecf0 100644 --- a/app/Jobs/Node/SyncServerUsagesJob.php +++ b/app/Jobs/Node/SyncServerUsagesJob.php @@ -3,12 +3,12 @@ namespace Convoy\Jobs\Node; use Convoy\Models\Node; -use Convoy\Services\Nodes\ServerUsagesSyncService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\SerializesModels; +use Convoy\Services\Nodes\ServerUsagesSyncService; class SyncServerUsagesJob implements ShouldQueue { diff --git a/app/Jobs/Server/BuildServerJob.php b/app/Jobs/Server/BuildServerJob.php index 22024ad748d..e7837602bec 100644 --- a/app/Jobs/Server/BuildServerJob.php +++ b/app/Jobs/Server/BuildServerJob.php @@ -2,17 +2,17 @@ namespace Convoy\Jobs\Server; -use Convoy\Enums\Server\Status; use Convoy\Models\Server; use Convoy\Models\Template; -use Convoy\Services\Servers\ServerBuildService; use Illuminate\Bus\Queueable; +use Convoy\Enums\Server\Status; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\Middleware\SkipIfBatchCancelled; +use Convoy\Services\Servers\ServerBuildService; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\Middleware\SkipIfBatchCancelled; class BuildServerJob implements ShouldQueue { diff --git a/app/Jobs/Server/DeleteServerJob.php b/app/Jobs/Server/DeleteServerJob.php index af0ead84c15..54df127ef62 100644 --- a/app/Jobs/Server/DeleteServerJob.php +++ b/app/Jobs/Server/DeleteServerJob.php @@ -3,15 +3,15 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Server; -use Convoy\Services\Servers\ServerBuildService; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\Middleware\SkipIfBatchCancelled; +use Convoy\Services\Servers\ServerBuildService; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\Middleware\SkipIfBatchCancelled; class DeleteServerJob implements ShouldQueue { diff --git a/app/Jobs/Server/MonitorBackupJob.php b/app/Jobs/Server/MonitorBackupJob.php index 06f63bf05c4..804959d1517 100644 --- a/app/Jobs/Server/MonitorBackupJob.php +++ b/app/Jobs/Server/MonitorBackupJob.php @@ -3,13 +3,13 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Backup; -use Convoy\Services\Servers\Backups\BackupMonitorService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Convoy\Services\Servers\Backups\BackupMonitorService; class MonitorBackupJob implements ShouldQueue { diff --git a/app/Jobs/Server/MonitorBackupRestorationJob.php b/app/Jobs/Server/MonitorBackupRestorationJob.php index aa11f177dd8..356d9e14f51 100644 --- a/app/Jobs/Server/MonitorBackupRestorationJob.php +++ b/app/Jobs/Server/MonitorBackupRestorationJob.php @@ -3,13 +3,13 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Server; -use Convoy\Services\Servers\Backups\BackupMonitorService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Convoy\Services\Servers\Backups\BackupMonitorService; class MonitorBackupRestorationJob implements ShouldQueue { diff --git a/app/Jobs/Server/MonitorStateJob.php b/app/Jobs/Server/MonitorStateJob.php index 88d576b4d08..cd9285a571d 100644 --- a/app/Jobs/Server/MonitorStateJob.php +++ b/app/Jobs/Server/MonitorStateJob.php @@ -3,16 +3,16 @@ namespace Convoy\Jobs\Server; use Closure; -use Convoy\Enums\Server\State; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxServerRepository; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; +use Convoy\Enums\Server\State; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\Middleware\SkipIfBatchCancelled; -use Illuminate\Queue\SerializesModels; +use Convoy\Repositories\Proxmox\Server\ProxmoxServerRepository; class MonitorStateJob implements ShouldQueue { diff --git a/app/Jobs/Server/PurgeBackupsJob.php b/app/Jobs/Server/PurgeBackupsJob.php index cfbac6b8c05..d2be3eb6017 100644 --- a/app/Jobs/Server/PurgeBackupsJob.php +++ b/app/Jobs/Server/PurgeBackupsJob.php @@ -4,15 +4,15 @@ use Closure; use Convoy\Models\Server; -use Convoy\Services\Servers\Backups\PurgeBackupsService; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\Middleware\SkipIfBatchCancelled; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\Middleware\SkipIfBatchCancelled; +use Convoy\Services\Servers\Backups\PurgeBackupsService; class PurgeBackupsJob implements ShouldQueue { diff --git a/app/Jobs/Server/SendPowerCommandJob.php b/app/Jobs/Server/SendPowerCommandJob.php index 37960f03af8..8a1edb6f7c2 100644 --- a/app/Jobs/Server/SendPowerCommandJob.php +++ b/app/Jobs/Server/SendPowerCommandJob.php @@ -2,17 +2,17 @@ namespace Convoy\Jobs\Server; -use Convoy\Enums\Server\PowerAction; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxPowerRepository; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; +use Convoy\Enums\Server\PowerAction; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\Middleware\SkipIfBatchCancelled; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\Middleware\SkipIfBatchCancelled; +use Convoy\Repositories\Proxmox\Server\ProxmoxPowerRepository; class SendPowerCommandJob implements ShouldQueue { diff --git a/app/Jobs/Server/SyncBuildJob.php b/app/Jobs/Server/SyncBuildJob.php index 2b6134f877f..dd44cd9368d 100644 --- a/app/Jobs/Server/SyncBuildJob.php +++ b/app/Jobs/Server/SyncBuildJob.php @@ -3,14 +3,14 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Server; -use Convoy\Services\Servers\SyncBuildService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\Middleware\SkipIfBatchCancelled; +use Convoy\Services\Servers\SyncBuildService; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\Middleware\SkipIfBatchCancelled; class SyncBuildJob implements ShouldQueue { diff --git a/app/Jobs/Server/SyncNetworkSettings.php b/app/Jobs/Server/SyncNetworkSettings.php index 708a03bdd8e..1925a7afa0e 100644 --- a/app/Jobs/Server/SyncNetworkSettings.php +++ b/app/Jobs/Server/SyncNetworkSettings.php @@ -4,12 +4,11 @@ use Convoy\Models\Server; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Foundation\Bus\Dispatchable; use Convoy\Services\Servers\NetworkService; -use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\SerializesModels; use Illuminate\Queue\Middleware\WithoutOverlapping; use Illuminate\Queue\Middleware\SkipIfBatchCancelled; diff --git a/app/Jobs/Server/UpdatePasswordJob.php b/app/Jobs/Server/UpdatePasswordJob.php index 5bd4ba2fe26..fd0f66a148c 100644 --- a/app/Jobs/Server/UpdatePasswordJob.php +++ b/app/Jobs/Server/UpdatePasswordJob.php @@ -3,14 +3,14 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Server; -use Convoy\Services\Servers\ServerAuthService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\Middleware\SkipIfBatchCancelled; +use Convoy\Services\Servers\ServerAuthService; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\Middleware\SkipIfBatchCancelled; class UpdatePasswordJob implements ShouldQueue { diff --git a/app/Jobs/Server/WaitUntilVmIsCreatedJob.php b/app/Jobs/Server/WaitUntilVmIsCreatedJob.php index 19f37ff358e..2e7e5c8cf76 100644 --- a/app/Jobs/Server/WaitUntilVmIsCreatedJob.php +++ b/app/Jobs/Server/WaitUntilVmIsCreatedJob.php @@ -3,13 +3,13 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Server; -use Convoy\Services\Servers\ServerBuildService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; +use Convoy\Services\Servers\ServerBuildService; use Illuminate\Queue\Middleware\SkipIfBatchCancelled; -use Illuminate\Queue\SerializesModels; class WaitUntilVmIsCreatedJob implements ShouldQueue { diff --git a/app/Jobs/Server/WaitUntilVmIsDeletedJob.php b/app/Jobs/Server/WaitUntilVmIsDeletedJob.php index 0d450a0f84f..e275dcd8fe5 100644 --- a/app/Jobs/Server/WaitUntilVmIsDeletedJob.php +++ b/app/Jobs/Server/WaitUntilVmIsDeletedJob.php @@ -3,13 +3,13 @@ namespace Convoy\Jobs\Server; use Convoy\Models\Server; -use Convoy\Services\Servers\ServerBuildService; use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Queue\InteractsWithQueue; +use Convoy\Services\Servers\ServerBuildService; use Illuminate\Queue\Middleware\SkipIfBatchCancelled; -use Illuminate\Queue\SerializesModels; class WaitUntilVmIsDeletedJob implements ShouldQueue { diff --git a/app/Models/ActivityLog.php b/app/Models/ActivityLog.php index f3cca1e9e31..d3012717c0a 100644 --- a/app/Models/ActivityLog.php +++ b/app/Models/ActivityLog.php @@ -3,11 +3,11 @@ namespace Convoy\Models; use Carbon\Carbon; -use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use LogicException; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\MorphTo; -use LogicException; +use Illuminate\Database\Eloquent\Factories\HasFactory; class ActivityLog extends Model { diff --git a/app/Models/ActivityLogSubject.php b/app/Models/ActivityLogSubject.php index b40a8852065..c68ee89438a 100644 --- a/app/Models/ActivityLogSubject.php +++ b/app/Models/ActivityLogSubject.php @@ -2,8 +2,8 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class ActivityLogSubject extends Model { diff --git a/app/Models/Address.php b/app/Models/Address.php index a615864745f..e826c6c767f 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -2,8 +2,8 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Address extends Model { diff --git a/app/Models/AddressPool.php b/app/Models/AddressPool.php index f38c557e8ff..beddde62454 100644 --- a/app/Models/AddressPool.php +++ b/app/Models/AddressPool.php @@ -2,8 +2,8 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; class AddressPool extends Model { diff --git a/app/Models/Backup.php b/app/Models/Backup.php index 6f41069f9dd..5ef6a259a86 100644 --- a/app/Models/Backup.php +++ b/app/Models/Backup.php @@ -3,8 +3,8 @@ namespace Convoy\Models; use Convoy\Casts\MebibytesToAndFromBytes; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\SoftDeletes; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Backup extends Model { diff --git a/app/Models/Filters/AllowedNullableFilter.php b/app/Models/Filters/AllowedNullableFilter.php index 7b7a832915e..b97bccbe88b 100644 --- a/app/Models/Filters/AllowedNullableFilter.php +++ b/app/Models/Filters/AllowedNullableFilter.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Spatie\QueryBuilder\AllowedFilter; use Spatie\QueryBuilder\QueryBuilder; +use Spatie\QueryBuilder\AllowedFilter; class AllowedNullableFilter extends AllowedFilter { diff --git a/app/Models/Filters/FiltersAddress.php b/app/Models/Filters/FiltersAddress.php index 848e05a0989..dba98eb203b 100644 --- a/app/Models/Filters/FiltersAddress.php +++ b/app/Models/Filters/FiltersAddress.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Illuminate\Database\Eloquent\Builder; use Spatie\QueryBuilder\Filters\Filter; +use Illuminate\Database\Eloquent\Builder; class FiltersAddress implements Filter { diff --git a/app/Models/Filters/FiltersAddressPool.php b/app/Models/Filters/FiltersAddressPool.php index 0457edfd400..35b5472ea36 100644 --- a/app/Models/Filters/FiltersAddressPool.php +++ b/app/Models/Filters/FiltersAddressPool.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Illuminate\Database\Eloquent\Builder; use Spatie\QueryBuilder\Filters\Filter; +use Illuminate\Database\Eloquent\Builder; class FiltersAddressPool implements Filter { diff --git a/app/Models/Filters/FiltersLocation.php b/app/Models/Filters/FiltersLocation.php index d3c7302eac3..35ae11ee642 100644 --- a/app/Models/Filters/FiltersLocation.php +++ b/app/Models/Filters/FiltersLocation.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Illuminate\Database\Eloquent\Builder; use Spatie\QueryBuilder\Filters\Filter; +use Illuminate\Database\Eloquent\Builder; class FiltersLocation implements Filter { diff --git a/app/Models/Filters/FiltersNode.php b/app/Models/Filters/FiltersNode.php index e09dd71bb66..e1c3ce6bb3f 100644 --- a/app/Models/Filters/FiltersNode.php +++ b/app/Models/Filters/FiltersNode.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Illuminate\Database\Eloquent\Builder; use Spatie\QueryBuilder\Filters\Filter; +use Illuminate\Database\Eloquent\Builder; class FiltersNode implements Filter { diff --git a/app/Models/Filters/FiltersServer.php b/app/Models/Filters/FiltersServer.php index ffc77458ee8..722c6472512 100644 --- a/app/Models/Filters/FiltersServer.php +++ b/app/Models/Filters/FiltersServer.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Illuminate\Database\Eloquent\Builder; use Spatie\QueryBuilder\Filters\Filter; +use Illuminate\Database\Eloquent\Builder; class FiltersServer implements Filter { diff --git a/app/Models/Filters/FiltersUser.php b/app/Models/Filters/FiltersUser.php index c7c92446269..0288cebd98c 100644 --- a/app/Models/Filters/FiltersUser.php +++ b/app/Models/Filters/FiltersUser.php @@ -2,8 +2,8 @@ namespace Convoy\Models\Filters; -use Illuminate\Database\Eloquent\Builder; use Spatie\QueryBuilder\Filters\Filter; +use Illuminate\Database\Eloquent\Builder; class FiltersUser implements Filter { diff --git a/app/Models/Location.php b/app/Models/Location.php index 6c6a76f7c86..1f1d1324d5a 100644 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -2,8 +2,8 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\HasManyThrough; class Location extends Model diff --git a/app/Models/Model.php b/app/Models/Model.php index 17b45129bc4..3f3df3e23a8 100644 --- a/app/Models/Model.php +++ b/app/Models/Model.php @@ -3,18 +3,18 @@ namespace Convoy\Models; use Carbon\CarbonImmutable; -use Convoy\Exceptions\Model\DataValidationException; +use Illuminate\Support\Arr; +use Illuminate\Support\Str; +use Illuminate\Support\Carbon; +use Illuminate\Validation\Rule; use Illuminate\Container\Container; -use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Contracts\Validation\Factory; use Illuminate\Contracts\Validation\Validator; +use Illuminate\Validation\ValidationException; +use Convoy\Exceptions\Model\DataValidationException; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model as IlluminateModel; -use Illuminate\Support\Arr; -use Illuminate\Support\Carbon; -use Illuminate\Support\Str; -use Illuminate\Validation\Rule; -use Illuminate\Validation\ValidationException; +use Illuminate\Contracts\Container\BindingResolutionException; abstract class Model extends IlluminateModel { diff --git a/app/Models/Node.php b/app/Models/Node.php index b0a56dd71e6..079dcd9010f 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -2,12 +2,12 @@ namespace Convoy\Models; -use Convoy\Casts\MebibytesToAndFromBytes; use Convoy\Casts\NullableEncrypter; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use Convoy\Casts\MebibytesToAndFromBytes; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; -use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasManyThrough; class Node extends Model diff --git a/app/Models/SSHKey.php b/app/Models/SSHKey.php index 83b0392462b..6cafcfaf5f5 100644 --- a/app/Models/SSHKey.php +++ b/app/Models/SSHKey.php @@ -2,8 +2,8 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; class SSHKey extends Model { diff --git a/app/Models/Server.php b/app/Models/Server.php index d2143d7fab4..789b3859145 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -2,11 +2,11 @@ namespace Convoy\Models; -use Convoy\Casts\MebibytesToAndFromBytes; use Convoy\Enums\Server\Status; -use Convoy\Exceptions\Http\Server\ServerStatusConflictException; +use Convoy\Casts\MebibytesToAndFromBytes; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\MorphToMany; +use Convoy\Exceptions\Http\Server\ServerStatusConflictException; class Server extends Model { diff --git a/app/Models/Template.php b/app/Models/Template.php index 01b416f9731..4195a5237f4 100644 --- a/app/Models/Template.php +++ b/app/Models/Template.php @@ -2,10 +2,10 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use Ramsey\Uuid\Uuid; use Spatie\EloquentSortable\Sortable; use Spatie\EloquentSortable\SortableTrait; -use Ramsey\Uuid\Uuid; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Template extends Model implements Sortable { diff --git a/app/Models/TemplateGroup.php b/app/Models/TemplateGroup.php index 4ee263abf53..91735b535bc 100644 --- a/app/Models/TemplateGroup.php +++ b/app/Models/TemplateGroup.php @@ -2,10 +2,10 @@ namespace Convoy\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use Ramsey\Uuid\Uuid; use Spatie\EloquentSortable\Sortable; use Spatie\EloquentSortable\SortableTrait; -use Ramsey\Uuid\Uuid; +use Illuminate\Database\Eloquent\Factories\HasFactory; class TemplateGroup extends Model implements Sortable { diff --git a/app/Models/User.php b/app/Models/User.php index 13bd04393d8..79f699fdc02 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,19 +2,19 @@ namespace Convoy\Models; -use Convoy\Enums\Api\ApiKeyType; use Eloquent; -use Illuminate\Auth\Authenticatable; -use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; -use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; -use Illuminate\Database\Eloquent\Factories\HasFactory; -use Illuminate\Database\Eloquent\Relations\HasMany; -use Illuminate\Foundation\Auth\Access\Authorizable; -use Illuminate\Notifications\Notifiable; -use Illuminate\Support\Collection; use Illuminate\Support\Str; +use Convoy\Enums\Api\ApiKeyType; use Laravel\Sanctum\HasApiTokens; +use Illuminate\Support\Collection; use Laravel\Sanctum\NewAccessToken; +use Illuminate\Auth\Authenticatable; +use Illuminate\Notifications\Notifiable; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Foundation\Auth\Access\Authorizable; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; +use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; /** * @mixin Eloquent diff --git a/app/Providers/ActivityLogServiceProvider.php b/app/Providers/ActivityLogServiceProvider.php index a60099c2c24..f58c6cb3855 100644 --- a/app/Providers/ActivityLogServiceProvider.php +++ b/app/Providers/ActivityLogServiceProvider.php @@ -2,9 +2,9 @@ namespace Convoy\Providers; +use Illuminate\Support\ServiceProvider; use Convoy\Services\Activity\ActivityLogBatchService; use Convoy\Services\Activity\ActivityLogTargetableService; -use Illuminate\Support\ServiceProvider; class ActivityLogServiceProvider extends ServiceProvider { diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 0ece9f23b85..b987a6162f9 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,9 +2,9 @@ namespace Convoy\Providers; +use Laravel\Sanctum\Sanctum; use Convoy\Models\PersonalAccessToken; use Illuminate\Support\ServiceProvider; -use Laravel\Sanctum\Sanctum; class AppServiceProvider extends ServiceProvider { diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index c702c60b72d..fff804a00c7 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -2,8 +2,8 @@ namespace Convoy\Providers; -use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Facades\Broadcast; class BroadcastServiceProvider extends ServiceProvider { diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index a3509e54e28..fbef330a756 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -5,7 +5,6 @@ use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; class EventServiceProvider extends ServiceProvider { diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 2911df57e1a..ea778c3377e 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -2,15 +2,15 @@ namespace Convoy\Providers; +use Illuminate\Http\Request; +use Laravel\Fortify\Fortify; +use Illuminate\Support\ServiceProvider; +use Illuminate\Cache\RateLimiting\Limit; use Convoy\Actions\Fortify\CreateNewUser; +use Illuminate\Support\Facades\RateLimiter; use Convoy\Actions\Fortify\ResetUserPassword; use Convoy\Actions\Fortify\UpdateUserPassword; use Convoy\Actions\Fortify\UpdateUserProfileInformation; -use Illuminate\Cache\RateLimiting\Limit; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\RateLimiter; -use Illuminate\Support\ServiceProvider; -use Laravel\Fortify\Fortify; class FortifyServiceProvider extends ServiceProvider { diff --git a/app/Providers/HorizonServiceProvider.php b/app/Providers/HorizonServiceProvider.php index 84ff73d1cb0..9b0a34d0d6b 100644 --- a/app/Providers/HorizonServiceProvider.php +++ b/app/Providers/HorizonServiceProvider.php @@ -3,7 +3,6 @@ namespace Convoy\Providers; use Illuminate\Support\Facades\Gate; -use Laravel\Horizon\Horizon; use Laravel\Horizon\HorizonApplicationServiceProvider; class HorizonServiceProvider extends HorizonApplicationServiceProvider diff --git a/app/Providers/RepositoryServiceProvider.php b/app/Providers/RepositoryServiceProvider.php index 4c2bbeb69c7..b7a0912399e 100644 --- a/app/Providers/RepositoryServiceProvider.php +++ b/app/Providers/RepositoryServiceProvider.php @@ -2,9 +2,9 @@ namespace Convoy\Providers; -use Convoy\Contracts\Repository\ActivityRepositoryInterface; -use Convoy\Repositories\Eloquent\ActivityRepository; use Illuminate\Support\ServiceProvider; +use Convoy\Repositories\Eloquent\ActivityRepository; +use Convoy\Contracts\Repository\ActivityRepositoryInterface; class RepositoryServiceProvider extends ServiceProvider { diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 033c662e9df..3aac9c6cb27 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -2,14 +2,14 @@ namespace Convoy\Providers; -use Convoy\Http\Middleware\AdminAuthenticate; -use Convoy\Http\Middleware\Coterm\CotermAuthenticate; use Convoy\Models\Server; -use Illuminate\Cache\RateLimiting\Limit; -use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Http\Request; -use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\Facades\Route; +use Illuminate\Cache\RateLimiting\Limit; +use Illuminate\Support\Facades\RateLimiter; +use Convoy\Http\Middleware\AdminAuthenticate; +use Convoy\Http\Middleware\Coterm\CotermAuthenticate; +use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider { diff --git a/app/Repositories/Eloquent/ActivityRepository.php b/app/Repositories/Eloquent/ActivityRepository.php index bafde762c62..5b17a3876f1 100644 --- a/app/Repositories/Eloquent/ActivityRepository.php +++ b/app/Repositories/Eloquent/ActivityRepository.php @@ -2,9 +2,9 @@ namespace Convoy\Repositories\Eloquent; -use Convoy\Contracts\Repository\ActivityRepositoryInterface; -use Convoy\Models\ActivityLog; use Convoy\Models\Server; +use Convoy\Models\ActivityLog; +use Convoy\Contracts\Repository\ActivityRepositoryInterface; class ActivityRepository extends EloquentRepository implements ActivityRepositoryInterface { diff --git a/app/Repositories/Eloquent/AddressRepository.php b/app/Repositories/Eloquent/AddressRepository.php index ee7f40577ee..aedc629018b 100644 --- a/app/Repositories/Eloquent/AddressRepository.php +++ b/app/Repositories/Eloquent/AddressRepository.php @@ -5,7 +5,6 @@ use Convoy\Models\Address; use Illuminate\Support\Facades\DB; use Convoy\Enums\Network\AddressType; -use Convoy\Repositories\Eloquent\EloquentRepository; class AddressRepository extends EloquentRepository { diff --git a/app/Repositories/Eloquent/BackupRepository.php b/app/Repositories/Eloquent/BackupRepository.php index fb758cfbf7b..bb48e150f24 100644 --- a/app/Repositories/Eloquent/BackupRepository.php +++ b/app/Repositories/Eloquent/BackupRepository.php @@ -5,8 +5,8 @@ use Carbon\Carbon; use Convoy\Models\Backup; use Convoy\Models\Server; -use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Collection; +use Illuminate\Database\Eloquent\Relations\HasMany; class BackupRepository extends EloquentRepository { diff --git a/app/Repositories/Eloquent/EloquentRepository.php b/app/Repositories/Eloquent/EloquentRepository.php index 22c765a4a56..6fdedea1a7a 100644 --- a/app/Repositories/Eloquent/EloquentRepository.php +++ b/app/Repositories/Eloquent/EloquentRepository.php @@ -3,18 +3,18 @@ namespace Convoy\Repositories\Eloquent; use Closure; +use Illuminate\Http\Request; +use Webmozart\Assert\Assert; +use Illuminate\Support\Collection; +use Convoy\Repositories\Repository; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Query\Expression; use Convoy\Contracts\Repository\RepositoryInterface; use Convoy\Exceptions\Model\DataValidationException; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Convoy\Exceptions\Repository\RecordNotFoundException; -use Convoy\Repositories\Repository; use Illuminate\Contracts\Pagination\LengthAwarePaginator; -use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\ModelNotFoundException; -use Illuminate\Database\Query\Expression; -use Illuminate\Http\Request; -use Illuminate\Support\Collection; -use Webmozart\Assert\Assert; abstract class EloquentRepository extends Repository implements RepositoryInterface { diff --git a/app/Repositories/Eloquent/ServerRepository.php b/app/Repositories/Eloquent/ServerRepository.php index 3b76322a98b..cbf0ab03ba9 100644 --- a/app/Repositories/Eloquent/ServerRepository.php +++ b/app/Repositories/Eloquent/ServerRepository.php @@ -2,11 +2,11 @@ namespace Convoy\Repositories\Eloquent; -use Convoy\Contracts\Repository\ServerRepositoryInterface; -use Convoy\Exceptions\Repository\RecordNotFoundException; use Convoy\Models\Server; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\ModelNotFoundException; +use Convoy\Exceptions\Repository\RecordNotFoundException; +use Convoy\Contracts\Repository\ServerRepositoryInterface; class ServerRepository extends EloquentRepository implements ServerRepositoryInterface { diff --git a/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php b/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php index 8fe994ea28d..44381e485e1 100644 --- a/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php +++ b/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php @@ -2,14 +2,14 @@ namespace Convoy\Repositories\Proxmox\Node; -use Convoy\Data\Node\Access\CreateUserData; -use Convoy\Data\Node\Access\UserCredentialsData; -use Convoy\Data\Node\Access\UserData; -use Convoy\Enums\Node\Access\RealmType; use Convoy\Models\Node; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Illuminate\Support\Str; use Webmozart\Assert\Assert; +use Convoy\Data\Node\Access\UserData; +use Convoy\Enums\Node\Access\RealmType; +use Convoy\Data\Node\Access\CreateUserData; +use Convoy\Data\Node\Access\UserCredentialsData; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxAccessRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php b/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php index 75dfb7113d3..98acad01fc0 100644 --- a/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php +++ b/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php @@ -8,7 +8,6 @@ use Webmozart\Assert\Assert; use Convoy\Data\Helpers\ChecksumData; use Convoy\Data\Node\Storage\IsoData; -use Spatie\LaravelData\DataCollection; use Convoy\Data\Node\Storage\FileMetaData; use Convoy\Enums\Node\Storage\ContentType; use Convoy\Repositories\Proxmox\ProxmoxRepository; diff --git a/app/Repositories/Proxmox/ProxmoxRepository.php b/app/Repositories/Proxmox/ProxmoxRepository.php index 8311f5d72d7..e21e7bc7b13 100644 --- a/app/Repositories/Proxmox/ProxmoxRepository.php +++ b/app/Repositories/Proxmox/ProxmoxRepository.php @@ -2,15 +2,15 @@ namespace Convoy\Repositories\Proxmox; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Node; use Convoy\Models\Server; -use Illuminate\Contracts\Foundation\Application; +use Webmozart\Assert\Assert; +use Illuminate\Support\Facades\Http; +use Illuminate\Http\Client\Response; use Illuminate\Http\Client\PendingRequest; use Illuminate\Http\Client\RequestException; -use Illuminate\Http\Client\Response; -use Illuminate\Support\Facades\Http; -use Webmozart\Assert\Assert; +use Illuminate\Contracts\Foundation\Application; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; abstract class ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php b/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php index d0373270e61..0c7ab27a458 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php @@ -4,8 +4,8 @@ use Convoy\Models\Node; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxActivityRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php b/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php index 48569d97954..4f2d4359507 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php @@ -2,12 +2,12 @@ namespace Convoy\Repositories\Proxmox\Server; -use Convoy\Enums\Server\BackupCompressionType; -use Convoy\Enums\Server\BackupMode; use Convoy\Models\Backup; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Enums\Server\BackupMode; +use Convoy\Enums\Server\BackupCompressionType; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxBackupRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php b/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php index aa2b61eb7ca..da6920e44c4 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php @@ -2,10 +2,10 @@ namespace Convoy\Repositories\Proxmox\Server; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Repositories\Proxmox\ProxmoxRepository; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; class ProxmoxCloudinitRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php b/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php index 706e3733f27..829de63a94d 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php @@ -3,8 +3,8 @@ namespace Convoy\Repositories\Proxmox\Server; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxConfigRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php b/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php index 52dba269293..472c962db55 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php @@ -2,15 +2,13 @@ namespace Convoy\Repositories\Proxmox\Server; +use Convoy\Models\Server; +use Webmozart\Assert\Assert; +use GuzzleHttp\Cookie\CookieJar; use Convoy\Data\Node\Access\UserCredentialsData; +use Convoy\Repositories\Proxmox\ProxmoxRepository; use Convoy\Data\Server\Proxmox\Console\NoVncCredentialsData; use Convoy\Data\Server\Proxmox\Console\XTermCredentialsData; -use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; -use GuzzleHttp\Cookie\CookieJar; -use Webmozart\Assert\Assert; -use Illuminate\Http\Client\RequestException; -use Illuminate\Http\Client\Response; class ProxmoxConsoleRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxDiskRepository.php b/app/Repositories/Proxmox/Server/ProxmoxDiskRepository.php index 309f2e6ea0a..ff93453adad 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxDiskRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxDiskRepository.php @@ -2,10 +2,10 @@ namespace Convoy\Repositories\Proxmox\Server; -use Convoy\Enums\Server\DiskInterface; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Enums\Server\DiskInterface; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxDiskRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php b/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php index 2130b54f608..4dc0cf7f47f 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php @@ -3,8 +3,8 @@ namespace Convoy\Repositories\Proxmox\Server; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxFirewallRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxMetricsRepository.php b/app/Repositories/Proxmox/Server/ProxmoxMetricsRepository.php index 726ac7ad8ce..03d036de65c 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxMetricsRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxMetricsRepository.php @@ -2,12 +2,12 @@ namespace Convoy\Repositories\Proxmox\Server; -use Convoy\Enums\Server\MetricParameter; -use Convoy\Enums\Server\MetricTimeframe; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Illuminate\Support\Arr; use Webmozart\Assert\Assert; +use Convoy\Enums\Server\MetricTimeframe; +use Convoy\Enums\Server\MetricParameter; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxMetricsRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php b/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php index b17fb1b93ce..f00177d7ee1 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php @@ -2,10 +2,10 @@ namespace Convoy\Repositories\Proxmox\Server; -use Convoy\Enums\Server\PowerAction; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Enums\Server\PowerAction; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxPowerRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php b/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php index 3c253f39357..bd3cc7cbc71 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php @@ -2,13 +2,13 @@ namespace Convoy\Repositories\Proxmox\Server; -use Convoy\Data\Server\Proxmox\ServerStateData; -use Convoy\Enums\Node\Access\RealmType; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Server; use Convoy\Models\Template; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Enums\Node\Access\RealmType; +use Convoy\Data\Server\Proxmox\ServerStateData; +use Convoy\Repositories\Proxmox\ProxmoxRepository; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; class ProxmoxServerRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php b/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php index 55d70b01f8a..9aefce3d409 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php @@ -3,8 +3,8 @@ namespace Convoy\Repositories\Proxmox\Server; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\ProxmoxRepository; use Webmozart\Assert\Assert; +use Convoy\Repositories\Proxmox\ProxmoxRepository; class ProxmoxSnapshotRepository extends ProxmoxRepository { diff --git a/app/Repositories/Repository.php b/app/Repositories/Repository.php index ab594ceec51..3924b3a4252 100644 --- a/app/Repositories/Repository.php +++ b/app/Repositories/Repository.php @@ -3,10 +3,10 @@ namespace Convoy\Repositories; use Closure; -use Convoy\Contracts\Repository\RepositoryInterface; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Foundation\Application; use InvalidArgumentException; +use Illuminate\Foundation\Application; +use Illuminate\Database\Eloquent\Model; +use Convoy\Contracts\Repository\RepositoryInterface; abstract class Repository implements RepositoryInterface { diff --git a/app/Rules/Fqdn.php b/app/Rules/Fqdn.php index 2b3fd2f0296..f8fd41520b4 100644 --- a/app/Rules/Fqdn.php +++ b/app/Rules/Fqdn.php @@ -26,9 +26,9 @@ namespace Convoy\Rules; use Closure; +use Illuminate\Support\Arr; use Illuminate\Contracts\Validation\DataAwareRule; use Illuminate\Contracts\Validation\ValidationRule; -use Illuminate\Support\Arr; class Fqdn implements ValidationRule, DataAwareRule { diff --git a/app/Services/Activity/ActivityLogService.php b/app/Services/Activity/ActivityLogService.php index 835b65e7324..8c01ace0081 100644 --- a/app/Services/Activity/ActivityLogService.php +++ b/app/Services/Activity/ActivityLogService.php @@ -8,18 +8,18 @@ namespace Convoy\Services\Activity; use Closure; -use Convoy\Models\ActivityLog; -use Convoy\Models\ActivityLogSubject; use Exception; -use Illuminate\Contracts\Auth\Factory; -use Illuminate\Database\ConnectionInterface; -use Illuminate\Database\Eloquent\Model; +use Throwable; use Illuminate\Support\Arr; +use Webmozart\Assert\Assert; +use Convoy\Models\ActivityLog; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Log; +use Convoy\Models\ActivityLogSubject; +use Illuminate\Contracts\Auth\Factory; +use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Request; -use Throwable; -use Webmozart\Assert\Assert; +use Illuminate\Database\ConnectionInterface; class ActivityLogService { diff --git a/app/Services/Api/JWTService.php b/app/Services/Api/JWTService.php index c95ad792936..36ed1b379fb 100644 --- a/app/Services/Api/JWTService.php +++ b/app/Services/Api/JWTService.php @@ -2,22 +2,20 @@ namespace Convoy\Services\Api; +use Convoy\Models\User; use Carbon\CarbonImmutable; -use Convoy\Exceptions\Service\Api\InvalidJWTException; -use Convoy\Extensions\Lcobucci\JWT\Validation\Clock; use Illuminate\Support\Str; -use Convoy\Models\User; -use Lcobucci\JWT\Encoding\CannotDecodeContent; use Lcobucci\JWT\Token\Plain; use Lcobucci\JWT\Configuration; +use Lcobucci\JWT\UnencryptedToken; use Lcobucci\JWT\Signer\Hmac\Sha256; use Lcobucci\JWT\Signer\Key\InMemory; -use Lcobucci\JWT\Token; use Lcobucci\JWT\Token\InvalidTokenStructure; +use Lcobucci\JWT\Encoding\CannotDecodeContent; use Lcobucci\JWT\Token\UnsupportedHeaderFound; -use Lcobucci\JWT\UnencryptedToken; +use Convoy\Extensions\Lcobucci\JWT\Validation\Clock; use Lcobucci\JWT\Validation\Constraint\StrictValidAt; -use Webmozart\Assert\Assert; +use Convoy\Exceptions\Service\Api\InvalidJWTException; class JWTService { diff --git a/app/Services/Coterm/CotermJWTService.php b/app/Services/Coterm/CotermJWTService.php index 7327cc2c1be..5cdeed072a9 100644 --- a/app/Services/Coterm/CotermJWTService.php +++ b/app/Services/Coterm/CotermJWTService.php @@ -2,13 +2,13 @@ namespace Convoy\Services\Coterm; -use Carbon\CarbonImmutable; -use Convoy\Enums\Server\ConsoleType; -use Convoy\Models\Server; use Convoy\Models\User; -use Convoy\Services\Api\JWTService; -use Lcobucci\JWT\Token\Plain; +use Convoy\Models\Server; +use Carbon\CarbonImmutable; use Webmozart\Assert\Assert; +use Lcobucci\JWT\Token\Plain; +use Convoy\Services\Api\JWTService; +use Convoy\Enums\Server\ConsoleType; class CotermJWTService { diff --git a/app/Services/Nodes/Isos/IsoMonitorService.php b/app/Services/Nodes/Isos/IsoMonitorService.php index c0ef9866926..3e1bb7a12e4 100644 --- a/app/Services/Nodes/Isos/IsoMonitorService.php +++ b/app/Services/Nodes/Isos/IsoMonitorService.php @@ -2,12 +2,12 @@ namespace Convoy\Services\Nodes\Isos; -use Carbon\Carbon; use Closure; +use Carbon\Carbon; use Convoy\Models\ISO; -use Convoy\Repositories\Proxmox\Server\ProxmoxActivityRepository; use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Convoy\Repositories\Proxmox\Server\ProxmoxActivityRepository; class IsoMonitorService { diff --git a/app/Services/Nodes/ServerRateLimitsSyncService.php b/app/Services/Nodes/ServerRateLimitsSyncService.php index f686778d5c9..bb3c07f2c81 100644 --- a/app/Services/Nodes/ServerRateLimitsSyncService.php +++ b/app/Services/Nodes/ServerRateLimitsSyncService.php @@ -2,10 +2,10 @@ namespace Convoy\Services\Nodes; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Node; use Convoy\Models\Server; use Convoy\Services\Servers\NetworkService; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; class ServerRateLimitsSyncService { diff --git a/app/Services/Nodes/ServerUsagesSyncService.php b/app/Services/Nodes/ServerUsagesSyncService.php index fe4e575da92..188291fb511 100644 --- a/app/Services/Nodes/ServerUsagesSyncService.php +++ b/app/Services/Nodes/ServerUsagesSyncService.php @@ -3,11 +3,11 @@ namespace Convoy\Services\Nodes; use Carbon\Carbon; -use Convoy\Enums\Server\MetricTimeframe; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Node; use Convoy\Models\Server; +use Convoy\Enums\Server\MetricTimeframe; use Convoy\Repositories\Proxmox\Server\ProxmoxMetricsRepository; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; class ServerUsagesSyncService { diff --git a/app/Services/Nodes/UserPruneService.php b/app/Services/Nodes/UserPruneService.php index 1146872cf01..9252b9f231e 100644 --- a/app/Services/Nodes/UserPruneService.php +++ b/app/Services/Nodes/UserPruneService.php @@ -2,8 +2,8 @@ namespace Convoy\Services\Nodes; -use Convoy\Data\Node\Access\UserData; use Convoy\Models\Node; +use Convoy\Data\Node\Access\UserData; use Convoy\Repositories\Proxmox\Node\ProxmoxAccessRepository; class UserPruneService diff --git a/app/Services/Servers/AllocationService.php b/app/Services/Servers/AllocationService.php index b7626b8316a..874248dd457 100644 --- a/app/Services/Servers/AllocationService.php +++ b/app/Services/Servers/AllocationService.php @@ -2,15 +2,15 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Proxmox\Config\DiskData; +use Convoy\Models\ISO; +use Convoy\Models\Server; +use Illuminate\Support\Arr; use Convoy\Enums\Server\DiskInterface; +use Convoy\Data\Server\Proxmox\Config\DiskData; +use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; use Convoy\Exceptions\Service\Server\Allocation\IsoAlreadyMountedException; use Convoy\Exceptions\Service\Server\Allocation\IsoAlreadyUnmountedException; use Convoy\Exceptions\Service\Server\Allocation\NoAvailableDiskInterfaceException; -use Convoy\Models\ISO; -use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; -use Illuminate\Support\Arr; class AllocationService { diff --git a/app/Services/Servers/Backups/BackupCreationService.php b/app/Services/Servers/Backups/BackupCreationService.php index 917d9a0efd6..70790d147ac 100644 --- a/app/Services/Servers/Backups/BackupCreationService.php +++ b/app/Services/Servers/Backups/BackupCreationService.php @@ -2,17 +2,17 @@ namespace Convoy\Services\Servers\Backups; +use Ramsey\Uuid\Uuid; +use Convoy\Models\Backup; +use Convoy\Models\Server; use Carbon\CarbonImmutable; -use Convoy\Enums\Server\BackupCompressionType; use Convoy\Enums\Server\BackupMode; -use Convoy\Exceptions\Service\Backup\TooManyBackupsException; use Convoy\Jobs\Server\MonitorBackupJob; -use Convoy\Models\Backup; -use Convoy\Models\Server; +use Illuminate\Database\ConnectionInterface; +use Convoy\Enums\Server\BackupCompressionType; use Convoy\Repositories\Eloquent\BackupRepository; +use Convoy\Exceptions\Service\Backup\TooManyBackupsException; use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; -use Illuminate\Database\ConnectionInterface; -use Ramsey\Uuid\Uuid; use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException; class BackupCreationService diff --git a/app/Services/Servers/Backups/BackupDeletionService.php b/app/Services/Servers/Backups/BackupDeletionService.php index 9c15e7314d5..5d1905e232a 100644 --- a/app/Services/Servers/Backups/BackupDeletionService.php +++ b/app/Services/Servers/Backups/BackupDeletionService.php @@ -2,10 +2,10 @@ namespace Convoy\Services\Servers\Backups; -use Convoy\Exceptions\Service\Backup\BackupLockedException; use Convoy\Models\Backup; -use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; use Illuminate\Database\ConnectionInterface; +use Convoy\Exceptions\Service\Backup\BackupLockedException; +use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; class BackupDeletionService { diff --git a/app/Services/Servers/Backups/BackupMonitorService.php b/app/Services/Servers/Backups/BackupMonitorService.php index 1f21606d772..7d5d9b5bc08 100644 --- a/app/Services/Servers/Backups/BackupMonitorService.php +++ b/app/Services/Servers/Backups/BackupMonitorService.php @@ -2,14 +2,14 @@ namespace Convoy\Services\Servers\Backups; -use Carbon\Carbon; use Closure; +use Carbon\Carbon; use Convoy\Models\Backup; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxActivityRepository; -use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; +use Convoy\Repositories\Proxmox\Server\ProxmoxActivityRepository; class BackupMonitorService { diff --git a/app/Services/Servers/Backups/RestoreFromBackupService.php b/app/Services/Servers/Backups/RestoreFromBackupService.php index 4a41fc8f024..6907b3ab503 100644 --- a/app/Services/Servers/Backups/RestoreFromBackupService.php +++ b/app/Services/Servers/Backups/RestoreFromBackupService.php @@ -2,14 +2,14 @@ namespace Convoy\Services\Servers\Backups; +use Convoy\Models\Backup; +use Convoy\Models\Server; use Convoy\Enums\Server\State; use Convoy\Enums\Server\Status; +use Illuminate\Database\ConnectionInterface; use Convoy\Jobs\Server\MonitorBackupRestorationJob; -use Convoy\Models\Backup; -use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; use Convoy\Repositories\Proxmox\Server\ProxmoxServerRepository; -use Illuminate\Database\ConnectionInterface; +use Convoy\Repositories\Proxmox\Server\ProxmoxBackupRepository; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; class RestoreFromBackupService diff --git a/app/Services/Servers/CloudinitService.php b/app/Services/Servers/CloudinitService.php index 14b4acc100d..8544d5d76f6 100644 --- a/app/Services/Servers/CloudinitService.php +++ b/app/Services/Servers/CloudinitService.php @@ -2,12 +2,12 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Deployments\CloudinitAddressConfigData; -use Convoy\Data\Server\Proxmox\Config\AddressConfigData; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; use Illuminate\Support\Arr; +use Convoy\Data\Server\Proxmox\Config\AddressConfigData; +use Convoy\Data\Server\Deployments\CloudinitAddressConfigData; +use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; /** * Class SnapshotService diff --git a/app/Services/Servers/NetworkService.php b/app/Services/Servers/NetworkService.php index 35ddafc1628..e53259c8884 100644 --- a/app/Services/Servers/NetworkService.php +++ b/app/Services/Servers/NetworkService.php @@ -2,17 +2,17 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Deployments\CloudinitAddressConfigData; -use Convoy\Data\Server\Eloquent\ServerAddressesData; -use Convoy\Data\Server\MacAddressData; -use Convoy\Enums\Network\AddressType; -use Convoy\Models\Address; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxCloudinitRepository; +use Convoy\Models\Address; +use Illuminate\Support\Arr; +use Convoy\Enums\Network\AddressType; +use Convoy\Data\Server\MacAddressData; +use Illuminate\Database\ConnectionInterface; +use Convoy\Data\Server\Eloquent\ServerAddressesData; +use Convoy\Data\Server\Deployments\CloudinitAddressConfigData; use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; use Convoy\Repositories\Proxmox\Server\ProxmoxFirewallRepository; -use Illuminate\Database\ConnectionInterface; -use Illuminate\Support\Arr; +use Convoy\Repositories\Proxmox\Server\ProxmoxCloudinitRepository; class NetworkService { diff --git a/app/Services/Servers/ServerBuildDispatchService.php b/app/Services/Servers/ServerBuildDispatchService.php index b5c5d763df1..528d81e78fb 100644 --- a/app/Services/Servers/ServerBuildDispatchService.php +++ b/app/Services/Servers/ServerBuildDispatchService.php @@ -2,20 +2,20 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Deployments\ServerDeploymentData; -use Convoy\Enums\Server\PowerAction; +use Convoy\Models\Server; use Convoy\Enums\Server\State; use Convoy\Enums\Server\Status; +use Illuminate\Support\Facades\Bus; +use Convoy\Enums\Server\PowerAction; +use Convoy\Jobs\Server\SyncBuildJob; use Convoy\Jobs\Server\BuildServerJob; use Convoy\Jobs\Server\DeleteServerJob; use Convoy\Jobs\Server\MonitorStateJob; -use Convoy\Jobs\Server\SendPowerCommandJob; -use Convoy\Jobs\Server\SyncBuildJob; use Convoy\Jobs\Server\UpdatePasswordJob; +use Convoy\Jobs\Server\SendPowerCommandJob; use Convoy\Jobs\Server\WaitUntilVmIsCreatedJob; use Convoy\Jobs\Server\WaitUntilVmIsDeletedJob; -use Convoy\Models\Server; -use Illuminate\Support\Facades\Bus; +use Convoy\Data\Server\Deployments\ServerDeploymentData; class ServerBuildDispatchService { diff --git a/app/Services/Servers/ServerBuildService.php b/app/Services/Servers/ServerBuildService.php index 11821007620..a17fb522b1d 100644 --- a/app/Services/Servers/ServerBuildService.php +++ b/app/Services/Servers/ServerBuildService.php @@ -2,11 +2,11 @@ namespace Convoy\Services\Servers; -use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use Convoy\Models\Server; use Convoy\Models\Template; use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; use Convoy\Repositories\Proxmox\Server\ProxmoxServerRepository; +use Convoy\Exceptions\Repository\Proxmox\ProxmoxConnectionException; /** * Class SnapshotService diff --git a/app/Services/Servers/ServerConsoleService.php b/app/Services/Servers/ServerConsoleService.php index 8fb683ac4b8..42af2098b0c 100644 --- a/app/Services/Servers/ServerConsoleService.php +++ b/app/Services/Servers/ServerConsoleService.php @@ -2,16 +2,16 @@ namespace Convoy\Services\Servers; +use Exception; +use Convoy\Models\Server; +use Convoy\Enums\Node\Access\RealmType; use Convoy\Data\Node\Access\CreateUserData; use Convoy\Data\Node\Access\UserCredentialsData; use Convoy\Data\Server\Proxmox\Console\NoVncCredentialsData; use Convoy\Data\Server\Proxmox\Console\XTermCredentialsData; -use Convoy\Enums\Node\Access\RealmType; -use Convoy\Models\Server; use Convoy\Repositories\Proxmox\Node\ProxmoxAccessRepository; -use Convoy\Repositories\Proxmox\Server\ProxmoxConsoleRepository; use Convoy\Repositories\Proxmox\Server\ProxmoxServerRepository; -use Exception; +use Convoy\Repositories\Proxmox\Server\ProxmoxConsoleRepository; class ServerConsoleService { diff --git a/app/Services/Servers/ServerCreationService.php b/app/Services/Servers/ServerCreationService.php index ada4009c68c..f922a903cb5 100644 --- a/app/Services/Servers/ServerCreationService.php +++ b/app/Services/Servers/ServerCreationService.php @@ -2,14 +2,14 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Deployments\ServerDeploymentData; -use Convoy\Enums\Server\Status; -use Convoy\Exceptions\Service\Deployment\InvalidTemplateException; use Convoy\Models\Server; use Convoy\Models\Template; -use Convoy\Repositories\Eloquent\ServerRepository; use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Convoy\Enums\Server\Status; +use Convoy\Repositories\Eloquent\ServerRepository; +use Convoy\Data\Server\Deployments\ServerDeploymentData; +use Convoy\Exceptions\Service\Deployment\InvalidTemplateException; /** * Class ServerCreationService diff --git a/app/Services/Servers/ServerDeletionService.php b/app/Services/Servers/ServerDeletionService.php index 8df811d13b9..ff42bf91437 100644 --- a/app/Services/Servers/ServerDeletionService.php +++ b/app/Services/Servers/ServerDeletionService.php @@ -2,11 +2,11 @@ namespace Convoy\Services\Servers; -use Convoy\Enums\Server\Status; -use Convoy\Exceptions\Http\Server\ServerStatusConflictException; -use Convoy\Jobs\Server\PurgeBackupsJob; use Convoy\Models\Server; +use Convoy\Enums\Server\Status; use Illuminate\Support\Facades\Bus; +use Convoy\Jobs\Server\PurgeBackupsJob; +use Convoy\Exceptions\Http\Server\ServerStatusConflictException; class ServerDeletionService { diff --git a/app/Services/Servers/ServerDetailService.php b/app/Services/Servers/ServerDetailService.php index 4b9fe890b66..cb6f4f46db7 100644 --- a/app/Services/Servers/ServerDetailService.php +++ b/app/Services/Servers/ServerDetailService.php @@ -2,11 +2,11 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Eloquent\ServerEloquentData; -use Convoy\Data\Server\Proxmox\ServerProxmoxData; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; use Illuminate\Support\Arr; +use Convoy\Data\Server\Proxmox\ServerProxmoxData; +use Convoy\Data\Server\Eloquent\ServerEloquentData; +use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; class ServerDetailService { diff --git a/app/Services/Servers/ServerSuspensionService.php b/app/Services/Servers/ServerSuspensionService.php index a5c07b40f39..e27ead01aab 100644 --- a/app/Services/Servers/ServerSuspensionService.php +++ b/app/Services/Servers/ServerSuspensionService.php @@ -2,12 +2,12 @@ namespace Convoy\Services\Servers; -use Convoy\Enums\Server\PowerAction; +use Exception; +use Convoy\Models\Server; use Convoy\Enums\Server\Status; +use Convoy\Enums\Server\PowerAction; use Convoy\Enums\Server\SuspensionAction; -use Convoy\Models\Server; use Convoy\Repositories\Proxmox\Server\ProxmoxPowerRepository; -use Exception; class ServerSuspensionService { diff --git a/app/Services/Servers/SyncBuildService.php b/app/Services/Servers/SyncBuildService.php index 7825a676c81..1f4c7c30848 100644 --- a/app/Services/Servers/SyncBuildService.php +++ b/app/Services/Servers/SyncBuildService.php @@ -2,13 +2,13 @@ namespace Convoy\Services\Servers; -use Convoy\Data\Server\Proxmox\Config\DiskData; -use Convoy\Enums\Server\DiskInterface; use Convoy\Models\Server; -use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; +use Illuminate\Support\Arr; +use Convoy\Enums\Server\DiskInterface; +use Convoy\Data\Server\Proxmox\Config\DiskData; use Convoy\Repositories\Proxmox\Server\ProxmoxDiskRepository; use Convoy\Repositories\Proxmox\Server\ProxmoxPowerRepository; -use Illuminate\Support\Arr; +use Convoy\Repositories\Proxmox\Server\ProxmoxConfigRepository; class SyncBuildService { diff --git a/app/Transformers/Admin/AddressTransformer.php b/app/Transformers/Admin/AddressTransformer.php index 159f4c91c35..19ffb7fd3ff 100644 --- a/app/Transformers/Admin/AddressTransformer.php +++ b/app/Transformers/Admin/AddressTransformer.php @@ -2,10 +2,10 @@ namespace Convoy\Transformers\Admin; -use League\Fractal\Resource\Item; -use Convoy\Data\Server\Eloquent\AddressData; use Convoy\Models\Address; +use League\Fractal\Resource\Item; use League\Fractal\TransformerAbstract; +use Convoy\Data\Server\Eloquent\AddressData; class AddressTransformer extends TransformerAbstract { diff --git a/app/Transformers/Admin/FileMetadataTransformer.php b/app/Transformers/Admin/FileMetadataTransformer.php index 57421a3aa0c..d152da58300 100644 --- a/app/Transformers/Admin/FileMetadataTransformer.php +++ b/app/Transformers/Admin/FileMetadataTransformer.php @@ -2,8 +2,8 @@ namespace Convoy\Transformers\Admin; -use Convoy\Data\Node\Storage\FileMetaData; use League\Fractal\TransformerAbstract; +use Convoy\Data\Node\Storage\FileMetaData; class FileMetadataTransformer extends TransformerAbstract { diff --git a/app/Transformers/Admin/ServerBuildTransformer.php b/app/Transformers/Admin/ServerBuildTransformer.php index 078acbd5032..cc74ec472db 100644 --- a/app/Transformers/Admin/ServerBuildTransformer.php +++ b/app/Transformers/Admin/ServerBuildTransformer.php @@ -3,9 +3,9 @@ namespace Convoy\Transformers\Admin; use Convoy\Models\Server; -use Convoy\Services\Servers\ServerDetailService; use Illuminate\Support\Facades\App; use League\Fractal\TransformerAbstract; +use Convoy\Services\Servers\ServerDetailService; class ServerBuildTransformer extends TransformerAbstract { diff --git a/app/Transformers/Client/ActivityLogTransformer.php b/app/Transformers/Client/ActivityLogTransformer.php index d0a91af6d81..83fff9b8f54 100644 --- a/app/Transformers/Client/ActivityLogTransformer.php +++ b/app/Transformers/Client/ActivityLogTransformer.php @@ -2,12 +2,12 @@ namespace Convoy\Transformers\Client; -use Convoy\Models\ActivityLog; use Convoy\Models\User; +use Illuminate\Support\Str; +use Illuminate\Http\Request; +use Convoy\Models\ActivityLog; use Illuminate\Container\Container; use Illuminate\Database\Eloquent\Model; -use Illuminate\Http\Request; -use Illuminate\Support\Str; use League\Fractal\TransformerAbstract; class ActivityLogTransformer extends TransformerAbstract diff --git a/app/Transformers/Client/ServerDetailTransformer.php b/app/Transformers/Client/ServerDetailTransformer.php index 1753997c532..0d1ad7f2b6e 100644 --- a/app/Transformers/Client/ServerDetailTransformer.php +++ b/app/Transformers/Client/ServerDetailTransformer.php @@ -2,8 +2,8 @@ namespace Convoy\Transformers\Client; -use Convoy\Data\Server\Proxmox\ServerProxmoxData; use League\Fractal\TransformerAbstract; +use Convoy\Data\Server\Proxmox\ServerProxmoxData; class ServerDetailTransformer extends TransformerAbstract { diff --git a/app/Transformers/Client/ServerStateTransformer.php b/app/Transformers/Client/ServerStateTransformer.php index 94fe8cb5cb9..8c3712f3edb 100644 --- a/app/Transformers/Client/ServerStateTransformer.php +++ b/app/Transformers/Client/ServerStateTransformer.php @@ -2,8 +2,8 @@ namespace Convoy\Transformers\Client; -use Convoy\Data\Server\Proxmox\ServerStateData; use League\Fractal\TransformerAbstract; +use Convoy\Data\Server\Proxmox\ServerStateData; class ServerStateTransformer extends TransformerAbstract { diff --git a/app/Transformers/Client/ServerTransformer.php b/app/Transformers/Client/ServerTransformer.php index a96e1e7ffdd..98129a391bd 100644 --- a/app/Transformers/Client/ServerTransformer.php +++ b/app/Transformers/Client/ServerTransformer.php @@ -3,11 +3,11 @@ namespace Convoy\Transformers\Client; use Convoy\Models\Server; -use Convoy\Services\Servers\ServerDetailService; -use Convoy\Transformers\Admin\NodeTransformer; -use Convoy\Transformers\Admin\UserTransformer; use Illuminate\Support\Facades\App; use League\Fractal\TransformerAbstract; +use Convoy\Transformers\Admin\NodeTransformer; +use Convoy\Transformers\Admin\UserTransformer; +use Convoy\Services\Servers\ServerDetailService; class ServerTransformer extends TransformerAbstract { diff --git a/app/Transformers/Coterm/NoVncCredentialsTransformer.php b/app/Transformers/Coterm/NoVncCredentialsTransformer.php index 3f8b9f65f11..018b082417e 100644 --- a/app/Transformers/Coterm/NoVncCredentialsTransformer.php +++ b/app/Transformers/Coterm/NoVncCredentialsTransformer.php @@ -2,9 +2,9 @@ namespace Convoy\Transformers\Coterm; -use Convoy\Data\Server\Proxmox\Console\NoVncCredentialsData; use Convoy\Models\Server; use League\Fractal\TransformerAbstract; +use Convoy\Data\Server\Proxmox\Console\NoVncCredentialsData; class NoVncCredentialsTransformer extends TransformerAbstract { diff --git a/app/Transformers/Coterm/XTermCredentialsTransformer.php b/app/Transformers/Coterm/XTermCredentialsTransformer.php index 367e6d55e48..d6bff18c01d 100644 --- a/app/Transformers/Coterm/XTermCredentialsTransformer.php +++ b/app/Transformers/Coterm/XTermCredentialsTransformer.php @@ -2,9 +2,9 @@ namespace Convoy\Transformers\Coterm; -use Convoy\Data\Server\Proxmox\Console\XTermCredentialsData; use Convoy\Models\Server; use League\Fractal\TransformerAbstract; +use Convoy\Data\Server\Proxmox\Console\XTermCredentialsData; class XTermCredentialsTransformer extends TransformerAbstract { diff --git a/config/fortify.php b/config/fortify.php index d546b59ca82..358fc33d88a 100644 --- a/config/fortify.php +++ b/config/fortify.php @@ -1,7 +1,6 @@ + diff --git a/resources/scripts/api/admin/addressPools/addresses/createAddress.ts b/resources/scripts/api/admin/addressPools/addresses/createAddress.ts index be9250f7bd5..c16b34bed9b 100644 --- a/resources/scripts/api/admin/addressPools/addresses/createAddress.ts +++ b/resources/scripts/api/admin/addressPools/addresses/createAddress.ts @@ -3,7 +3,8 @@ import { z } from 'zod' import { AddressInclude } from '@/api/admin/nodes/addresses/getAddresses' import http from '@/api/http' -import { Address, AddressType, rawDataToAddress } from '@/api/server/getServer' +import { Address, rawDataToAddress } from '@/api/server/getServer' + const baseSchema = z.object({ type: z.enum(['ipv4', 'ipv6']), @@ -71,4 +72,4 @@ const createAddress = async ( return data ? rawDataToAddress(data) : null } -export default createAddress +export default createAddress \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/addresses/deleteAddress.ts b/resources/scripts/api/admin/addressPools/addresses/deleteAddress.ts index e03cff40fa5..95347af3022 100644 --- a/resources/scripts/api/admin/addressPools/addresses/deleteAddress.ts +++ b/resources/scripts/api/admin/addressPools/addresses/deleteAddress.ts @@ -3,4 +3,4 @@ import http from '@/api/http' const deleteAddress = (poolId: number, addressId: number) => http.delete(`/api/admin/address-pools/${poolId}/addresses/${addressId}`) -export default deleteAddress +export default deleteAddress \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/addresses/updateAddress.ts b/resources/scripts/api/admin/addressPools/addresses/updateAddress.ts index 7588e7122cd..005ebee291a 100644 --- a/resources/scripts/api/admin/addressPools/addresses/updateAddress.ts +++ b/resources/scripts/api/admin/addressPools/addresses/updateAddress.ts @@ -36,4 +36,4 @@ const updateAddress = async ( return rawDataToAddress(data) } -export default updateAddress +export default updateAddress \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/createAddressPool.ts b/resources/scripts/api/admin/addressPools/createAddressPool.ts index e8052ec6a1b..a5b28ba1d92 100644 --- a/resources/scripts/api/admin/addressPools/createAddressPool.ts +++ b/resources/scripts/api/admin/addressPools/createAddressPool.ts @@ -20,4 +20,4 @@ const createAddressPool = async ({ return rawDataToAddressPool(data) } -export default createAddressPool +export default createAddressPool \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/deleteAddressPool.ts b/resources/scripts/api/admin/addressPools/deleteAddressPool.ts index c6a7c2beb4e..f2967538f2d 100644 --- a/resources/scripts/api/admin/addressPools/deleteAddressPool.ts +++ b/resources/scripts/api/admin/addressPools/deleteAddressPool.ts @@ -3,4 +3,4 @@ import http from '@/api/http' const deleteAddressPool = (id: number) => http.delete(`/api/admin/address-pools/${id}`) -export default deleteAddressPool +export default deleteAddressPool \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/getAddressPool.ts b/resources/scripts/api/admin/addressPools/getAddressPool.ts index e8885774b27..df9416473bd 100644 --- a/resources/scripts/api/admin/addressPools/getAddressPool.ts +++ b/resources/scripts/api/admin/addressPools/getAddressPool.ts @@ -9,4 +9,4 @@ const getAddressPool = async (id: number) => { return rawDataToAddressPool(data) } -export default getAddressPool +export default getAddressPool \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/getAddressPools.ts b/resources/scripts/api/admin/addressPools/getAddressPools.ts index 3ca1fc7d64c..4896aaedd65 100644 --- a/resources/scripts/api/admin/addressPools/getAddressPools.ts +++ b/resources/scripts/api/admin/addressPools/getAddressPools.ts @@ -41,4 +41,4 @@ export const rawDataToAddressPool = (data: any): AddressPool => ({ addressesCount: data.addresses_count, }) -export default getAddressPools +export default getAddressPools \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/getAddresses.ts b/resources/scripts/api/admin/addressPools/getAddresses.ts index 3b77fb24111..b0a7add4467 100644 --- a/resources/scripts/api/admin/addressPools/getAddresses.ts +++ b/resources/scripts/api/admin/addressPools/getAddresses.ts @@ -34,4 +34,4 @@ const getAddresses = async ( } } -export default getAddresses +export default getAddresses \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/updateAddressPool.ts b/resources/scripts/api/admin/addressPools/updateAddressPool.ts index 64457c5721e..b29b6bc4462 100644 --- a/resources/scripts/api/admin/addressPools/updateAddressPool.ts +++ b/resources/scripts/api/admin/addressPools/updateAddressPool.ts @@ -16,4 +16,4 @@ const updateAddressPool = async ( return rawDataToAddressPool(data) } -export default updateAddressPool +export default updateAddressPool \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/useAddressPoolSWR.ts b/resources/scripts/api/admin/addressPools/useAddressPoolSWR.ts index aecc0e881de..ad475d485f0 100644 --- a/resources/scripts/api/admin/addressPools/useAddressPoolSWR.ts +++ b/resources/scripts/api/admin/addressPools/useAddressPoolSWR.ts @@ -5,6 +5,7 @@ import useSWR, { Key, SWRResponse } from 'swr' import getAddressPool from '@/api/admin/addressPools/getAddressPool' import { AddressPool } from '@/api/admin/addressPools/getAddressPools' + export const getKey = (id: number): Key => ['admin.address-pools', id] const useAddressPoolSWR = () => { @@ -16,4 +17,4 @@ const useAddressPoolSWR = () => { }) as Optimistic> } -export default useAddressPoolSWR +export default useAddressPoolSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/useAddressPoolsSWR.ts b/resources/scripts/api/admin/addressPools/useAddressPoolsSWR.ts index 40a3e4cb3e5..9de72175779 100644 --- a/resources/scripts/api/admin/addressPools/useAddressPoolsSWR.ts +++ b/resources/scripts/api/admin/addressPools/useAddressPoolsSWR.ts @@ -5,6 +5,7 @@ import getAddressPools, { QueryParams, } from '@/api/admin/addressPools/getAddressPools' + const useAddressPoolsSWR = ({ page, query, ...params }: QueryParams) => { return useSWR( ['admin.address-pools', page, query], @@ -17,4 +18,4 @@ const useAddressPoolsSWR = ({ page, query, ...params }: QueryParams) => { ) } -export default useAddressPoolsSWR +export default useAddressPoolsSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/addressPools/useAddressesSWR.ts b/resources/scripts/api/admin/addressPools/useAddressesSWR.ts index cca898b9fb8..51a87765b73 100644 --- a/resources/scripts/api/admin/addressPools/useAddressesSWR.ts +++ b/resources/scripts/api/admin/addressPools/useAddressesSWR.ts @@ -7,6 +7,7 @@ import getAddresses, { } from '@/api/admin/addressPools/getAddresses' import { AddressResponse } from '@/api/admin/nodes/addresses/getAddresses' + export const getKey = (id: number, page?: number, query?: string): Key => [ 'admin.address-pools.addresses', id, @@ -32,4 +33,4 @@ const useAddressesSWR = ({ page, query, ...params }: QueryParams) => { ) as Optimistic> } -export default useAddressesSWR +export default useAddressesSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/locations/createLocation.ts b/resources/scripts/api/admin/locations/createLocation.ts index d2d35ccfeed..936fc309b3e 100644 --- a/resources/scripts/api/admin/locations/createLocation.ts +++ b/resources/scripts/api/admin/locations/createLocation.ts @@ -13,4 +13,4 @@ export default async ( }) return rawDataToLocation(data) -} +} \ No newline at end of file diff --git a/resources/scripts/api/admin/locations/deleteLocation.ts b/resources/scripts/api/admin/locations/deleteLocation.ts index 6c1e889719b..2021018a440 100644 --- a/resources/scripts/api/admin/locations/deleteLocation.ts +++ b/resources/scripts/api/admin/locations/deleteLocation.ts @@ -1,3 +1,3 @@ import http from '@/api/http' -export default (id: number) => http.delete(`/api/admin/locations/${id}`) +export default (id: number) => http.delete(`/api/admin/locations/${id}`) \ No newline at end of file diff --git a/resources/scripts/api/admin/locations/getLocations.ts b/resources/scripts/api/admin/locations/getLocations.ts index 5b14d7bdb89..99c4c7849c5 100644 --- a/resources/scripts/api/admin/locations/getLocations.ts +++ b/resources/scripts/api/admin/locations/getLocations.ts @@ -51,4 +51,4 @@ export default ({ ) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/admin/locations/updateLocation.ts b/resources/scripts/api/admin/locations/updateLocation.ts index 2f9eabae7d0..b5046146b5f 100644 --- a/resources/scripts/api/admin/locations/updateLocation.ts +++ b/resources/scripts/api/admin/locations/updateLocation.ts @@ -16,4 +16,4 @@ const updateLocation = async ( return rawDataToLocation(data) } -export default updateLocation +export default updateLocation \ No newline at end of file diff --git a/resources/scripts/api/admin/locations/useLocationsSWR.ts b/resources/scripts/api/admin/locations/useLocationsSWR.ts index d08d7126e88..0394109543e 100644 --- a/resources/scripts/api/admin/locations/useLocationsSWR.ts +++ b/resources/scripts/api/admin/locations/useLocationsSWR.ts @@ -5,10 +5,11 @@ import getLocations, { QueryParams, } from '@/api/admin/locations/getLocations' + const useLocationsSWR = ({ page, query, ...params }: QueryParams) => { return useSWR(['admin:locations', page, query], () => getLocations({ page, query, ...params }) ) } -export default useLocationsSWR +export default useLocationsSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/addresses/createAddress.ts b/resources/scripts/api/admin/nodes/addresses/createAddress.ts index 734cf32ace7..b768b19a9de 100644 --- a/resources/scripts/api/admin/nodes/addresses/createAddress.ts +++ b/resources/scripts/api/admin/nodes/addresses/createAddress.ts @@ -1,6 +1,5 @@ import http from '@/api/http' -import { AddressType } from '@/api/server/getServer' -import { Address, rawDataToAddress } from '@/api/server/getServer' +import { Address, AddressType, rawDataToAddress } from '@/api/server/getServer' export interface AddressParameters { serverId?: number @@ -29,4 +28,4 @@ const createAddress = async ( return rawDataToAddress(data) } -export default createAddress +export default createAddress \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/addresses/deleteAddress.ts b/resources/scripts/api/admin/nodes/addresses/deleteAddress.ts index 0567dfbf237..4d0da4098c3 100644 --- a/resources/scripts/api/admin/nodes/addresses/deleteAddress.ts +++ b/resources/scripts/api/admin/nodes/addresses/deleteAddress.ts @@ -11,4 +11,4 @@ const deleteAddress = ( }, }) -export default deleteAddress +export default deleteAddress \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/addresses/getAddresses.ts b/resources/scripts/api/admin/nodes/addresses/getAddresses.ts index fcb443adb37..e6bb06537e0 100644 --- a/resources/scripts/api/admin/nodes/addresses/getAddresses.ts +++ b/resources/scripts/api/admin/nodes/addresses/getAddresses.ts @@ -45,4 +45,4 @@ const getAddresses = async ( } } -export default getAddresses +export default getAddresses \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/addresses/updateAddress.ts b/resources/scripts/api/admin/nodes/addresses/updateAddress.ts index 0caac1e2d3b..5d4c2e1385b 100644 --- a/resources/scripts/api/admin/nodes/addresses/updateAddress.ts +++ b/resources/scripts/api/admin/nodes/addresses/updateAddress.ts @@ -21,4 +21,4 @@ const updateAddress = async ( return rawDataToAddress(data) } -export default updateAddress +export default updateAddress \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/addresses/useAddressesSWR.ts b/resources/scripts/api/admin/nodes/addresses/useAddressesSWR.ts index af00570b4b6..9a7748d6b90 100644 --- a/resources/scripts/api/admin/nodes/addresses/useAddressesSWR.ts +++ b/resources/scripts/api/admin/nodes/addresses/useAddressesSWR.ts @@ -16,4 +16,4 @@ const useAddressesSWR = (nodeId: number, { page, id, ...params }: Params) => { ) } -export default useAddressesSWR +export default useAddressesSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/createNode.ts b/resources/scripts/api/admin/nodes/createNode.ts index ebe16911c22..be4582fa7ab 100644 --- a/resources/scripts/api/admin/nodes/createNode.ts +++ b/resources/scripts/api/admin/nodes/createNode.ts @@ -43,4 +43,4 @@ const createNode = async (data: CreateNodeParameters): Promise => { return rawDataToNode(responseData) } -export default createNode +export default createNode \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/deleteNode.ts b/resources/scripts/api/admin/nodes/deleteNode.ts index df5103012dd..233b49d8aa5 100644 --- a/resources/scripts/api/admin/nodes/deleteNode.ts +++ b/resources/scripts/api/admin/nodes/deleteNode.ts @@ -2,4 +2,4 @@ import http from '@/api/http' const deleteNode = (id: number) => http.delete(`/api/admin/nodes/${id}`) -export default deleteNode +export default deleteNode \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/getNode.ts b/resources/scripts/api/admin/nodes/getNode.ts index 74f7f7f550c..1dd95247deb 100644 --- a/resources/scripts/api/admin/nodes/getNode.ts +++ b/resources/scripts/api/admin/nodes/getNode.ts @@ -9,4 +9,4 @@ const getNode = async (id: number): Promise => { return rawDataToNode(data) } -export default getNode +export default getNode \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/getNodes.ts b/resources/scripts/api/admin/nodes/getNodes.ts index f6a91ce0bb1..f66c6d919ba 100644 --- a/resources/scripts/api/admin/nodes/getNodes.ts +++ b/resources/scripts/api/admin/nodes/getNodes.ts @@ -81,4 +81,4 @@ const getNodes = async ({ } } -export default getNodes +export default getNodes \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/isos/createIso.ts b/resources/scripts/api/admin/nodes/isos/createIso.ts index 3b378d75080..5c1a563c81c 100644 --- a/resources/scripts/api/admin/nodes/isos/createIso.ts +++ b/resources/scripts/api/admin/nodes/isos/createIso.ts @@ -42,4 +42,4 @@ const createIso = async ( return rawDataToISO(responseData) } -export default createIso +export default createIso \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/isos/deleteIso.ts b/resources/scripts/api/admin/nodes/isos/deleteIso.ts index bc012677071..03d71f760ed 100644 --- a/resources/scripts/api/admin/nodes/isos/deleteIso.ts +++ b/resources/scripts/api/admin/nodes/isos/deleteIso.ts @@ -3,4 +3,4 @@ import http from '@/api/http' const deleteIso = (nodeId: number, isoUuid: string) => http.delete(`/api/admin/nodes/${nodeId}/isos/${isoUuid}`) -export default deleteIso +export default deleteIso \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/isos/getIsos.ts b/resources/scripts/api/admin/nodes/isos/getIsos.ts index d7a39876e74..2816c8e8397 100644 --- a/resources/scripts/api/admin/nodes/isos/getIsos.ts +++ b/resources/scripts/api/admin/nodes/isos/getIsos.ts @@ -53,4 +53,4 @@ const getIsos = async ({ } } -export default getIsos +export default getIsos \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/isos/updateIso.ts b/resources/scripts/api/admin/nodes/isos/updateIso.ts index de3ca29cb07..e30b557813d 100644 --- a/resources/scripts/api/admin/nodes/isos/updateIso.ts +++ b/resources/scripts/api/admin/nodes/isos/updateIso.ts @@ -17,4 +17,4 @@ const updateIso = async ( return rawDataToISO(data) } -export default updateIso +export default updateIso \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/isos/useIsosSWR.ts b/resources/scripts/api/admin/nodes/isos/useIsosSWR.ts index a16b0fbcba6..ca60831a102 100644 --- a/resources/scripts/api/admin/nodes/isos/useIsosSWR.ts +++ b/resources/scripts/api/admin/nodes/isos/useIsosSWR.ts @@ -5,10 +5,11 @@ import getIsos, { QueryParams, } from '@/api/admin/nodes/isos/getIsos' + const useIsosSWR = ({ page, nodeId, ...params }: QueryParams) => { return useSWR(['admin:node:isos', nodeId, page], () => getIsos({ page, nodeId, ...params }) ) } -export default useIsosSWR +export default useIsosSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/settings/resetCotermToken.ts b/resources/scripts/api/admin/nodes/settings/resetCotermToken.ts index 997df2dccf2..64846e71354 100644 --- a/resources/scripts/api/admin/nodes/settings/resetCotermToken.ts +++ b/resources/scripts/api/admin/nodes/settings/resetCotermToken.ts @@ -10,4 +10,4 @@ const resetCotermToken = async (nodeId: number): Promise => { return data.token } -export default resetCotermToken +export default resetCotermToken \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/settings/updateCoterm.ts b/resources/scripts/api/admin/nodes/settings/updateCoterm.ts index 4b9a3b63b3a..141ec1a1e91 100644 --- a/resources/scripts/api/admin/nodes/settings/updateCoterm.ts +++ b/resources/scripts/api/admin/nodes/settings/updateCoterm.ts @@ -29,4 +29,4 @@ const updateCoterm = async ( } } -export default updateCoterm +export default updateCoterm \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/createTemplateGroup.ts b/resources/scripts/api/admin/nodes/templateGroups/createTemplateGroup.ts index 7eaa7a9da60..345155f7477 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/createTemplateGroup.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/createTemplateGroup.ts @@ -23,4 +23,4 @@ const createTemplateGroup = async ( return rawDataToTemplateGroup(data) } -export default createTemplateGroup +export default createTemplateGroup \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/deleteTemplateGroup.ts b/resources/scripts/api/admin/nodes/templateGroups/deleteTemplateGroup.ts index c75b9c36dd8..3af1508c6c0 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/deleteTemplateGroup.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/deleteTemplateGroup.ts @@ -3,4 +3,4 @@ import http from '@/api/http' const deleteTemplateGroup = (nodeId: number, groupUuid: string) => http.delete(`/api/admin/nodes/${nodeId}/template-groups/${groupUuid}`) -export default deleteTemplateGroup +export default deleteTemplateGroup \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/getTemplateGroups.ts b/resources/scripts/api/admin/nodes/templateGroups/getTemplateGroups.ts index dc745a196da..0ddeed10f8a 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/getTemplateGroups.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/getTemplateGroups.ts @@ -48,4 +48,4 @@ const getTemplateGroups = async (nodeId: number): Promise => { return data.map(rawDataToTemplateGroup) } -export default getTemplateGroups +export default getTemplateGroups \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/reorderTemplateGroups.ts b/resources/scripts/api/admin/nodes/templateGroups/reorderTemplateGroups.ts index 68791095f9d..417b8b3b319 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/reorderTemplateGroups.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/reorderTemplateGroups.ts @@ -17,4 +17,4 @@ const reorderTemplateGroups = async ( return data.map(rawDataToTemplateGroup) } -export default reorderTemplateGroups +export default reorderTemplateGroups \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/templates/createTemplate.ts b/resources/scripts/api/admin/nodes/templateGroups/templates/createTemplate.ts index a2f9cc1c632..b3f93d7c1c1 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/templates/createTemplate.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/templates/createTemplate.ts @@ -25,4 +25,4 @@ const createTemplate = async ( return rawDataToTemplate(data) } -export default createTemplate +export default createTemplate \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/templates/deleteTemplate.ts b/resources/scripts/api/admin/nodes/templateGroups/templates/deleteTemplate.ts index bf63e83a437..d1bd0fb2a5e 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/templates/deleteTemplate.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/templates/deleteTemplate.ts @@ -9,4 +9,4 @@ const deleteTemplate = ( `/api/admin/nodes/${nodeId}/template-groups/${groupUuid}/templates/${templateUuid}` ) -export default deleteTemplate +export default deleteTemplate \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/templates/getTemplates.ts b/resources/scripts/api/admin/nodes/templateGroups/templates/getTemplates.ts index 6b97b83b0ec..a5cc86cdad5 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/templates/getTemplates.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/templates/getTemplates.ts @@ -11,4 +11,4 @@ const getTemplates = async (nodeId: number, groupUuid: string) => { return data.map(rawDataToTemplate) } -export default getTemplates +export default getTemplates \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/templates/reorderTemplates.ts b/resources/scripts/api/admin/nodes/templateGroups/templates/reorderTemplates.ts index 87f877beb36..70b85738a5c 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/templates/reorderTemplates.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/templates/reorderTemplates.ts @@ -21,4 +21,4 @@ const reorderTemplates = async ( return data.map(rawDataToTemplate) } -export default reorderTemplates +export default reorderTemplates \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/templates/updateTemplate.ts b/resources/scripts/api/admin/nodes/templateGroups/templates/updateTemplate.ts index 54f87803f6e..0f6712ea492 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/templates/updateTemplate.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/templates/updateTemplate.ts @@ -21,4 +21,4 @@ const updateTemplate = async ( return rawDataToTemplate(data) } -export default updateTemplate +export default updateTemplate \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/templates/useTemplatesSWR.ts b/resources/scripts/api/admin/nodes/templateGroups/templates/useTemplatesSWR.ts index 9f02f59e610..6de381bcb12 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/templates/useTemplatesSWR.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/templates/useTemplatesSWR.ts @@ -3,6 +3,7 @@ import useSWR from 'swr' import { Template } from '@/api/admin/nodes/templateGroups/getTemplateGroups' import getTemplates from '@/api/admin/nodes/templateGroups/templates/getTemplates' + const useTemplatesSWR = (nodeId: number, groupUuid: string) => { return useSWR( ['admin:node:template-group:templates', nodeId, groupUuid], @@ -10,4 +11,4 @@ const useTemplatesSWR = (nodeId: number, groupUuid: string) => { ) } -export default useTemplatesSWR +export default useTemplatesSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/updateTemplateGroup.ts b/resources/scripts/api/admin/nodes/templateGroups/updateTemplateGroup.ts index 8a238d114dd..a8a23210929 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/updateTemplateGroup.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/updateTemplateGroup.ts @@ -20,4 +20,4 @@ const updateTemplateGroup = async ( return rawDataToTemplateGroup(data) } -export default updateTemplateGroup +export default updateTemplateGroup \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/templateGroups/useTemplateGroupsSWR.ts b/resources/scripts/api/admin/nodes/templateGroups/useTemplateGroupsSWR.ts index 424b7990d83..8a09e8fc01d 100644 --- a/resources/scripts/api/admin/nodes/templateGroups/useTemplateGroupsSWR.ts +++ b/resources/scripts/api/admin/nodes/templateGroups/useTemplateGroupsSWR.ts @@ -4,6 +4,7 @@ import getTemplateGroups, { TemplateGroup, } from '@/api/admin/nodes/templateGroups/getTemplateGroups' + const useTemplateGroupsSWR = ( nodeId: number, fallbackData?: TemplateGroup[] @@ -17,4 +18,4 @@ const useTemplateGroupsSWR = ( ) } -export default useTemplateGroupsSWR +export default useTemplateGroupsSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/updateNode.ts b/resources/scripts/api/admin/nodes/updateNode.ts index 0e6b9073e16..266d27b61d0 100644 --- a/resources/scripts/api/admin/nodes/updateNode.ts +++ b/resources/scripts/api/admin/nodes/updateNode.ts @@ -1,4 +1,4 @@ -import { Node, rawDataToNode } from '@/api/admin/nodes/getNodes' +import { rawDataToNode } from '@/api/admin/nodes/getNodes' import http from '@/api/http' interface UpdateNodeParameters { @@ -43,4 +43,4 @@ const updateNode = async (nodeId: number, payload: UpdateNodeParameters) => { return rawDataToNode(data) } -export default updateNode +export default updateNode \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/useNodeSWR.ts b/resources/scripts/api/admin/nodes/useNodeSWR.ts index a156f70dfbb..1abd0b0189d 100644 --- a/resources/scripts/api/admin/nodes/useNodeSWR.ts +++ b/resources/scripts/api/admin/nodes/useNodeSWR.ts @@ -1,13 +1,11 @@ import { Optimistic } from '@/lib/swr' -import { match } from '@headlessui/react/dist/utils/match' -import { useMatch, useParams } from 'react-router-dom' +import { useParams } from 'react-router-dom' import useSWR, { Key, SWRResponse } from 'swr' -import getAddressPool from '@/api/admin/addressPools/getAddressPool' -import { AddressPool } from '@/api/admin/addressPools/getAddressPools' import getNode from '@/api/admin/nodes/getNode' import { Node } from '@/api/admin/nodes/getNodes' + export const getKey = (id: number): Key => ['admin.nodes', id] const useNodeSWR = () => { @@ -19,4 +17,4 @@ const useNodeSWR = () => { }) as Optimistic> } -export default useNodeSWR +export default useNodeSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/nodes/useNodesSWR.ts b/resources/scripts/api/admin/nodes/useNodesSWR.ts index 8b217850c04..2cf7a625b23 100644 --- a/resources/scripts/api/admin/nodes/useNodesSWR.ts +++ b/resources/scripts/api/admin/nodes/useNodesSWR.ts @@ -2,10 +2,11 @@ import useSWR from 'swr' import getNodes, { NodeResponse, QueryParams } from '@/api/admin/nodes/getNodes' + const useNodesSWR = ({ page, query, id, ...params }: QueryParams) => { return useSWR(['admin:nodes', page, query, Boolean(id)], () => getNodes({ page, query, id, ...params }) ) } -export default useNodesSWR +export default useNodesSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/createServer.ts b/resources/scripts/api/admin/servers/createServer.ts index 21791036b97..84040b7571d 100644 --- a/resources/scripts/api/admin/servers/createServer.ts +++ b/resources/scripts/api/admin/servers/createServer.ts @@ -58,4 +58,4 @@ const createServer = async ({ return rawDataToServerBuild(responseData) } -export default createServer +export default createServer \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/deleteServer.ts b/resources/scripts/api/admin/servers/deleteServer.ts index f4714eec810..d581bbf7964 100644 --- a/resources/scripts/api/admin/servers/deleteServer.ts +++ b/resources/scripts/api/admin/servers/deleteServer.ts @@ -8,4 +8,4 @@ const deleteServer = (serverUuid: string, noPurge?: boolean) => { }) } -export default deleteServer +export default deleteServer \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/getServer.ts b/resources/scripts/api/admin/servers/getServer.ts index f4fc43e4a89..7f8b1d2a389 100644 --- a/resources/scripts/api/admin/servers/getServer.ts +++ b/resources/scripts/api/admin/servers/getServer.ts @@ -31,4 +31,4 @@ export const getServer = async ( }) return rawDataToAdminServer(data) -} +} \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/getServers.ts b/resources/scripts/api/admin/servers/getServers.ts index 8734ce869dc..0f37b5571fb 100644 --- a/resources/scripts/api/admin/servers/getServers.ts +++ b/resources/scripts/api/admin/servers/getServers.ts @@ -42,4 +42,4 @@ const getServers = async ({ } } -export default getServers +export default getServers \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/suspendServer.ts b/resources/scripts/api/admin/servers/suspendServer.ts index edad2b3e1b6..57e4fc88d73 100644 --- a/resources/scripts/api/admin/servers/suspendServer.ts +++ b/resources/scripts/api/admin/servers/suspendServer.ts @@ -3,4 +3,4 @@ import http from '@/api/http' const suspendServer = (uuid: string) => http.post(`/api/admin/servers/${uuid}/settings/suspend`) -export default suspendServer +export default suspendServer \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/unsuspendServer.ts b/resources/scripts/api/admin/servers/unsuspendServer.ts index 2501520229d..ad39186fad3 100644 --- a/resources/scripts/api/admin/servers/unsuspendServer.ts +++ b/resources/scripts/api/admin/servers/unsuspendServer.ts @@ -3,4 +3,4 @@ import http from '@/api/http' const unsuspendServer = (uuid: string) => http.post(`/api/admin/servers/${uuid}/settings/unsuspend`) -export default unsuspendServer +export default unsuspendServer \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/updateBuild.ts b/resources/scripts/api/admin/servers/updateBuild.ts index a7351908328..eea6fcd52fd 100644 --- a/resources/scripts/api/admin/servers/updateBuild.ts +++ b/resources/scripts/api/admin/servers/updateBuild.ts @@ -37,4 +37,4 @@ const updateBuild = async ( return rawDataToAdminServer(data) } -export default updateBuild +export default updateBuild \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/updateServer.ts b/resources/scripts/api/admin/servers/updateServer.ts index e115ba29355..66899acda3b 100644 --- a/resources/scripts/api/admin/servers/updateServer.ts +++ b/resources/scripts/api/admin/servers/updateServer.ts @@ -26,4 +26,4 @@ const updateServer = async ( return rawDataToAdminServer(data) } -export default updateServer +export default updateServer \ No newline at end of file diff --git a/resources/scripts/api/admin/servers/useServersSWR.ts b/resources/scripts/api/admin/servers/useServersSWR.ts index d7b38d2db46..617a16104d9 100644 --- a/resources/scripts/api/admin/servers/useServersSWR.ts +++ b/resources/scripts/api/admin/servers/useServersSWR.ts @@ -5,6 +5,7 @@ import getServers, { ServerResponse, } from '@/api/admin/servers/getServers' + const useServersSWR = ({ page, nodeId, @@ -18,4 +19,4 @@ const useServersSWR = ({ ) } -export default useServersSWR +export default useServersSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/tokens/createToken.ts b/resources/scripts/api/admin/tokens/createToken.ts index 4560e5a8e5e..d9e9b3c252c 100644 --- a/resources/scripts/api/admin/tokens/createToken.ts +++ b/resources/scripts/api/admin/tokens/createToken.ts @@ -13,4 +13,4 @@ const createToken = async (payload: CreateTokenParameters) => { return rawDataToToken(data) } -export default createToken +export default createToken \ No newline at end of file diff --git a/resources/scripts/api/admin/tokens/deleteToken.ts b/resources/scripts/api/admin/tokens/deleteToken.ts index 83b5acbabdc..32da0a55d6b 100644 --- a/resources/scripts/api/admin/tokens/deleteToken.ts +++ b/resources/scripts/api/admin/tokens/deleteToken.ts @@ -4,4 +4,4 @@ const deleteToken = (id: number) => { return http.delete(`/api/admin/tokens/${id}`) } -export default deleteToken +export default deleteToken \ No newline at end of file diff --git a/resources/scripts/api/admin/tokens/getTokens.ts b/resources/scripts/api/admin/tokens/getTokens.ts index 0a11eb6fd7e..8bd160abc77 100644 --- a/resources/scripts/api/admin/tokens/getTokens.ts +++ b/resources/scripts/api/admin/tokens/getTokens.ts @@ -48,4 +48,4 @@ const getTokens = async ({ } } -export default getTokens +export default getTokens \ No newline at end of file diff --git a/resources/scripts/api/admin/tokens/useTokensSWR.ts b/resources/scripts/api/admin/tokens/useTokensSWR.ts index eaaf9f22b52..f3e0ececf72 100644 --- a/resources/scripts/api/admin/tokens/useTokensSWR.ts +++ b/resources/scripts/api/admin/tokens/useTokensSWR.ts @@ -5,10 +5,11 @@ import getTokens, { TokenResponse, } from '@/api/admin/tokens/getTokens' + const useTokensSWR = ({ page, ...params }: QueryParams) => { return useSWR(['admin:tokens', page], () => getTokens({ page, ...params }) ) } -export default useTokensSWR +export default useTokensSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/tools/queryRemoteFile.ts b/resources/scripts/api/admin/tools/queryRemoteFile.ts index e9063c584ac..00de3eb32c8 100644 --- a/resources/scripts/api/admin/tools/queryRemoteFile.ts +++ b/resources/scripts/api/admin/tools/queryRemoteFile.ts @@ -27,4 +27,4 @@ const queryRemoteFile = async ( return rawDataToFileMetadata(data) } -export default queryRemoteFile +export default queryRemoteFile \ No newline at end of file diff --git a/resources/scripts/api/admin/users/createUser.ts b/resources/scripts/api/admin/users/createUser.ts index fb633fd4abc..864dfd57c5d 100644 --- a/resources/scripts/api/admin/users/createUser.ts +++ b/resources/scripts/api/admin/users/createUser.ts @@ -19,4 +19,4 @@ const createUser = async ({ rootAdmin, ...payload }: CreateUserParameters) => { return rawDataToUser(data) } -export default createUser +export default createUser \ No newline at end of file diff --git a/resources/scripts/api/admin/users/deleteUser.ts b/resources/scripts/api/admin/users/deleteUser.ts index 0a9a8b80e01..04f95e24f3d 100644 --- a/resources/scripts/api/admin/users/deleteUser.ts +++ b/resources/scripts/api/admin/users/deleteUser.ts @@ -4,4 +4,4 @@ const deleteUser = (id: number) => { return http.delete(`/api/admin/users/${id}`) } -export default deleteUser +export default deleteUser \ No newline at end of file diff --git a/resources/scripts/api/admin/users/getUser.ts b/resources/scripts/api/admin/users/getUser.ts index ef91c61406d..23ef49e8af5 100644 --- a/resources/scripts/api/admin/users/getUser.ts +++ b/resources/scripts/api/admin/users/getUser.ts @@ -9,4 +9,4 @@ const getUser = async (id: number) => { return rawDataToUser(data) } -export default getUser +export default getUser \ No newline at end of file diff --git a/resources/scripts/api/admin/users/getUsers.ts b/resources/scripts/api/admin/users/getUsers.ts index 557cf21507e..e1efdebaae8 100644 --- a/resources/scripts/api/admin/users/getUsers.ts +++ b/resources/scripts/api/admin/users/getUsers.ts @@ -47,4 +47,4 @@ const getUsers = async ({ } } -export default getUsers +export default getUsers \ No newline at end of file diff --git a/resources/scripts/api/admin/users/updateUser.ts b/resources/scripts/api/admin/users/updateUser.ts index 794241a2dae..fcac40ad134 100644 --- a/resources/scripts/api/admin/users/updateUser.ts +++ b/resources/scripts/api/admin/users/updateUser.ts @@ -22,4 +22,4 @@ const updateUser = async ( return rawDataToUser(data) } -export default updateUser +export default updateUser \ No newline at end of file diff --git a/resources/scripts/api/admin/users/useUserSWR.ts b/resources/scripts/api/admin/users/useUserSWR.ts index e7169ff080b..139659d143c 100644 --- a/resources/scripts/api/admin/users/useUserSWR.ts +++ b/resources/scripts/api/admin/users/useUserSWR.ts @@ -5,6 +5,7 @@ import useSWR, { Key, SWRResponse } from 'swr' import getUser from '@/api/admin/users/getUser' import { User } from '@/api/admin/users/getUsers' + export const getKey = (id: number): Key => ['admin.users', id] const useUserSWR = () => { @@ -16,4 +17,4 @@ const useUserSWR = () => { > } -export default useUserSWR +export default useUserSWR \ No newline at end of file diff --git a/resources/scripts/api/admin/users/useUsersSWR.ts b/resources/scripts/api/admin/users/useUsersSWR.ts index a13014b25b1..0afcccea3d7 100644 --- a/resources/scripts/api/admin/users/useUsersSWR.ts +++ b/resources/scripts/api/admin/users/useUsersSWR.ts @@ -2,10 +2,11 @@ import useSWR from 'swr' import getUsers, { QueryParams, UserResponse } from '@/api/admin/users/getUsers' + const useUsersSWR = ({ page, query, ...params }: QueryParams) => { return useSWR(['admin:users', page, query], () => getUsers({ page, query, ...params }) ) } -export default useUsersSWR +export default useUsersSWR \ No newline at end of file diff --git a/resources/scripts/api/auth/login.ts b/resources/scripts/api/auth/login.ts index 018b688cb8d..244ab8c40fb 100644 --- a/resources/scripts/api/auth/login.ts +++ b/resources/scripts/api/auth/login.ts @@ -10,4 +10,4 @@ export default ({ email, password }: LoginData): Promise => { email, password, }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/getServers.ts b/resources/scripts/api/getServers.ts index 0cd27532e60..b295bfb1b01 100644 --- a/resources/scripts/api/getServers.ts +++ b/resources/scripts/api/getServers.ts @@ -31,4 +31,4 @@ export default ({ ) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/http.ts b/resources/scripts/api/http.ts index b445f81458e..c0fa022b2e6 100644 --- a/resources/scripts/api/http.ts +++ b/resources/scripts/api/http.ts @@ -22,12 +22,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { - completeNavigationProgress, - resetNavigationProgress, - startNavigationProgress, -} from '@mantine/nprogress' -import axios, { AxiosInstance } from 'axios' +import { completeNavigationProgress, resetNavigationProgress, startNavigationProgress } from '@mantine/nprogress'; +import axios, { AxiosInstance } from 'axios'; + const http: AxiosInstance = axios.create({ withCredentials: true, @@ -193,4 +190,4 @@ export const withQueryBuilderParams = ( sort: !sorts.length ? undefined : sorts.join(','), page: data.page, } -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/backups/createBackup.ts b/resources/scripts/api/server/backups/createBackup.ts index 6ed45d3ede0..f36a28ca202 100644 --- a/resources/scripts/api/server/backups/createBackup.ts +++ b/resources/scripts/api/server/backups/createBackup.ts @@ -22,4 +22,4 @@ export default async ( }) return rawDataToBackupObject(data) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/backups/deleteBackup.ts b/resources/scripts/api/server/backups/deleteBackup.ts index c9b2031ac8c..e6a3e4271b1 100644 --- a/resources/scripts/api/server/backups/deleteBackup.ts +++ b/resources/scripts/api/server/backups/deleteBackup.ts @@ -6,4 +6,4 @@ export default (uuid: string, backup: string): Promise => { .then(() => resolve()) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/backups/getBackups.ts b/resources/scripts/api/server/backups/getBackups.ts index cdb7233cfd1..4750a22d398 100644 --- a/resources/scripts/api/server/backups/getBackups.ts +++ b/resources/scripts/api/server/backups/getBackups.ts @@ -55,4 +55,4 @@ export default ( ) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/backups/restoreBackup.ts b/resources/scripts/api/server/backups/restoreBackup.ts index 9c6c9c678a9..847e9cb6c23 100644 --- a/resources/scripts/api/server/backups/restoreBackup.ts +++ b/resources/scripts/api/server/backups/restoreBackup.ts @@ -6,4 +6,4 @@ export default (uuid: string, backup: string): Promise => { .then(() => resolve()) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/createConsoleSession.ts b/resources/scripts/api/server/createConsoleSession.ts index 8ef29d84217..4005297f60c 100644 --- a/resources/scripts/api/server/createConsoleSession.ts +++ b/resources/scripts/api/server/createConsoleSession.ts @@ -53,4 +53,4 @@ export default ( ) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/getServer.ts b/resources/scripts/api/server/getServer.ts index 0a1e2de7c57..b02f1200140 100644 --- a/resources/scripts/api/server/getServer.ts +++ b/resources/scripts/api/server/getServer.ts @@ -1,6 +1,6 @@ import { Node } from '@/api/admin/nodes/getNodes' import { User } from '@/api/admin/users/getUsers' -import http, { FractalResponseData } from '@/api/http' +import http from '@/api/http' import { EloquentStatus } from '@/api/server/types' export type AddressType = 'ipv4' | 'ipv6' @@ -127,4 +127,4 @@ export default (uuid: string): Promise => { .then(({ data }) => resolve(rawDataToServerBuild(data.data))) .catch(reject) }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/getState.ts b/resources/scripts/api/server/getState.ts index a300df900a4..dcf7e7cb1f3 100644 --- a/resources/scripts/api/server/getState.ts +++ b/resources/scripts/api/server/getState.ts @@ -28,4 +28,4 @@ const getState = (uuid: string): Promise => { }) } -export default getState +export default getState \ No newline at end of file diff --git a/resources/scripts/api/server/settings/getBootOrder.ts b/resources/scripts/api/server/settings/getBootOrder.ts index 68f8e723b3d..b054af9915a 100644 --- a/resources/scripts/api/server/settings/getBootOrder.ts +++ b/resources/scripts/api/server/settings/getBootOrder.ts @@ -19,4 +19,4 @@ export default async (uuid: string): Promise => { ) return rawDataToBootOrderSettings(data) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/getIsos.ts b/resources/scripts/api/server/settings/getIsos.ts index 6256850ad98..8a8bab2c775 100644 --- a/resources/scripts/api/server/settings/getIsos.ts +++ b/resources/scripts/api/server/settings/getIsos.ts @@ -21,4 +21,4 @@ const getIsos = async (serverUuid: string): Promise => { return data.map(rawDataToMedia) } -export default getIsos +export default getIsos \ No newline at end of file diff --git a/resources/scripts/api/server/settings/getNetwork.ts b/resources/scripts/api/server/settings/getNetwork.ts index ae64d6945e1..5bf34b524e5 100644 --- a/resources/scripts/api/server/settings/getNetwork.ts +++ b/resources/scripts/api/server/settings/getNetwork.ts @@ -10,4 +10,4 @@ export default async (uuid: string): Promise => { } = await http.get(`/api/client/servers/${uuid}/settings/network`) return data -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/getSecurity.ts b/resources/scripts/api/server/settings/getSecurity.ts index 06f59d53c97..d496eb27f12 100644 --- a/resources/scripts/api/server/settings/getSecurity.ts +++ b/resources/scripts/api/server/settings/getSecurity.ts @@ -14,4 +14,4 @@ export default async (uuid: string): Promise => { } = await http.get(`/api/client/servers/${uuid}/settings/security`) return rawDataToSecurityObject(data) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/getTemplateGroups.ts b/resources/scripts/api/server/settings/getTemplateGroups.ts index 1d46d3f9cb9..901661239b0 100644 --- a/resources/scripts/api/server/settings/getTemplateGroups.ts +++ b/resources/scripts/api/server/settings/getTemplateGroups.ts @@ -40,4 +40,4 @@ const getTemplateGroups = async (serverUuid: string) => { return data.map(rawDataToTemplateGroup) } -export default getTemplateGroups +export default getTemplateGroups \ No newline at end of file diff --git a/resources/scripts/api/server/settings/mountMedia.ts b/resources/scripts/api/server/settings/mountMedia.ts index 0c40a30fdeb..4be43d187fc 100644 --- a/resources/scripts/api/server/settings/mountMedia.ts +++ b/resources/scripts/api/server/settings/mountMedia.ts @@ -6,4 +6,4 @@ const mountMedia = (serverUuid: string, mediaUuid: string) => { ) } -export default mountMedia +export default mountMedia \ No newline at end of file diff --git a/resources/scripts/api/server/settings/reinstallServer.ts b/resources/scripts/api/server/settings/reinstallServer.ts index 7c4c3b37d96..733e3a6d1c2 100644 --- a/resources/scripts/api/server/settings/reinstallServer.ts +++ b/resources/scripts/api/server/settings/reinstallServer.ts @@ -21,4 +21,4 @@ const reinstallServer = ( }) } -export default reinstallServer +export default reinstallServer \ No newline at end of file diff --git a/resources/scripts/api/server/settings/renameServer.ts b/resources/scripts/api/server/settings/renameServer.ts index d42cc4300d0..7fbe833d524 100644 --- a/resources/scripts/api/server/settings/renameServer.ts +++ b/resources/scripts/api/server/settings/renameServer.ts @@ -9,4 +9,4 @@ export default (uuid: string, payload: Payload) => { return http.post(`/api/client/servers/${uuid}/settings/rename`, { ...payload, }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/unmountMedia.ts b/resources/scripts/api/server/settings/unmountMedia.ts index 7b692c43e98..5c2db172466 100644 --- a/resources/scripts/api/server/settings/unmountMedia.ts +++ b/resources/scripts/api/server/settings/unmountMedia.ts @@ -6,4 +6,4 @@ const unmountMedia = (serverUuid: string, mediaUuid: string) => { ) } -export default unmountMedia +export default unmountMedia \ No newline at end of file diff --git a/resources/scripts/api/server/settings/updateBootOrder.ts b/resources/scripts/api/server/settings/updateBootOrder.ts index c5ccba94135..edca5488ad9 100644 --- a/resources/scripts/api/server/settings/updateBootOrder.ts +++ b/resources/scripts/api/server/settings/updateBootOrder.ts @@ -7,4 +7,4 @@ export default (uuid: string, order: string[]) => { order, } ) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/updateNetwork.ts b/resources/scripts/api/server/settings/updateNetwork.ts index d96f33ad22d..4a3f25ffa91 100644 --- a/resources/scripts/api/server/settings/updateNetwork.ts +++ b/resources/scripts/api/server/settings/updateNetwork.ts @@ -4,4 +4,4 @@ export default (uuid: string, nameservers: string[]) => { return http.put(`/api/client/servers/${uuid}/settings/network`, { nameservers, }) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/updateSecurity.ts b/resources/scripts/api/server/settings/updateSecurity.ts index 2415b1f2d0f..3c655c06957 100644 --- a/resources/scripts/api/server/settings/updateSecurity.ts +++ b/resources/scripts/api/server/settings/updateSecurity.ts @@ -30,4 +30,4 @@ export default (uuid: string, data: Payload) => { } return http.put(`/api/client/servers/${uuid}/settings/security`, payload) -} +} \ No newline at end of file diff --git a/resources/scripts/api/server/settings/useBootOrderSWR.ts b/resources/scripts/api/server/settings/useBootOrderSWR.ts index 0ec08a86a3e..351d0bf35b2 100644 --- a/resources/scripts/api/server/settings/useBootOrderSWR.ts +++ b/resources/scripts/api/server/settings/useBootOrderSWR.ts @@ -4,6 +4,7 @@ import getBootOrder, { BootOrderSettings, } from '@/api/server/settings/getBootOrder' + const useBootOrderSWR = (serverUuid: string, config?: SWRConfiguration) => { return useSWR( ['server:settings:hardware:boot-order', serverUuid], @@ -12,4 +13,4 @@ const useBootOrderSWR = (serverUuid: string, config?: SWRConfiguration) => { ) } -export default useBootOrderSWR +export default useBootOrderSWR \ No newline at end of file diff --git a/resources/scripts/api/server/settings/useIsosSWR.ts b/resources/scripts/api/server/settings/useIsosSWR.ts index 7745201e732..df2739e055e 100644 --- a/resources/scripts/api/server/settings/useIsosSWR.ts +++ b/resources/scripts/api/server/settings/useIsosSWR.ts @@ -2,10 +2,11 @@ import useSWR from 'swr' import getIsos, { Iso } from '@/api/server/settings/getIsos' + const useIsosSWR = (serverUuid: string) => { return useSWR(['server:settings:hardware:media', serverUuid], () => getIsos(serverUuid) ) } -export default useIsosSWR +export default useIsosSWR \ No newline at end of file diff --git a/resources/scripts/api/server/settings/useTemplateGroupsSWR.ts b/resources/scripts/api/server/settings/useTemplateGroupsSWR.ts index 222d743cdd3..ef629d23250 100644 --- a/resources/scripts/api/server/settings/useTemplateGroupsSWR.ts +++ b/resources/scripts/api/server/settings/useTemplateGroupsSWR.ts @@ -4,6 +4,7 @@ import getTemplateGroups, { TemplateGroup, } from '@/api/server/settings/getTemplateGroups' + const useTemplateGroupsSWR = (serverUuid: string) => { return useSWR( ['server:settings:general:template-groups', serverUuid], @@ -11,4 +12,4 @@ const useTemplateGroupsSWR = (serverUuid: string) => { ) } -export default useTemplateGroupsSWR +export default useTemplateGroupsSWR \ No newline at end of file diff --git a/resources/scripts/api/server/updateState.ts b/resources/scripts/api/server/updateState.ts index 42ed1084e2c..855534f8606 100644 --- a/resources/scripts/api/server/updateState.ts +++ b/resources/scripts/api/server/updateState.ts @@ -8,4 +8,4 @@ const updateState = (uuid: string, state: PowerAction) => { }) } -export default updateState +export default updateState \ No newline at end of file diff --git a/resources/scripts/api/server/useServerDetails.ts b/resources/scripts/api/server/useServerDetails.ts index a9cc9248fca..05a845226cb 100644 --- a/resources/scripts/api/server/useServerDetails.ts +++ b/resources/scripts/api/server/useServerDetails.ts @@ -4,6 +4,7 @@ import useSWR from 'swr' import http from '@/api/http' import { ServerState } from '@/api/server/getState' + export interface BaseDisk { interface: string isPrimaryDisk: boolean @@ -81,4 +82,4 @@ const useProxmoxDetails = () => { }) } -export default useProxmoxDetails +export default useProxmoxDetails \ No newline at end of file diff --git a/resources/scripts/components/App.tsx b/resources/scripts/components/App.tsx index e285a79c85f..e48b6d3f62f 100644 --- a/resources/scripts/components/App.tsx +++ b/resources/scripts/components/App.tsx @@ -2,18 +2,13 @@ import router from '@/routers/router' import { store } from '@/state' import { NavigationProgress } from '@mantine/nprogress' import { StoreProvider } from 'easy-peasy' -import { - BrowserRouter, - Route, - RouterProvider, - Routes, - createBrowserRouter, -} from 'react-router-dom' +import { RouterProvider } from 'react-router-dom' import Spinner from '@/components/elements/Spinner' import ThemeProvider from '@/components/ThemeProvider' + interface ExtendedWindow extends Window { ConvoyUser?: { name: string @@ -64,4 +59,4 @@ const App = () => { ) } -export default App +export default App \ No newline at end of file diff --git a/resources/scripts/components/admin/SearchBar.tsx b/resources/scripts/components/admin/SearchBar.tsx index 0b543334a2f..8bb8060d1d2 100644 --- a/resources/scripts/components/admin/SearchBar.tsx +++ b/resources/scripts/components/admin/SearchBar.tsx @@ -44,4 +44,4 @@ const SearchBar = ({ value, onChange, buttonText, onClick }: Props) => { ) } -export default SearchBar +export default SearchBar \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/CreatePoolModal.tsx b/resources/scripts/components/admin/ipam/CreatePoolModal.tsx index dd361ead22f..1662b26a881 100644 --- a/resources/scripts/components/admin/ipam/CreatePoolModal.tsx +++ b/resources/scripts/components/admin/ipam/CreatePoolModal.tsx @@ -14,6 +14,7 @@ import TextInputForm from '@/components/elements/forms/TextInputForm' import NodesMultiSelectForm from '@/components/admin/ipam/NodesMultiSelectForm' + interface Props { open: boolean onClose: () => void @@ -102,4 +103,4 @@ const CreatePoolModal = ({ open, onClose, mutate }: Props) => { ) } -export default CreatePoolModal +export default CreatePoolModal \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/DeletePoolModal.tsx b/resources/scripts/components/admin/ipam/DeletePoolModal.tsx index 5d585c107ef..96fa5e22b97 100644 --- a/resources/scripts/components/admin/ipam/DeletePoolModal.tsx +++ b/resources/scripts/components/admin/ipam/DeletePoolModal.tsx @@ -1,5 +1,4 @@ import { useFlashKey } from '@/util/useFlash' -import { id } from 'date-fns/locale' import { FormEvent } from 'react' import { useTranslation } from 'react-i18next' import { KeyedMutator } from 'swr' @@ -15,6 +14,7 @@ import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import MessageBox from '@/components/elements/MessageBox' import Modal from '@/components/elements/Modal' + interface Props { pool: AddressPool | null onClose: () => void @@ -103,4 +103,4 @@ const CreatePoolModal = ({ pool, onClose, mutate }: Props) => { ) } -export default CreatePoolModal +export default CreatePoolModal \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/EditPoolModal.tsx b/resources/scripts/components/admin/ipam/EditPoolModal.tsx index 1c9066f7eb6..c2c69704049 100644 --- a/resources/scripts/components/admin/ipam/EditPoolModal.tsx +++ b/resources/scripts/components/admin/ipam/EditPoolModal.tsx @@ -1,6 +1,6 @@ import { useFlashKey } from '@/util/useFlash' import { zodResolver } from '@hookform/resolvers/zod' -import { useEffect, useMemo } from 'react' +import { useEffect } from 'react' import { FormProvider, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' import { KeyedMutator } from 'swr' @@ -16,6 +16,7 @@ import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import Modal from '@/components/elements/Modal' import TextInputForm from '@/components/elements/forms/TextInputForm' + interface Props { pool: AddressPool | null onClose: () => void @@ -108,4 +109,4 @@ const EditPoolModal = ({ pool, onClose, mutate }: Props) => { ) } -export default EditPoolModal +export default EditPoolModal \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/IpamContainer.tsx b/resources/scripts/components/admin/ipam/IpamContainer.tsx index 70722d5723e..df9c8f3a889 100644 --- a/resources/scripts/components/admin/ipam/IpamContainer.tsx +++ b/resources/scripts/components/admin/ipam/IpamContainer.tsx @@ -22,6 +22,7 @@ import CreatePoolModal from '@/components/admin/ipam/CreatePoolModal' import DeletePoolModal from '@/components/admin/ipam/DeletePoolModal' import EditPoolModal from '@/components/admin/ipam/EditPoolModal' + const IpamContainer = () => { const { t: tStrings } = useTranslation('strings') const { t } = useTranslation('admin.addressPools.index') @@ -115,4 +116,4 @@ const IpamContainer = () => { ) } -export default IpamContainer +export default IpamContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/NodesMultiSelectForm.tsx b/resources/scripts/components/admin/ipam/NodesMultiSelectForm.tsx index 957c2c9ca2d..c1425437a60 100644 --- a/resources/scripts/components/admin/ipam/NodesMultiSelectForm.tsx +++ b/resources/scripts/components/admin/ipam/NodesMultiSelectForm.tsx @@ -8,6 +8,7 @@ import useNodesSWR from '@/api/admin/nodes/useNodesSWR' import DescriptiveItemComponent from '@/components/elements/DescriptiveItemComponent' import MultiSelectForm from '@/components/elements/forms/MultiSelectForm' + interface Props { disabled?: boolean } @@ -73,4 +74,4 @@ const NodesMultiSelectForm = ({ disabled }: Props) => { ) } -export default NodesMultiSelectForm +export default NodesMultiSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/PoolContentBlock.tsx b/resources/scripts/components/admin/ipam/PoolContentBlock.tsx index b22c97184fe..1fab04e0f76 100644 --- a/resources/scripts/components/admin/ipam/PoolContentBlock.tsx +++ b/resources/scripts/components/admin/ipam/PoolContentBlock.tsx @@ -20,4 +20,4 @@ const PoolContentBlock = ({ title, children, ...props }: Props) => { ) } -export default PoolContentBlock +export default PoolContentBlock \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/addresses/AddressesContainer.tsx b/resources/scripts/components/admin/ipam/addresses/AddressesContainer.tsx index 8c21b35196d..84996142c4c 100644 --- a/resources/scripts/components/admin/ipam/addresses/AddressesContainer.tsx +++ b/resources/scripts/components/admin/ipam/addresses/AddressesContainer.tsx @@ -4,11 +4,9 @@ import { useState } from 'react' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' -import { AddressPool } from '@/api/admin/addressPools/getAddressPools' import useAddressesSWR from '@/api/admin/addressPools/useAddressesSWR' import { Address } from '@/api/server/getServer' -import Breadcrumbs from '@/components/elements/Breadcrumbs' import Menu from '@/components/elements/Menu' import Pagination from '@/components/elements/Pagination' import Spinner from '@/components/elements/Spinner' @@ -24,6 +22,7 @@ import CreateAddressModal from '@/components/admin/ipam/addresses/CreateAddressM import DeleteAddressModal from '@/components/admin/ipam/addresses/DeleteAddressModal' import EditAddressModal from '@/components/admin/ipam/addresses/EditAddressModal' + const AddressesContainer = () => { const { t: tStrings } = useTranslation('strings') const { t } = useTranslation('admin.addressPools.addresses') @@ -135,4 +134,4 @@ const AddressesContainer = () => { ) } -export default AddressesContainer +export default AddressesContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/addresses/CreateAddressModal.tsx b/resources/scripts/components/admin/ipam/addresses/CreateAddressModal.tsx index 31c02d51b24..9f32d5ba8b3 100644 --- a/resources/scripts/components/admin/ipam/addresses/CreateAddressModal.tsx +++ b/resources/scripts/components/admin/ipam/addresses/CreateAddressModal.tsx @@ -1,11 +1,10 @@ import { countIPsInRange } from '@/util/helpers' import { useFlashKey } from '@/util/useFlash' -import { ipAddress, macAddress } from '@/util/validation' import { zodResolver } from '@hookform/resolvers/zod' import { useMemo } from 'react' import { FormProvider, useForm } from 'react-hook-form' import { Trans, useTranslation } from 'react-i18next' -import { KeyedMutator, mutate } from 'swr' +import { KeyedMutator } from 'swr' import { z } from 'zod' import createAddress, { @@ -13,18 +12,18 @@ import createAddress, { } from '@/api/admin/addressPools/addresses/createAddress' import useAddressPoolSWR from '@/api/admin/addressPools/useAddressPoolSWR' import { AddressResponse } from '@/api/admin/nodes/addresses/getAddresses' -import { Address, AddressType } from '@/api/server/getServer' +import { AddressType } from '@/api/server/getServer' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import Modal from '@/components/elements/Modal' import SegmentedControl from '@/components/elements/SegmentedControl' -import CheckboxForm from '@/components/elements/forms/CheckboxForm' import RadioGroupForm from '@/components/elements/forms/RadioGroupForm' import TextInputForm from '@/components/elements/forms/TextInputForm' import Radio from '@/components/elements/inputs/Radio' import ServersSelectForm from '@/components/admin/ipam/addresses/ServersSelectForm' + interface Props { open: boolean onClose: () => void @@ -215,4 +214,4 @@ const CreateAddressModal = ({ open, onClose, mutate }: Props) => { ) } -export default CreateAddressModal +export default CreateAddressModal \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/addresses/DeleteAddressModal.tsx b/resources/scripts/components/admin/ipam/addresses/DeleteAddressModal.tsx index dc98314700a..8ecf86842f0 100644 --- a/resources/scripts/components/admin/ipam/addresses/DeleteAddressModal.tsx +++ b/resources/scripts/components/admin/ipam/addresses/DeleteAddressModal.tsx @@ -5,18 +5,13 @@ import { KeyedMutator } from 'swr' import useSWRMutation from 'swr/mutation' import deleteAddress from '@/api/admin/addressPools/addresses/deleteAddress' -import deleteAddressPool from '@/api/admin/addressPools/deleteAddressPool' -import { - AddressPool, - AddressPoolResponse, -} from '@/api/admin/addressPools/getAddressPools' import { AddressResponse } from '@/api/admin/nodes/addresses/getAddresses' import { Address } from '@/api/server/getServer' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' -import MessageBox from '@/components/elements/MessageBox' import Modal from '@/components/elements/Modal' + interface Props { address: Address | null onClose: () => void @@ -96,4 +91,4 @@ const DeleteAddressModal = ({ address, onClose, mutate }: Props) => { ) } -export default DeleteAddressModal +export default DeleteAddressModal \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/addresses/EditAddressModal.tsx b/resources/scripts/components/admin/ipam/addresses/EditAddressModal.tsx index 06e4e3f1135..b3f26904d61 100644 --- a/resources/scripts/components/admin/ipam/addresses/EditAddressModal.tsx +++ b/resources/scripts/components/admin/ipam/addresses/EditAddressModal.tsx @@ -4,12 +4,10 @@ import { zodResolver } from '@hookform/resolvers/zod' import { useEffect } from 'react' import { FormProvider, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' -import { KeyedMutator, mutate } from 'swr' +import { KeyedMutator } from 'swr' import { z } from 'zod' -import createAddress from '@/api/admin/addressPools/addresses/createAddress' import updateAddress from '@/api/admin/addressPools/addresses/updateAddress' -import useAddressPoolSWR from '@/api/admin/addressPools/useAddressPoolSWR' import { AddressResponse } from '@/api/admin/nodes/addresses/getAddresses' import { Address } from '@/api/server/getServer' @@ -21,6 +19,7 @@ import Radio from '@/components/elements/inputs/Radio' import ServersSelectForm from '@/components/admin/ipam/addresses/ServersSelectForm' + interface Props { address: Address | null onClose: () => void @@ -173,4 +172,4 @@ const CreateAddressModal = ({ address, onClose, mutate }: Props) => { ) } -export default CreateAddressModal +export default CreateAddressModal \ No newline at end of file diff --git a/resources/scripts/components/admin/ipam/addresses/ServersSelectForm.tsx b/resources/scripts/components/admin/ipam/addresses/ServersSelectForm.tsx index 1566ea9bab0..407ac3b4fe8 100644 --- a/resources/scripts/components/admin/ipam/addresses/ServersSelectForm.tsx +++ b/resources/scripts/components/admin/ipam/addresses/ServersSelectForm.tsx @@ -7,6 +7,7 @@ import useServersSWR from '@/api/admin/servers/useServersSWR' import SelectForm from '@/components/elements/forms/SelectForm' + const ServersSelectForm = () => { const { t: tSIndex } = useTranslation('admin.servers.index') const { t: tAIndex } = useTranslation('admin.addressPools.addresses') @@ -39,4 +40,4 @@ const ServersSelectForm = () => { ) } -export default ServersSelectForm +export default ServersSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/locations/CreateLocationModal.tsx b/resources/scripts/components/admin/locations/CreateLocationModal.tsx index d30c35653f8..fe0d8b9d63d 100644 --- a/resources/scripts/components/admin/locations/CreateLocationModal.tsx +++ b/resources/scripts/components/admin/locations/CreateLocationModal.tsx @@ -13,6 +13,7 @@ import Modal from '@/components/elements/Modal' import TextInputForm from '@/components/elements/forms/TextInputForm' import TextareaForm from '@/components/elements/forms/TextareaForm' + interface Props { mutate: KeyedMutator open: boolean @@ -110,4 +111,4 @@ const CreateLocationModal = ({ mutate, open, onClose }: Props) => { ) } -export default CreateLocationModal +export default CreateLocationModal \ No newline at end of file diff --git a/resources/scripts/components/admin/locations/EditLocationModal.tsx b/resources/scripts/components/admin/locations/EditLocationModal.tsx index 183e7971be4..654d717ce5e 100644 --- a/resources/scripts/components/admin/locations/EditLocationModal.tsx +++ b/resources/scripts/components/admin/locations/EditLocationModal.tsx @@ -10,11 +10,10 @@ import updateLocation from '@/api/admin/locations/updateLocation' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import Modal from '@/components/elements/Modal' -import TextInputFormik from '@/components/elements/formik/TextInputFormik' -import TextareaFormik from '@/components/elements/formik/TextareaFormik' import TextInputForm from '@/components/elements/forms/TextInputForm' import TextareaForm from '@/components/elements/forms/TextareaForm' + interface Props { location: Location open: boolean @@ -121,4 +120,4 @@ const EditLocationModal = ({ location, open, onClose, mutate }: Props) => { ) } -export default EditLocationModal +export default EditLocationModal \ No newline at end of file diff --git a/resources/scripts/components/admin/locations/LocationsContainer.tsx b/resources/scripts/components/admin/locations/LocationsContainer.tsx index eb222537175..e1dcb191c60 100644 --- a/resources/scripts/components/admin/locations/LocationsContainer.tsx +++ b/resources/scripts/components/admin/locations/LocationsContainer.tsx @@ -22,6 +22,7 @@ import SearchBar from '@/components/admin/SearchBar' import CreateLocationModal from '@/components/admin/locations/CreateLocationModal' import EditLocationModal from '@/components/admin/locations/EditLocationModal' + const LocationsContainer = () => { const { t } = useTranslation('admin.locations') const { t: tStrings } = useTranslation('strings') @@ -136,4 +137,4 @@ const LocationsContainer = () => { ) } -export default LocationsContainer +export default LocationsContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/CreateNodeModal.tsx b/resources/scripts/components/admin/nodes/CreateNodeModal.tsx index 550c7c9953b..4f28074a974 100644 --- a/resources/scripts/components/admin/nodes/CreateNodeModal.tsx +++ b/resources/scripts/components/admin/nodes/CreateNodeModal.tsx @@ -15,6 +15,7 @@ import TextInputForm from '@/components/elements/forms/TextInputForm' import LocationsSelectForm from '@/components/admin/nodes/LocationsSelectForm' + interface Props { open: boolean onClose: () => void @@ -193,4 +194,4 @@ const CreateNodeModal = ({ open, onClose }: Props) => { ) } -export default CreateNodeModal +export default CreateNodeModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/LocationsSelectForm.tsx b/resources/scripts/components/admin/nodes/LocationsSelectForm.tsx index eb2a01f027c..7173b083bb7 100644 --- a/resources/scripts/components/admin/nodes/LocationsSelectForm.tsx +++ b/resources/scripts/components/admin/nodes/LocationsSelectForm.tsx @@ -6,6 +6,7 @@ import useLocationsSWR from '@/api/admin/locations/useLocationsSWR' import SelectForm from '@/components/elements/forms/SelectForm' + const LocationsSelectForm = () => { const { watch } = useFormContext() const locationId: string = watch('locationId') @@ -34,4 +35,4 @@ const LocationsSelectForm = () => { ) } -export default LocationsSelectForm +export default LocationsSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/NodeContentBlock.tsx b/resources/scripts/components/admin/nodes/NodeContentBlock.tsx index df01e0d9b4c..a2e4d7d8003 100644 --- a/resources/scripts/components/admin/nodes/NodeContentBlock.tsx +++ b/resources/scripts/components/admin/nodes/NodeContentBlock.tsx @@ -18,4 +18,4 @@ const NodeContentBlock: React.FC = ({ title, children, ...props }) => { ) } -export default NodeContentBlock +export default NodeContentBlock \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/NodesContainer.tsx b/resources/scripts/components/admin/nodes/NodesContainer.tsx index 4203f5e0f89..74ce8fdf809 100644 --- a/resources/scripts/components/admin/nodes/NodesContainer.tsx +++ b/resources/scripts/components/admin/nodes/NodesContainer.tsx @@ -23,6 +23,7 @@ import Table, { import SearchBar from '@/components/admin/SearchBar' import CreateNodeModal from '@/components/admin/nodes/CreateNodeModal' + const NodesContainer = () => { const { t: tStrings } = useTranslation('strings') const { t } = useTranslation('admin.nodes.index') @@ -135,4 +136,4 @@ const NodesContainer = () => { ) } -export default NodesContainer +export default NodesContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/addresses/CreateAddressModal.tsx b/resources/scripts/components/admin/nodes/addresses/CreateAddressModal.tsx index c898c04c072..d4f9d6db04f 100644 --- a/resources/scripts/components/admin/nodes/addresses/CreateAddressModal.tsx +++ b/resources/scripts/components/admin/nodes/addresses/CreateAddressModal.tsx @@ -23,6 +23,7 @@ import Radio from '@/components/elements/inputs/Radio' import ServersSelectForm from '@/components/admin/ipam/addresses/ServersSelectForm' + interface Props { open: boolean onClose: () => void @@ -79,7 +80,8 @@ const CreateAddressModal = ({ open, onClose, mutate }: Props) => { clearFlashes() try { - const address = await createAddress(pool.id, { + // TODO: add pool id selector for create address + const address = await createAddress(0, { macAddress: macAddress && macAddress.length > 0 ? macAddress : null, serverId: serverId !== '' ? serverId : null, @@ -118,7 +120,7 @@ const CreateAddressModal = ({ open, onClose, mutate }: Props) => { { ) } -export default CreateAddressModal +export default CreateAddressModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/addresses/DeleteAddressModal.tsx b/resources/scripts/components/admin/nodes/addresses/DeleteAddressModal.tsx index 53505be497e..58a4c60238e 100644 --- a/resources/scripts/components/admin/nodes/addresses/DeleteAddressModal.tsx +++ b/resources/scripts/components/admin/nodes/addresses/DeleteAddressModal.tsx @@ -10,6 +10,7 @@ import { Address } from '@/api/server/getServer' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import Modal from '@/components/elements/Modal' + interface Props { open: boolean onClose: () => void @@ -83,4 +84,4 @@ const DeleteAddressModal = ({ open, onClose, address }: Props) => { ) } -export default DeleteAddressModal +export default DeleteAddressModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/addresses/EditAddressModal.tsx b/resources/scripts/components/admin/nodes/addresses/EditAddressModal.tsx index 50013c7c5a3..0d734d2f067 100644 --- a/resources/scripts/components/admin/nodes/addresses/EditAddressModal.tsx +++ b/resources/scripts/components/admin/nodes/addresses/EditAddressModal.tsx @@ -17,6 +17,7 @@ import Radio from '@/components/elements/inputs/Radio' import ServersSelectFormik from '@/components/admin/nodes/addresses/ServersSelectFormik' + interface Props { open: boolean onClose: () => void @@ -161,4 +162,4 @@ const EditAddressModal = ({ open, onClose, address }: Props) => { ) } -export default EditAddressModal +export default EditAddressModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/addresses/NodeAddressesContainer.tsx b/resources/scripts/components/admin/nodes/addresses/NodeAddressesContainer.tsx index fbd755982c2..0b248bb4e9b 100644 --- a/resources/scripts/components/admin/nodes/addresses/NodeAddressesContainer.tsx +++ b/resources/scripts/components/admin/nodes/addresses/NodeAddressesContainer.tsx @@ -20,6 +20,7 @@ import NodeContentBlock from '@/components/admin/nodes/NodeContentBlock' import DeleteAddressModal from '@/components/admin/nodes/addresses/DeleteAddressModal' import EditAddressModal from '@/components/admin/nodes/addresses/EditAddressModal' + const columns: ColumnArray
= [ { accessor: 'address', @@ -127,4 +128,4 @@ const NodeAddressesContainer = () => { ) } -export default NodeAddressesContainer +export default NodeAddressesContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/addresses/ServersSelectFormik.tsx b/resources/scripts/components/admin/nodes/addresses/ServersSelectFormik.tsx index 13e1c069d31..92ada61d08f 100644 --- a/resources/scripts/components/admin/nodes/addresses/ServersSelectFormik.tsx +++ b/resources/scripts/components/admin/nodes/addresses/ServersSelectFormik.tsx @@ -8,6 +8,7 @@ import useServersSWR from '@/api/admin/servers/useServersSWR' import DescriptiveItemComponent from '@/components/elements/DescriptiveItemComponent' import SelectFormik from '@/components/elements/formik/SelectFormik' + const ServersSelectFormik = () => { const [{ value }] = useField('serverId') const [query, setQuery] = useState(value as string) @@ -49,4 +50,4 @@ const ServersSelectFormik = () => { ) } -export default ServersSelectFormik +export default ServersSelectFormik \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/isos/CreateIsoModal.tsx b/resources/scripts/components/admin/nodes/isos/CreateIsoModal.tsx index cea5a04f215..b57691433b2 100644 --- a/resources/scripts/components/admin/nodes/isos/CreateIsoModal.tsx +++ b/resources/scripts/components/admin/nodes/isos/CreateIsoModal.tsx @@ -18,6 +18,7 @@ import TextInputForm from '@/components/elements/forms/TextInputForm' import QueryFileButton from '@/components/admin/nodes/isos/QueryFileButton' + interface Props { open: boolean onClose: () => void @@ -280,4 +281,4 @@ const CreateIsoModal = ({ open, onClose, mutate }: Props) => { ) } -export default CreateIsoModal +export default CreateIsoModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/isos/EditIsoModal.tsx b/resources/scripts/components/admin/nodes/isos/EditIsoModal.tsx index 2aeca28e2e3..3bd0d80d9f3 100644 --- a/resources/scripts/components/admin/nodes/isos/EditIsoModal.tsx +++ b/resources/scripts/components/admin/nodes/isos/EditIsoModal.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import useFlash from '@/util/useFlash' import { FormikProvider, useFormik } from 'formik' import * as yup from 'yup' @@ -13,6 +12,7 @@ import Modal from '@/components/elements/Modal' import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import TextInputFormik from '@/components/elements/formik/TextInputFormik' + interface Props { open: boolean onClose: () => void @@ -102,4 +102,4 @@ const EditIsoModal = ({ open, onClose, iso }: Props) => { ) } -export default EditIsoModal +export default EditIsoModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/isos/IsosContainer.tsx b/resources/scripts/components/admin/nodes/isos/IsosContainer.tsx index 5706cd251d0..b21d8cb6db0 100644 --- a/resources/scripts/components/admin/nodes/isos/IsosContainer.tsx +++ b/resources/scripts/components/admin/nodes/isos/IsosContainer.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { bytesToString } from '@/util/helpers' import usePagination from '@/util/usePagination' import { @@ -29,6 +28,7 @@ import NodeContentBlock from '@/components/admin/nodes/NodeContentBlock' import CreateIsoModal from '@/components/admin/nodes/isos/CreateIsoModal' import EditIsoModal from '@/components/admin/nodes/isos/EditIsoModal' + const columns: ColumnArray = [ { accessor: 'name', @@ -155,4 +155,4 @@ const IsosContainer = () => { ) } -export default IsosContainer +export default IsosContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/isos/QueryFileButton.tsx b/resources/scripts/components/admin/nodes/isos/QueryFileButton.tsx index ed15c556509..2ed7bcef019 100644 --- a/resources/scripts/components/admin/nodes/isos/QueryFileButton.tsx +++ b/resources/scripts/components/admin/nodes/isos/QueryFileButton.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { useState } from 'react' import { useFormContext } from 'react-hook-form' import { useTranslation } from 'react-i18next' @@ -8,6 +7,7 @@ import queryRemoteFile from '@/api/admin/tools/queryRemoteFile' import Button from '@/components/elements/Button' + const QueryFileButton = () => { const { getValues, setError, setValue } = useFormContext() const { data: node } = useNodeSWR() @@ -45,4 +45,4 @@ const QueryFileButton = () => { ) } -export default QueryFileButton +export default QueryFileButton \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/overview/NodeDetailsBlock.tsx b/resources/scripts/components/admin/nodes/overview/NodeDetailsBlock.tsx index da00693cc1d..4a95d772421 100644 --- a/resources/scripts/components/admin/nodes/overview/NodeDetailsBlock.tsx +++ b/resources/scripts/components/admin/nodes/overview/NodeDetailsBlock.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { formatBytes } from '@/util/helpers' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' @@ -7,6 +6,7 @@ import useNodeSWR from '@/api/admin/nodes/useNodeSWR' import RingCard from '@/components/elements/displays/RingCard' + const NodeDetailsBlock = () => { const { data: node } = useNodeSWR() const { t } = useTranslation('admin.nodes.index') @@ -45,4 +45,4 @@ const NodeDetailsBlock = () => { ) } -export default NodeDetailsBlock +export default NodeDetailsBlock \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/overview/NodeOverviewContainer.tsx b/resources/scripts/components/admin/nodes/overview/NodeOverviewContainer.tsx index 848e4499cff..27197b51e8e 100644 --- a/resources/scripts/components/admin/nodes/overview/NodeOverviewContainer.tsx +++ b/resources/scripts/components/admin/nodes/overview/NodeOverviewContainer.tsx @@ -1,5 +1,3 @@ -import PageContentBlock from '@/components/elements/PageContentBlock' - import NodeContentBlock from '@/components/admin/nodes/NodeContentBlock' import NodeDetailsBlock from '@/components/admin/nodes/overview/NodeDetailsBlock' @@ -13,4 +11,4 @@ const NodeOverviewContainer = () => { ) } -export default NodeOverviewContainer +export default NodeOverviewContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/servers/NodeServersContainer.tsx b/resources/scripts/components/admin/nodes/servers/NodeServersContainer.tsx index 3741fd7f331..838d5639288 100644 --- a/resources/scripts/components/admin/nodes/servers/NodeServersContainer.tsx +++ b/resources/scripts/components/admin/nodes/servers/NodeServersContainer.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { useDebouncedValue } from '@mantine/hooks' import { useState } from 'react' @@ -9,6 +8,7 @@ import NodeContentBlock from '@/components/admin/nodes/NodeContentBlock' import CreateServerModal from '@/components/admin/servers/CreateServerModal' import ServersTable from '@/components/admin/servers/ServersTable' + const NodeServersContainer = () => { const [query, setQuery] = useState('') const [debouncedQuery] = useDebouncedValue(query, 200) @@ -35,4 +35,4 @@ const NodeServersContainer = () => { ) } -export default NodeServersContainer +export default NodeServersContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/GeneralContainer.tsx b/resources/scripts/components/admin/nodes/settings/GeneralContainer.tsx index 1a4bfe3500c..1f7f36dea64 100644 --- a/resources/scripts/components/admin/nodes/settings/GeneralContainer.tsx +++ b/resources/scripts/components/admin/nodes/settings/GeneralContainer.tsx @@ -12,4 +12,4 @@ const GeneralContainer = () => { ) } -export default GeneralContainer +export default GeneralContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/NodeSettingsContainer.tsx b/resources/scripts/components/admin/nodes/settings/NodeSettingsContainer.tsx index 55c9ebf7415..ac4c67b5e93 100644 --- a/resources/scripts/components/admin/nodes/settings/NodeSettingsContainer.tsx +++ b/resources/scripts/components/admin/nodes/settings/NodeSettingsContainer.tsx @@ -4,6 +4,7 @@ import SettingsLayout from '@/components/elements/layouts/SettingsLayout' import NodeContentBlock from '@/components/admin/nodes/NodeContentBlock' + const NodeSettingsContainer = () => { const { t: tStrings } = useTranslation('strings') @@ -27,4 +28,4 @@ const NodeSettingsContainer = () => { ) } -export default NodeSettingsContainer +export default NodeSettingsContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/partials/general/CotermCard.tsx b/resources/scripts/components/admin/nodes/settings/partials/general/CotermCard.tsx index 988dff590eb..3ab484525f0 100644 --- a/resources/scripts/components/admin/nodes/settings/partials/general/CotermCard.tsx +++ b/resources/scripts/components/admin/nodes/settings/partials/general/CotermCard.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { useFlashKey } from '@/util/useFlash' import { hostname, port } from '@/util/validation' import { zodResolver } from '@hookform/resolvers/zod' @@ -16,11 +15,11 @@ import FormCard from '@/components/elements/FormCard' import CheckboxForm from '@/components/elements/forms/CheckboxForm' import SwitchForm from '@/components/elements/forms/SwitchForm' import TextInputForm from '@/components/elements/forms/TextInputForm' -import Switch from '@/components/elements/inputs/Switch' import CotermResetModal from '@/components/admin/nodes/settings/partials/general/CotermResetModal' import CotermTokenModal from '@/components/admin/nodes/settings/partials/general/CotermTokenModal' + const CotermCard = () => { const { data: node, mutate } = useNodeSWR() const { clearFlashes, clearAndAddHttpError } = useFlashKey( @@ -188,4 +187,4 @@ const CotermCard = () => { ) } -export default CotermCard +export default CotermCard \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/partials/general/CotermResetModal.tsx b/resources/scripts/components/admin/nodes/settings/partials/general/CotermResetModal.tsx index 084cd96546a..ad112f34d41 100644 --- a/resources/scripts/components/admin/nodes/settings/partials/general/CotermResetModal.tsx +++ b/resources/scripts/components/admin/nodes/settings/partials/general/CotermResetModal.tsx @@ -1,5 +1,4 @@ import { useFlashKey } from '@/util/useFlash' -import { Code } from '@mantine/core' import { useState } from 'react' import { useTranslation } from 'react-i18next' @@ -8,6 +7,7 @@ import resetCotermToken from '@/api/admin/nodes/settings/resetCotermToken' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import Modal from '@/components/elements/Modal' + interface Props { nodeId: number open: boolean @@ -61,4 +61,4 @@ const CotermResetModal = ({ nodeId, open, onReset, onClose }: Props) => { ) } -export default CotermResetModal +export default CotermResetModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/partials/general/CotermTokenModal.tsx b/resources/scripts/components/admin/nodes/settings/partials/general/CotermTokenModal.tsx index 9d7574a1b3e..98617d814d2 100644 --- a/resources/scripts/components/admin/nodes/settings/partials/general/CotermTokenModal.tsx +++ b/resources/scripts/components/admin/nodes/settings/partials/general/CotermTokenModal.tsx @@ -35,4 +35,4 @@ const CotermTokenModal = ({ value, onClose }: Props) => { ) } -export default CotermTokenModal +export default CotermTokenModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/partials/general/DeleteNodeCard.tsx b/resources/scripts/components/admin/nodes/settings/partials/general/DeleteNodeCard.tsx index 1556ce416dd..a2078d2f049 100644 --- a/resources/scripts/components/admin/nodes/settings/partials/general/DeleteNodeCard.tsx +++ b/resources/scripts/components/admin/nodes/settings/partials/general/DeleteNodeCard.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { useFlashKey } from '@/util/useFlash' import { useState } from 'react' import { useNavigate } from 'react-router-dom' @@ -9,9 +8,9 @@ import useNodeSWR from '@/api/admin/nodes/useNodeSWR' import Button from '@/components/elements/Button' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' -import FormSection from '@/components/elements/FormSection' import MessageBox from '@/components/elements/MessageBox' + const DeleteNodeCard = () => { const { data: node } = useNodeSWR() const { clearFlashes, clearAndAddHttpError } = useFlashKey( @@ -72,4 +71,4 @@ const DeleteNodeCard = () => { ) } -export default DeleteNodeCard +export default DeleteNodeCard \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/settings/partials/general/NodeInformationCard.tsx b/resources/scripts/components/admin/nodes/settings/partials/general/NodeInformationCard.tsx index fd65e6e2f4d..d76b9a7d8a2 100644 --- a/resources/scripts/components/admin/nodes/settings/partials/general/NodeInformationCard.tsx +++ b/resources/scripts/components/admin/nodes/settings/partials/general/NodeInformationCard.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { useFlashKey } from '@/util/useFlash' import { hostname } from '@/util/validation' import { zodResolver } from '@hookform/resolvers/zod' @@ -16,6 +15,7 @@ import TextInputForm from '@/components/elements/forms/TextInputForm' import LocationsSelectForm from '@/components/admin/nodes/LocationsSelectForm' + const NodeInformationCard = () => { const { data: node, mutate } = useNodeSWR() const { clearFlashes, clearAndAddHttpError } = useFlashKey( @@ -209,4 +209,4 @@ const NodeInformationCard = () => { ) } -export default NodeInformationCard +export default NodeInformationCard \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/templates/EditTemplateGroupModal.tsx b/resources/scripts/components/admin/nodes/templates/EditTemplateGroupModal.tsx index d47cad6be5e..52f3c82f10b 100644 --- a/resources/scripts/components/admin/nodes/templates/EditTemplateGroupModal.tsx +++ b/resources/scripts/components/admin/nodes/templates/EditTemplateGroupModal.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import useFlash from '@/util/useFlash' import { FormikProvider, useFormik } from 'formik' import * as yup from 'yup' @@ -14,6 +13,7 @@ import Modal from '@/components/elements/Modal' import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import TextInputFormik from '@/components/elements/formik/TextInputFormik' + interface Props { open: boolean onClose: () => void @@ -134,4 +134,4 @@ const EditTemplateGroupModal = ({ open, onClose, group }: Props) => { ) } -export default EditTemplateGroupModal +export default EditTemplateGroupModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/templates/EditTemplateModal.tsx b/resources/scripts/components/admin/nodes/templates/EditTemplateModal.tsx index c1c82ac4636..39a7e26b6b9 100644 --- a/resources/scripts/components/admin/nodes/templates/EditTemplateModal.tsx +++ b/resources/scripts/components/admin/nodes/templates/EditTemplateModal.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import useFlash from '@/util/useFlash' import { FormikProvider, useFormik } from 'formik' import * as yup from 'yup' @@ -17,6 +16,7 @@ import Modal from '@/components/elements/Modal' import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import TextInputFormik from '@/components/elements/formik/TextInputFormik' + interface Props { open: boolean onClose: () => void @@ -165,4 +165,4 @@ const EditTemplateModal = ({ open, onClose, template, group }: Props) => { ) } -export default EditTemplateModal +export default EditTemplateModal \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/templates/NodeTemplatesContainer.tsx b/resources/scripts/components/admin/nodes/templates/NodeTemplatesContainer.tsx index d44ddab34a2..fe9cdad9aea 100644 --- a/resources/scripts/components/admin/nodes/templates/NodeTemplatesContainer.tsx +++ b/resources/scripts/components/admin/nodes/templates/NodeTemplatesContainer.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import useFlash from '@/util/useFlash' import useNotify from '@/util/useNotify' import { @@ -8,14 +7,13 @@ import { DragStartEvent, KeyboardSensor, MouseSensor, - TouchSensor, useSensor, useSensors, } from '@dnd-kit/core' import { restrictToWindowEdges } from '@dnd-kit/modifiers' import { SortableContext, arrayMove } from '@dnd-kit/sortable' import { updateNotification } from '@mantine/notifications' -import { useEffect, useState } from 'react' +import { useState } from 'react' import { TemplateGroup } from '@/api/admin/nodes/templateGroups/getTemplateGroups' import reorderTemplateGroups from '@/api/admin/nodes/templateGroups/reorderTemplateGroups' @@ -24,11 +22,7 @@ import useNodeSWR from '@/api/admin/nodes/useNodeSWR' import { httpErrorToHuman } from '@/api/http' import Button from '@/components/elements/Button' -import Card from '@/components/elements/Card' import Spinner from '@/components/elements/Spinner' -import SortableItem, { - ChildrenPropsWithHandle, -} from '@/components/elements/dnd/SortableItem' import NodeContentBlock from '@/components/admin/nodes/NodeContentBlock' import EditTemplateGroupModal from '@/components/admin/nodes/templates/EditTemplateGroupModal' @@ -163,4 +157,4 @@ const NodeTemplatesContainer = () => { ) } -export default NodeTemplatesContainer +export default NodeTemplatesContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/templates/TemplateCard.tsx b/resources/scripts/components/admin/nodes/templates/TemplateCard.tsx index 018636ef504..89d46f1db59 100644 --- a/resources/scripts/components/admin/nodes/templates/TemplateCard.tsx +++ b/resources/scripts/components/admin/nodes/templates/TemplateCard.tsx @@ -1,4 +1,3 @@ -import { NodeContext } from '@/state/admin/node' import { classNames } from '@/util/helpers' import useFlash from '@/util/useFlash' import { EyeSlashIcon } from '@heroicons/react/20/solid' @@ -20,6 +19,7 @@ import SortableItem, { import EditTemplateModal from '@/components/admin/nodes/templates/EditTemplateModal' + interface Props { template: Template group?: TemplateGroup @@ -123,4 +123,4 @@ const TemplateCard = ({ template, group, className }: Props) => { ) } -export default TemplateCard +export default TemplateCard \ No newline at end of file diff --git a/resources/scripts/components/admin/nodes/templates/TemplateGroupCard.tsx b/resources/scripts/components/admin/nodes/templates/TemplateGroupCard.tsx index 07a3a89612c..1d4a93e4715 100644 --- a/resources/scripts/components/admin/nodes/templates/TemplateGroupCard.tsx +++ b/resources/scripts/components/admin/nodes/templates/TemplateGroupCard.tsx @@ -1,6 +1,5 @@ //@ts-ignore import Dots from '@/assets/images/icons/dots-vertical.svg' -import { NodeContext } from '@/state/admin/node' import { classNames } from '@/util/helpers' import useFlash from '@/util/useFlash' import useNotify from '@/util/useNotify' @@ -11,7 +10,6 @@ import { DragStartEvent, KeyboardSensor, MouseSensor, - TouchSensor, useSensor, useSensors, } from '@dnd-kit/core' @@ -274,4 +272,4 @@ const TemplateGroupCard = ({ group, className }: Props) => { ) } -export default TemplateGroupCard +export default TemplateGroupCard \ No newline at end of file diff --git a/resources/scripts/components/admin/overview/OverviewContainer.tsx b/resources/scripts/components/admin/overview/OverviewContainer.tsx index 08070b81fa4..655d0fbd08a 100644 --- a/resources/scripts/components/admin/overview/OverviewContainer.tsx +++ b/resources/scripts/components/admin/overview/OverviewContainer.tsx @@ -2,6 +2,7 @@ import { useStoreState } from '@/state' import PageContentBlock from '@/components/elements/PageContentBlock' + const OverviewContainer = () => { const version = useStoreState(state => state.settings.data!.version) return ( @@ -15,4 +16,4 @@ const OverviewContainer = () => { ) } -export default OverviewContainer +export default OverviewContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/AddressesMultiSelectForm.tsx b/resources/scripts/components/admin/servers/AddressesMultiSelectForm.tsx index 408920e5d8a..0ccd6230a8b 100644 --- a/resources/scripts/components/admin/servers/AddressesMultiSelectForm.tsx +++ b/resources/scripts/components/admin/servers/AddressesMultiSelectForm.tsx @@ -6,6 +6,7 @@ import useAddressesSWR from '@/api/admin/nodes/addresses/useAddressesSWR' import MultiSelectForm from '@/components/elements/forms/MultiSelectForm' + interface Props { disabled?: boolean nodeId?: number @@ -69,4 +70,4 @@ const AddressesMultiSelectForm = ({ disabled, nodeId: propNodeId }: Props) => { ) } -export default AddressesMultiSelectForm +export default AddressesMultiSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/CreateServerModal.tsx b/resources/scripts/components/admin/servers/CreateServerModal.tsx index 5fed7b992cd..f73d49d77d8 100644 --- a/resources/scripts/components/admin/servers/CreateServerModal.tsx +++ b/resources/scripts/components/admin/servers/CreateServerModal.tsx @@ -24,6 +24,7 @@ import NodesSelectForm from '@/components/admin/servers/NodesSelectForm' import TemplatesSelectForm from '@/components/admin/servers/TemplatesSelectForm' import UsersSelectForm from '@/components/admin/servers/UsersSelectForm' + interface Props { nodeId?: number userId?: number @@ -293,4 +294,4 @@ const CreateServerModal = ({ nodeId, userId, open, onClose }: Props) => { ) } -export default CreateServerModal +export default CreateServerModal \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/FixServerStatusButton.tsx b/resources/scripts/components/admin/servers/FixServerStatusButton.tsx index a16f5e6df1d..88a88868fb6 100644 --- a/resources/scripts/components/admin/servers/FixServerStatusButton.tsx +++ b/resources/scripts/components/admin/servers/FixServerStatusButton.tsx @@ -5,6 +5,7 @@ import updateServer from '@/api/admin/servers/updateServer' import Button from '@/components/elements/Button' + const FixServerStatusButton = () => { const [loading, setLoading] = useState(false) const server = AdminServerContext.useStoreState(state => state.server.data!) @@ -35,4 +36,4 @@ const FixServerStatusButton = () => { ) } -export default FixServerStatusButton +export default FixServerStatusButton \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/NodesSelectForm.tsx b/resources/scripts/components/admin/servers/NodesSelectForm.tsx index 9d48faa480e..a28821d7d27 100644 --- a/resources/scripts/components/admin/servers/NodesSelectForm.tsx +++ b/resources/scripts/components/admin/servers/NodesSelectForm.tsx @@ -6,6 +6,7 @@ import useNodesSWR from '@/api/admin/nodes/useNodesSWR' import SelectForm from '@/components/elements/forms/SelectForm' + interface Props { disabled?: boolean } @@ -41,4 +42,4 @@ const NodesSelectForm = ({ disabled }: Props) => { ) } -export default NodesSelectForm +export default NodesSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/ServerContentBlock.tsx b/resources/scripts/components/admin/servers/ServerContentBlock.tsx index ed081c8d9f3..d3e101fe77c 100644 --- a/resources/scripts/components/admin/servers/ServerContentBlock.tsx +++ b/resources/scripts/components/admin/servers/ServerContentBlock.tsx @@ -1,5 +1,4 @@ import { AdminServerContext } from '@/state/admin/server' -import { ServerContext } from '@/state/server' import PageContentBlock, { PageContentBlockProps, @@ -21,4 +20,4 @@ const ServerContentBlock: React.FC = ({ title, children, ...props }) => { ) } -export default ServerContentBlock +export default ServerContentBlock \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/ServersContainer.tsx b/resources/scripts/components/admin/servers/ServersContainer.tsx index 91ad9453f75..2ceb4e8ab97 100644 --- a/resources/scripts/components/admin/servers/ServersContainer.tsx +++ b/resources/scripts/components/admin/servers/ServersContainer.tsx @@ -8,6 +8,7 @@ import SearchBar from '@/components/admin/SearchBar' import CreateServerModal from '@/components/admin/servers/CreateServerModal' import ServersTable from '@/components/admin/servers/ServersTable' + const ServersContainer = () => { const [query, setQuery] = useState('') const [debouncedQuery] = useDebouncedValue(query, 200) @@ -31,4 +32,4 @@ const ServersContainer = () => { ) } -export default ServersContainer +export default ServersContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/ServersTable.tsx b/resources/scripts/components/admin/servers/ServersTable.tsx index be0eab51677..12ca0f1feb2 100644 --- a/resources/scripts/components/admin/servers/ServersTable.tsx +++ b/resources/scripts/components/admin/servers/ServersTable.tsx @@ -1,16 +1,15 @@ import usePagination from '@/util/usePagination' -import { useState } from 'react' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' import useServersSWR from '@/api/admin/servers/useServersSWR' import { ServerBuild } from '@/api/server/getServer' -import Button from '@/components/elements/Button' import Pagination from '@/components/elements/Pagination' import Spinner from '@/components/elements/Spinner' import Table, { ColumnArray } from '@/components/elements/displays/Table' + interface Props { query?: string className?: string @@ -78,4 +77,4 @@ const ServersTable = ({ query, className, nodeId, userId }: Props) => { ) } -export default ServersTable +export default ServersTable \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/TemplatesSelectForm.tsx b/resources/scripts/components/admin/servers/TemplatesSelectForm.tsx index 2d7860088bf..6f29deee4e1 100644 --- a/resources/scripts/components/admin/servers/TemplatesSelectForm.tsx +++ b/resources/scripts/components/admin/servers/TemplatesSelectForm.tsx @@ -1,13 +1,12 @@ -import { useField } from 'formik' import { useMemo, useState } from 'react' import { useFormContext } from 'react-hook-form' import useTemplateGroupsSWR from '@/api/admin/nodes/templateGroups/useTemplateGroupsSWR' -import SelectFormik from '@/components/elements/formik/SelectFormik' import SelectForm from '@/components/elements/forms/SelectForm' import Select from '@/components/elements/inputs/Select' + interface Props { disabled?: boolean } @@ -67,4 +66,4 @@ const TemplatesSelectForm = ({ disabled }: Props) => { ) } -export default TemplatesSelectForm +export default TemplatesSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/UsersSelectForm.tsx b/resources/scripts/components/admin/servers/UsersSelectForm.tsx index 43b90cc1978..b94d0507a08 100644 --- a/resources/scripts/components/admin/servers/UsersSelectForm.tsx +++ b/resources/scripts/components/admin/servers/UsersSelectForm.tsx @@ -1,14 +1,13 @@ import { useDebouncedValue } from '@mantine/hooks' -import { useField } from 'formik' -import { useCallback, useEffect, useMemo, useState } from 'react' +import { useMemo, useState } from 'react' import { useFormContext } from 'react-hook-form' import useUsersSWR from '@/api/admin/users/useUsersSWR' import DescriptiveItemComponent from '@/components/elements/DescriptiveItemComponent' -import SelectFormik from '@/components/elements/formik/SelectFormik' import SelectForm from '@/components/elements/forms/SelectForm' + const UsersSelectForm = () => { const { setValue, watch } = useFormContext() const userId: string = watch('userId') @@ -42,4 +41,4 @@ const UsersSelectForm = () => { ) } -export default UsersSelectForm +export default UsersSelectForm \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/overview/ServerOverviewContainer.tsx b/resources/scripts/components/admin/servers/overview/ServerOverviewContainer.tsx index 08f223a58fc..55430d3cd85 100644 --- a/resources/scripts/components/admin/servers/overview/ServerOverviewContainer.tsx +++ b/resources/scripts/components/admin/servers/overview/ServerOverviewContainer.tsx @@ -6,6 +6,7 @@ import Button from '@/components/elements/Button' import ServerContentBlock from '@/components/admin/servers/ServerContentBlock' + const ServerOverviewContainer = () => { const server = AdminServerContext.useStoreState(state => state.server.data!) @@ -23,4 +24,4 @@ const ServerOverviewContainer = () => { ) } -export default ServerOverviewContainer +export default ServerOverviewContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/GeneralContainer.tsx b/resources/scripts/components/admin/servers/settings/GeneralContainer.tsx index 0db88c8e900..e6c840581a2 100644 --- a/resources/scripts/components/admin/servers/settings/GeneralContainer.tsx +++ b/resources/scripts/components/admin/servers/settings/GeneralContainer.tsx @@ -12,4 +12,4 @@ const GeneralContainer = () => { ) } -export default GeneralContainer +export default GeneralContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/ServerHardwareContainer.tsx b/resources/scripts/components/admin/servers/settings/ServerHardwareContainer.tsx index d77505ccb01..2e5b7afce74 100644 --- a/resources/scripts/components/admin/servers/settings/ServerHardwareContainer.tsx +++ b/resources/scripts/components/admin/servers/settings/ServerHardwareContainer.tsx @@ -8,4 +8,4 @@ const ServerHardwareContainer = () => { ) } -export default ServerHardwareContainer +export default ServerHardwareContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/ServerSettingsContainer.tsx b/resources/scripts/components/admin/servers/settings/ServerSettingsContainer.tsx index ecbf83ab6aa..f623f3d2bb6 100644 --- a/resources/scripts/components/admin/servers/settings/ServerSettingsContainer.tsx +++ b/resources/scripts/components/admin/servers/settings/ServerSettingsContainer.tsx @@ -4,6 +4,7 @@ import SettingsLayout from '@/components/elements/layouts/SettingsLayout' import ServerContentBlock from '@/components/admin/servers/ServerContentBlock' + const ServerSettingsContainer = () => { const { t: tStrings } = useTranslation('strings') @@ -31,4 +32,4 @@ const ServerSettingsContainer = () => { ) } -export default ServerSettingsContainer +export default ServerSettingsContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/partials/general/DeleteServerCard.tsx b/resources/scripts/components/admin/servers/settings/partials/general/DeleteServerCard.tsx index 419ba1da139..0dfc6125a96 100644 --- a/resources/scripts/components/admin/servers/settings/partials/general/DeleteServerCard.tsx +++ b/resources/scripts/components/admin/servers/settings/partials/general/DeleteServerCard.tsx @@ -1,7 +1,6 @@ import { AdminServerContext } from '@/state/admin/server' import { useFlashKey } from '@/util/useFlash' import { zodResolver } from '@hookform/resolvers/zod' -import { FormikProvider, useFormik } from 'formik' import { FormEvent, useState } from 'react' import { FormProvider, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' @@ -14,9 +13,9 @@ import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' import MessageBox from '@/components/elements/MessageBox' import Modal from '@/components/elements/Modal' -import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import CheckboxForm from '@/components/elements/forms/CheckboxForm' + const DeleteServerCard = () => { const server = AdminServerContext.useStoreState(state => state.server.data!) const setServer = AdminServerContext.useStoreActions( @@ -145,4 +144,4 @@ const DeleteServerCard = () => { ) } -export default DeleteServerCard +export default DeleteServerCard \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/partials/general/ServerInformationCard.tsx b/resources/scripts/components/admin/servers/settings/partials/general/ServerInformationCard.tsx index 3485385848e..df2a4ef4602 100644 --- a/resources/scripts/components/admin/servers/settings/partials/general/ServerInformationCard.tsx +++ b/resources/scripts/components/admin/servers/settings/partials/general/ServerInformationCard.tsx @@ -19,6 +19,7 @@ import TextInputForm from '@/components/elements/forms/TextInputForm' import NodesSelectForm from '@/components/admin/servers/NodesSelectForm' import UsersSelectForm from '@/components/admin/servers/UsersSelectForm' + const ServerInformationCard = () => { const server = AdminServerContext.useStoreState(state => state.server.data!) const setServer = AdminServerContext.useStoreActions( @@ -146,4 +147,4 @@ const ServerInformationCard = () => { ) } -export default ServerInformationCard +export default ServerInformationCard \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/partials/general/ServerSuspensionCard.tsx b/resources/scripts/components/admin/servers/settings/partials/general/ServerSuspensionCard.tsx index 94e9433c579..814accaac00 100644 --- a/resources/scripts/components/admin/servers/settings/partials/general/ServerSuspensionCard.tsx +++ b/resources/scripts/components/admin/servers/settings/partials/general/ServerSuspensionCard.tsx @@ -11,6 +11,7 @@ import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' import MessageBox from '@/components/elements/MessageBox' + const ServerSuspensionCard = () => { const server = AdminServerContext.useStoreState(state => state.server.data!) const setServer = AdminServerContext.useStoreActions( @@ -87,4 +88,4 @@ const ServerSuspensionCard = () => { ) } -export default ServerSuspensionCard +export default ServerSuspensionCard \ No newline at end of file diff --git a/resources/scripts/components/admin/servers/settings/partials/hardware/ServerBuildSettingsCard.tsx b/resources/scripts/components/admin/servers/settings/partials/hardware/ServerBuildSettingsCard.tsx index 8efea532757..c30e74c743d 100644 --- a/resources/scripts/components/admin/servers/settings/partials/hardware/ServerBuildSettingsCard.tsx +++ b/resources/scripts/components/admin/servers/settings/partials/hardware/ServerBuildSettingsCard.tsx @@ -1,33 +1,19 @@ import { AdminServerContext } from '@/state/admin/server' import { useFlashKey } from '@/util/useFlash' -import { - englishKeyboardCharacters, - hostname, - password, -} from '@/util/validation' import { zodResolver } from '@hookform/resolvers/zod' -import { FormikProvider, useFormik } from 'formik' -import { useMemo } from 'react' import { FormProvider, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' -import * as yup from 'yup' import { z } from 'zod' import updateBuild from '@/api/admin/servers/updateBuild' -import updateServer from '@/api/admin/servers/updateServer' -import { EloquentStatus } from '@/api/server/types' import Button from '@/components/elements/Button' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' -import FormSection from '@/components/elements/FormSection' -import SelectFormik from '@/components/elements/formik/SelectFormik' -import TextInputFormik from '@/components/elements/formik/TextInputFormik' import TextInputForm from '@/components/elements/forms/TextInputForm' import AddressesMultiSelectForm from '@/components/admin/servers/AddressesMultiSelectForm' -import NodesSelectForm from '@/components/admin/servers/NodesSelectForm' -import UsersSelectForm from '@/components/admin/servers/UsersSelectForm' + const ServerBuildSettingsCard = () => { const server = AdminServerContext.useStoreState(state => state.server.data!) @@ -186,4 +172,4 @@ const ServerBuildSettingsCard = () => { ) } -export default ServerBuildSettingsCard +export default ServerBuildSettingsCard \ No newline at end of file diff --git a/resources/scripts/components/admin/tokens/CreateTokenButton.tsx b/resources/scripts/components/admin/tokens/CreateTokenButton.tsx index f7d7bbc68ca..cd883a8bd2c 100644 --- a/resources/scripts/components/admin/tokens/CreateTokenButton.tsx +++ b/resources/scripts/components/admin/tokens/CreateTokenButton.tsx @@ -7,19 +7,15 @@ import * as yup from 'yup' import createToken from '@/api/admin/tokens/createToken' import { Token, TokenResponse } from '@/api/admin/tokens/getTokens' import useTokensSWR from '@/api/admin/tokens/useTokensSWR' -import createUser from '@/api/admin/users/createUser' -import { UserResponse } from '@/api/admin/users/getUsers' -import useUsersSWR from '@/api/admin/users/useUsersSWR' import Button from '@/components/elements/Button' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' -import MessageBox from '@/components/elements/MessageBox' import Modal from '@/components/elements/Modal' -import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import TextInputFormik from '@/components/elements/formik/TextInputFormik' import PlainTextTokenModal from '@/components/admin/tokens/PlainTextTokenModal' + const CreateTokenButton = () => { const [open, setOpen] = useState(false) const [page] = usePagination() @@ -106,4 +102,4 @@ const CreateTokenButton = () => { ) } -export default CreateTokenButton +export default CreateTokenButton \ No newline at end of file diff --git a/resources/scripts/components/admin/tokens/PlainTextTokenModal.tsx b/resources/scripts/components/admin/tokens/PlainTextTokenModal.tsx index 2bdc1e2f39d..48812cd9c95 100644 --- a/resources/scripts/components/admin/tokens/PlainTextTokenModal.tsx +++ b/resources/scripts/components/admin/tokens/PlainTextTokenModal.tsx @@ -1,11 +1,9 @@ import { Code } from '@mantine/core' -import { FormikProvider } from 'formik' import { Token } from '@/api/admin/tokens/getTokens' -import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import Modal from '@/components/elements/Modal' -import TextInputFormik from '@/components/elements/formik/TextInputFormik' + interface Props { value: Token | null @@ -37,4 +35,4 @@ const PlainTextTokenModal = ({ value, onClose }: Props) => { ) } -export default PlainTextTokenModal +export default PlainTextTokenModal \ No newline at end of file diff --git a/resources/scripts/components/admin/tokens/TokensContainer.tsx b/resources/scripts/components/admin/tokens/TokensContainer.tsx index 2a4655bcbbf..1f053c0666b 100644 --- a/resources/scripts/components/admin/tokens/TokensContainer.tsx +++ b/resources/scripts/components/admin/tokens/TokensContainer.tsx @@ -1,12 +1,9 @@ -import useFlash, { useFlashKey } from '@/util/useFlash' +import { useFlashKey } from '@/util/useFlash' import usePagination from '@/util/usePagination' -import { Code } from '@mantine/core' import { formatDistanceToNow } from 'date-fns' import { useState } from 'react' import { Link } from 'react-router-dom' -import deleteNode from '@/api/admin/nodes/deleteNode' -import { Node, NodeResponse } from '@/api/admin/nodes/getNodes' import deleteToken from '@/api/admin/tokens/deleteToken' import { Token } from '@/api/admin/tokens/getTokens' import useTokensSWR from '@/api/admin/tokens/useTokensSWR' @@ -24,6 +21,7 @@ import Table, { import CreateTokenButton from '@/components/admin/tokens/CreateTokenButton' + const columns: ColumnArray = [ { accessor: 'name', @@ -137,4 +135,4 @@ const TokensContainer = () => { ) } -export default TokensContainer +export default TokensContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/users/CreateUserModal.tsx b/resources/scripts/components/admin/users/CreateUserModal.tsx index 133b2a30878..ee5e04220aa 100644 --- a/resources/scripts/components/admin/users/CreateUserModal.tsx +++ b/resources/scripts/components/admin/users/CreateUserModal.tsx @@ -1,22 +1,19 @@ import { useFlashKey } from '@/util/useFlash' import usePagination from '@/util/usePagination' -import { PlusIcon } from '@heroicons/react/20/solid' import { FormikProvider, useFormik } from 'formik' -import { useState } from 'react' import * as yup from 'yup' -import { ServerResponse } from '@/api/admin/servers/getServers' import createUser from '@/api/admin/users/createUser' import { UserResponse } from '@/api/admin/users/getUsers' import useUsersSWR from '@/api/admin/users/useUsersSWR' -import Button from '@/components/elements/Button' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import MessageBox from '@/components/elements/MessageBox' import Modal from '@/components/elements/Modal' import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import TextInputFormik from '@/components/elements/formik/TextInputFormik' + interface Props { open: boolean onClose: () => void @@ -131,4 +128,4 @@ const CreateUserButton = ({ open, onClose }: Props) => { ) } -export default CreateUserButton +export default CreateUserButton \ No newline at end of file diff --git a/resources/scripts/components/admin/users/UserContentBlock.tsx b/resources/scripts/components/admin/users/UserContentBlock.tsx index 81091cc290d..868d8a104e7 100644 --- a/resources/scripts/components/admin/users/UserContentBlock.tsx +++ b/resources/scripts/components/admin/users/UserContentBlock.tsx @@ -18,4 +18,4 @@ const UserContentBlock: React.FC = ({ title, children, ...props }) => { ) } -export default UserContentBlock +export default UserContentBlock \ No newline at end of file diff --git a/resources/scripts/components/admin/users/UsersContainer.tsx b/resources/scripts/components/admin/users/UsersContainer.tsx index fa4bd1c6b0c..98d677a353c 100644 --- a/resources/scripts/components/admin/users/UsersContainer.tsx +++ b/resources/scripts/components/admin/users/UsersContainer.tsx @@ -1,5 +1,5 @@ import usePagination from '@/util/usePagination' -import { CheckIcon, MagnifyingGlassIcon } from '@heroicons/react/20/solid' +import { CheckIcon } from '@heroicons/react/20/solid' import { useDebouncedValue } from '@mantine/hooks' import { useState } from 'react' import { Link } from 'react-router-dom' @@ -11,11 +11,11 @@ import PageContentBlock from '@/components/elements/PageContentBlock' import Pagination from '@/components/elements/Pagination' import Spinner from '@/components/elements/Spinner' import Table, { ColumnArray } from '@/components/elements/displays/Table' -import TextInput from '@/components/elements/inputs/TextInput' import SearchBar from '@/components/admin/SearchBar' import CreateUserModal from '@/components/admin/users/CreateUserModal' + const columns: ColumnArray = [ { accessor: 'name', @@ -94,4 +94,4 @@ const UsersContainer = () => { ) } -export default UsersContainer +export default UsersContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/users/servers/UserServersContainer.tsx b/resources/scripts/components/admin/users/servers/UserServersContainer.tsx index c188135c775..cfb020be797 100644 --- a/resources/scripts/components/admin/users/servers/UserServersContainer.tsx +++ b/resources/scripts/components/admin/users/servers/UserServersContainer.tsx @@ -8,6 +8,7 @@ import CreateServerModal from '@/components/admin/servers/CreateServerModal' import ServersTable from '@/components/admin/servers/ServersTable' import UserContentBlock from '@/components/admin/users/UserContentBlock' + const UserServersContainer = () => { const { data: user } = useUserSWR() const [open, setOpen] = useState(false) @@ -31,4 +32,4 @@ const UserServersContainer = () => { ) } -export default UserServersContainer +export default UserServersContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/users/settings/DeleteUserContainer.tsx b/resources/scripts/components/admin/users/settings/DeleteUserContainer.tsx index eb1922f4372..5339988ec12 100644 --- a/resources/scripts/components/admin/users/settings/DeleteUserContainer.tsx +++ b/resources/scripts/components/admin/users/settings/DeleteUserContainer.tsx @@ -10,6 +10,7 @@ import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' import MessageBox from '@/components/elements/MessageBox' + const DeleteUserContainer = () => { const { data: user } = useUserSWR() const [loading, setLoading] = useState(false) @@ -65,4 +66,4 @@ const DeleteUserContainer = () => { ) } -export default DeleteUserContainer +export default DeleteUserContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/users/settings/GeneralContainer.tsx b/resources/scripts/components/admin/users/settings/GeneralContainer.tsx index 7883e88df08..0b9a8a38836 100644 --- a/resources/scripts/components/admin/users/settings/GeneralContainer.tsx +++ b/resources/scripts/components/admin/users/settings/GeneralContainer.tsx @@ -10,4 +10,4 @@ const GeneralContainer = () => { ) } -export default GeneralContainer +export default GeneralContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/users/settings/UserInformationContainer.tsx b/resources/scripts/components/admin/users/settings/UserInformationContainer.tsx index a0a64f2aeb7..2ae651a5b15 100644 --- a/resources/scripts/components/admin/users/settings/UserInformationContainer.tsx +++ b/resources/scripts/components/admin/users/settings/UserInformationContainer.tsx @@ -11,6 +11,7 @@ import FormCard from '@/components/elements/FormCard' import CheckboxFormik from '@/components/elements/formik/CheckboxFormik' import TextInputFormik from '@/components/elements/formik/TextInputFormik' + const UserInformationContainer = () => { const { data: user, mutate } = useUserSWR() const { clearFlashes, clearAndAddHttpError } = useFlashKey( @@ -98,4 +99,4 @@ const UserInformationContainer = () => { ) } -export default UserInformationContainer +export default UserInformationContainer \ No newline at end of file diff --git a/resources/scripts/components/admin/users/settings/UserSettingsContainer.tsx b/resources/scripts/components/admin/users/settings/UserSettingsContainer.tsx index 3f340cc0b45..ffd070d70c7 100644 --- a/resources/scripts/components/admin/users/settings/UserSettingsContainer.tsx +++ b/resources/scripts/components/admin/users/settings/UserSettingsContainer.tsx @@ -1,8 +1,8 @@ import SettingsLayout from '@/components/elements/layouts/SettingsLayout' -import ServerContentBlock from '@/components/admin/servers/ServerContentBlock' import UserContentBlock from '@/components/admin/users/UserContentBlock' + const UserSettingsContainer = () => { return ( { ) } -export default UserSettingsContainer +export default UserSettingsContainer \ No newline at end of file diff --git a/resources/scripts/components/auth/LoginContainer.tsx b/resources/scripts/components/auth/LoginContainer.tsx index 999b32a7465..6f98f8b0415 100644 --- a/resources/scripts/components/auth/LoginContainer.tsx +++ b/resources/scripts/components/auth/LoginContainer.tsx @@ -5,7 +5,6 @@ import { FormProvider, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' import { useLocation } from 'react-router-dom' import { z } from 'zod' -import { zodI18nMap } from 'zod-i18n-map' import login from '@/api/auth/login' @@ -14,6 +13,7 @@ import TextInputForm from '@/components/elements/forms/TextInputForm' import LoginFormContainer from '@/components/auth/LoginFormContainer' + const LoginContainer = () => { const { t: tAuth } = useTranslation('auth') const { t: tStrings } = useTranslation('strings') @@ -85,4 +85,4 @@ const LoginContainer = () => { ) } -export default LoginContainer +export default LoginContainer \ No newline at end of file diff --git a/resources/scripts/components/auth/LoginFormContainer.tsx b/resources/scripts/components/auth/LoginFormContainer.tsx index bfbebbe30e7..4f6466a5bd0 100644 --- a/resources/scripts/components/auth/LoginFormContainer.tsx +++ b/resources/scripts/components/auth/LoginFormContainer.tsx @@ -58,4 +58,4 @@ const LoginFormContainer = ({ ) } -export default LoginFormContainer +export default LoginFormContainer \ No newline at end of file diff --git a/resources/scripts/components/dashboard/DashboardContainer.tsx b/resources/scripts/components/dashboard/DashboardContainer.tsx index be32b3c1852..be4ac2566aa 100644 --- a/resources/scripts/components/dashboard/DashboardContainer.tsx +++ b/resources/scripts/components/dashboard/DashboardContainer.tsx @@ -1,14 +1,4 @@ -import styled from '@emotion/styled' -import { Loader } from '@mantine/core' -import tw from 'twin.macro' - -import Button from '@/components/elements/Button' -import Logo from '@/components/elements/Logo' -import LogoOutline from '@/components/elements/LogoOutline' import PageContentBlock from '@/components/elements/PageContentBlock' -import Entity from '@/components/elements/displays/Entity' -import EntityField from '@/components/elements/displays/EntityField' -import EntityGroup from '@/components/elements/displays/EntityGroup' import ServersContainer from '@/components/dashboard/ServersContainer' diff --git a/resources/scripts/components/elements/Breadcrumbs.tsx b/resources/scripts/components/elements/Breadcrumbs.tsx index 72947bd462c..4effe61df4f 100644 --- a/resources/scripts/components/elements/Breadcrumbs.tsx +++ b/resources/scripts/components/elements/Breadcrumbs.tsx @@ -2,12 +2,10 @@ import { Handle } from '@/routers/router' import styled from '@emotion/styled' import { ChevronRightIcon } from '@heroicons/react/20/solid' import { - Anchor as MantineAnchor, - AnchorProps as MantineAnchorProps, Breadcrumbs as MantineBreadcrumbs, BreadcrumbsProps as MantineBreadcrumbsProps, } from '@mantine/core' -import { ComponentProps, FC } from 'react' +import { FC } from 'react' import { Link, LinkProps, useMatches } from 'react-router-dom' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/Button.tsx b/resources/scripts/components/elements/Button.tsx index b6e78ab64f2..9d4f3398b21 100644 --- a/resources/scripts/components/elements/Button.tsx +++ b/resources/scripts/components/elements/Button.tsx @@ -1,4 +1,3 @@ -import { css } from '@emotion/react' import styled from '@emotion/styled' import { ComponentProps, ElementType } from 'react' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/LoadingDots.tsx b/resources/scripts/components/elements/LoadingDots.tsx index e870cf1ca30..940f933232e 100644 --- a/resources/scripts/components/elements/LoadingDots.tsx +++ b/resources/scripts/components/elements/LoadingDots.tsx @@ -1,5 +1,4 @@ import { keyframes } from '@emotion/react' -import { css } from '@emotion/react' import styled from '@emotion/styled' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/Menu.tsx b/resources/scripts/components/elements/Menu.tsx index f5804fdc95d..d0e682acb11 100644 --- a/resources/scripts/components/elements/Menu.tsx +++ b/resources/scripts/components/elements/Menu.tsx @@ -1,10 +1,5 @@ import styled from '@emotion/styled' -import { - Menu as MantineMenu, - MenuDropdownProps, - MenuItemProps, - MenuProps, -} from '@mantine/core' +import { Menu as MantineMenu, MenuItemProps, MenuProps } from '@mantine/core' import { FC, MouseEventHandler } from 'react' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/Modal.tsx b/resources/scripts/components/elements/Modal.tsx index 30fab37e67b..5da9e090282 100644 --- a/resources/scripts/components/elements/Modal.tsx +++ b/resources/scripts/components/elements/Modal.tsx @@ -1,7 +1,6 @@ import styled from '@emotion/styled' -import { Dialog, Transition } from '@headlessui/react' -import React, { ComponentProps, useRef } from 'react' -import { Fragment, ReactNode } from 'react' +import { Dialog } from '@headlessui/react' +import React, { ComponentProps, ReactNode } from 'react' import tw from 'twin.macro' import Drawer from '@/components/elements/Drawer' diff --git a/resources/scripts/components/elements/Spinner.tsx b/resources/scripts/components/elements/Spinner.tsx index 86f5313c73a..5ead8c16636 100644 --- a/resources/scripts/components/elements/Spinner.tsx +++ b/resources/scripts/components/elements/Spinner.tsx @@ -1,5 +1,4 @@ import styled from '@emotion/styled' -import { Loader } from '@mantine/core' import { ReactNode, Suspense } from 'react' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/displays/Entity.tsx b/resources/scripts/components/elements/displays/Entity.tsx index fd7f43e58e9..7ecf1517ec4 100644 --- a/resources/scripts/components/elements/displays/Entity.tsx +++ b/resources/scripts/components/elements/displays/Entity.tsx @@ -5,7 +5,6 @@ import { ReactNode, cloneElement, createContext, - useMemo, } from 'react' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/dnd/SortableItem.tsx b/resources/scripts/components/elements/dnd/SortableItem.tsx index bc0c3e5e5c7..09b7b0c7172 100644 --- a/resources/scripts/components/elements/dnd/SortableItem.tsx +++ b/resources/scripts/components/elements/dnd/SortableItem.tsx @@ -2,7 +2,7 @@ import { Active, DraggableAttributes } from '@dnd-kit/core' import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities' import { useSortable } from '@dnd-kit/sortable' import { CSS } from '@dnd-kit/utilities' -import { ReactNode, useEffect } from 'react' +import { ReactNode } from 'react' type BaseProps = { id: string | number diff --git a/resources/scripts/components/elements/formik/MultiSelectFormik.tsx b/resources/scripts/components/elements/formik/MultiSelectFormik.tsx index fbe8d4749d6..64a4cd6cc9e 100644 --- a/resources/scripts/components/elements/formik/MultiSelectFormik.tsx +++ b/resources/scripts/components/elements/formik/MultiSelectFormik.tsx @@ -3,7 +3,6 @@ import { useField } from 'formik' import MultiSelect, { MultiSelectProps, } from '@/components/elements/inputs/MultiSelect' -import { SelectProps } from '@/components/elements/inputs/Select' interface Props extends Omit { name: string diff --git a/resources/scripts/components/elements/formik/RadioGroupFormik.tsx b/resources/scripts/components/elements/formik/RadioGroupFormik.tsx index aafaff171ab..9d61e31c43d 100644 --- a/resources/scripts/components/elements/formik/RadioGroupFormik.tsx +++ b/resources/scripts/components/elements/formik/RadioGroupFormik.tsx @@ -1,6 +1,5 @@ import { RadioGroupProps } from '@mantine/core' -import { FieldProps, Field as FormikField, useField } from 'formik' -import { forwardRef } from 'react' +import { useField } from 'formik' import Radio from '@/components/elements/inputs/Radio' diff --git a/resources/scripts/components/elements/forms/MultiSelectForm.tsx b/resources/scripts/components/elements/forms/MultiSelectForm.tsx index f8c98075e9f..93be4b3eb22 100644 --- a/resources/scripts/components/elements/forms/MultiSelectForm.tsx +++ b/resources/scripts/components/elements/forms/MultiSelectForm.tsx @@ -3,7 +3,6 @@ import { Control, ControllerRenderProps, useController } from 'react-hook-form' import MultiSelect, { MultiSelectProps, } from '@/components/elements/inputs/MultiSelect' -import { SelectProps } from '@/components/elements/inputs/Select' interface Props extends Omit { diff --git a/resources/scripts/components/elements/forms/SelectForm.tsx b/resources/scripts/components/elements/forms/SelectForm.tsx index 697c478d4ac..57db1aa8e3a 100644 --- a/resources/scripts/components/elements/forms/SelectForm.tsx +++ b/resources/scripts/components/elements/forms/SelectForm.tsx @@ -1,4 +1,3 @@ -import { TextInputProps } from '@mantine/core' import { Control, ControllerRenderProps, useController } from 'react-hook-form' import Select, { SelectProps } from '@/components/elements/inputs/Select' diff --git a/resources/scripts/components/elements/inputs/Select.tsx b/resources/scripts/components/elements/inputs/Select.tsx index c9842bcd2a5..4c5e8a49e01 100644 --- a/resources/scripts/components/elements/inputs/Select.tsx +++ b/resources/scripts/components/elements/inputs/Select.tsx @@ -1,11 +1,10 @@ -import { css } from '@emotion/react' import styled from '@emotion/styled' import { CheckIcon } from '@heroicons/react/20/solid' import { Select as MantineSelect, SelectProps as MantineSelectProps, } from '@mantine/core' -import { ComponentProps, ComponentPropsWithoutRef, forwardRef } from 'react' +import { ComponentPropsWithoutRef, forwardRef } from 'react' import tw from 'twin.macro' import ErrorMessage from '@/components/elements/ErrorMessage' diff --git a/resources/scripts/components/elements/inputs/TextInput.tsx b/resources/scripts/components/elements/inputs/TextInput.tsx index 8e5dea1243e..8d54c5175a7 100644 --- a/resources/scripts/components/elements/inputs/TextInput.tsx +++ b/resources/scripts/components/elements/inputs/TextInput.tsx @@ -1,6 +1,5 @@ import styled from '@emotion/styled' -import { TextInputProps } from '@mantine/core' -import { TextInput as MantineTextInput } from '@mantine/core' +import { TextInput as MantineTextInput, TextInputProps } from '@mantine/core' import { forwardRef } from 'react' import tw from 'twin.macro' diff --git a/resources/scripts/components/elements/inputs/Textarea.tsx b/resources/scripts/components/elements/inputs/Textarea.tsx index 01ecd2e67fa..3e41cad5bf0 100644 --- a/resources/scripts/components/elements/inputs/Textarea.tsx +++ b/resources/scripts/components/elements/inputs/Textarea.tsx @@ -1,16 +1,9 @@ import styled from '@emotion/styled' -import { ExclamationCircleIcon } from '@heroicons/react/24/outline' import { Textarea as MantineTextarea, TextareaProps as MantineTextareaProps, } from '@mantine/core' -import { - ComponentProps, - FocusEvent, - forwardRef, - useEffect, - useState, -} from 'react' +import { forwardRef } from 'react' import tw from 'twin.macro' import ErrorMessage from '@/components/elements/ErrorMessage' diff --git a/resources/scripts/components/elements/layouts/SettingsLayout.tsx b/resources/scripts/components/elements/layouts/SettingsLayout.tsx index 0d063363e1d..4594ea1d35e 100644 --- a/resources/scripts/components/elements/layouts/SettingsLayout.tsx +++ b/resources/scripts/components/elements/layouts/SettingsLayout.tsx @@ -15,8 +15,6 @@ import tw from 'twin.macro' import { RouteDefinition } from '@/components/elements/navigation/NavigationBar' import VerticalNavTab from '@/components/elements/navigation/VerticalNavTab' -import ServerContentBlock from '@/components/servers/ServerContentBlock' - interface Props { indexPattern: string defaultUrl: string diff --git a/resources/scripts/components/elements/navigation/VerticalNavTab.tsx b/resources/scripts/components/elements/navigation/VerticalNavTab.tsx index 6bacc594695..f7d80250d6e 100644 --- a/resources/scripts/components/elements/navigation/VerticalNavTab.tsx +++ b/resources/scripts/components/elements/navigation/VerticalNavTab.tsx @@ -1,6 +1,5 @@ -import { css } from '@emotion/react' import styled from '@emotion/styled' -import { NavLink, NavLinkProps } from 'react-router-dom' +import { NavLink } from 'react-router-dom' import tw from 'twin.macro' const VerticalNavTab = styled(NavLink)` diff --git a/resources/scripts/components/servers/backups/BackupRow.tsx b/resources/scripts/components/servers/backups/BackupRow.tsx index 6a3bb8e68f5..00dedd16fc8 100644 --- a/resources/scripts/components/servers/backups/BackupRow.tsx +++ b/resources/scripts/components/servers/backups/BackupRow.tsx @@ -21,6 +21,7 @@ import Menu from '@/components/elements/Menu' import Modal from '@/components/elements/Modal' import Display from '@/components/elements/displays/DisplayRow' + interface Props { backup: Backup swr: { @@ -233,4 +234,4 @@ const BackupRow = ({ backup, swr: { mutate } }: Props) => { ) } -export default BackupRow +export default BackupRow \ No newline at end of file diff --git a/resources/scripts/components/servers/backups/BackupsContainer.tsx b/resources/scripts/components/servers/backups/BackupsContainer.tsx index 8753b0eb09f..ac5b616e2ad 100644 --- a/resources/scripts/components/servers/backups/BackupsContainer.tsx +++ b/resources/scripts/components/servers/backups/BackupsContainer.tsx @@ -2,7 +2,7 @@ import { ServerContext } from '@/state/server' import usePagination from '@/util/usePagination' import useSWR from 'swr' -import getBackups, { BackupResponse } from '@/api/server/backups/getBackups' +import getBackups from '@/api/server/backups/getBackups' import Pagination from '@/components/elements/Pagination' import Spinner from '@/components/elements/Spinner' diff --git a/resources/scripts/components/servers/overview/ServerDetailsBlock.tsx b/resources/scripts/components/servers/overview/ServerDetailsBlock.tsx index 0774b660886..a6fcd9598b7 100644 --- a/resources/scripts/components/servers/overview/ServerDetailsBlock.tsx +++ b/resources/scripts/components/servers/overview/ServerDetailsBlock.tsx @@ -1,11 +1,6 @@ import { ServerContext } from '@/state/server' import { useChartTickLabel } from '@/util/chart' -import { - Sizes, - capitalize, - convertTimeToSmallest, - formatBytes, -} from '@/util/helpers' +import { Sizes, convertTimeToSmallest, formatBytes } from '@/util/helpers' import useNotify from '@/util/useNotify' import styled from '@emotion/styled' import { Badge, RingProgress, Skeleton } from '@mantine/core' diff --git a/resources/scripts/components/servers/overview/ServerTerminalBlock.tsx b/resources/scripts/components/servers/overview/ServerTerminalBlock.tsx index 89fc2359257..fc0270d1b26 100644 --- a/resources/scripts/components/servers/overview/ServerTerminalBlock.tsx +++ b/resources/scripts/components/servers/overview/ServerTerminalBlock.tsx @@ -2,7 +2,6 @@ import { ServerContext } from '@/state/server' import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid' import { Button } from '@mantine/core' import { useTranslation } from 'react-i18next' -import { useNavigate } from 'react-router-dom' import Card from '@/components/elements/Card' diff --git a/resources/scripts/components/servers/settings/partials/hardware/BootOrderCard.tsx b/resources/scripts/components/servers/settings/partials/hardware/BootOrderCard.tsx index b5bf0ed55af..2d0402c0ecd 100644 --- a/resources/scripts/components/servers/settings/partials/hardware/BootOrderCard.tsx +++ b/resources/scripts/components/servers/settings/partials/hardware/BootOrderCard.tsx @@ -2,7 +2,7 @@ import DragVerticalIcon from '@/assets/images/icons/drag-vertical.svg' import { ServerContext } from '@/state/server' import { bytesToString } from '@/util/helpers' -import useFlash, { useFlashKey } from '@/util/useFlash' +import { useFlashKey } from '@/util/useFlash' import useNotify from '@/util/useNotify' import { DndContext, DragEndEvent } from '@dnd-kit/core' import { @@ -17,19 +17,15 @@ import { import { PlusIcon, XMarkIcon } from '@heroicons/react/20/solid' import { Badge } from '@mantine/core' import { updateNotification } from '@mantine/notifications' -import { ReactNode, useEffect, useMemo, useState } from 'react' -import { Trans, useTranslation } from 'react-i18next' -import useSWR from 'swr' +import { ReactNode } from 'react' +import { useTranslation } from 'react-i18next' import { httpErrorToHuman } from '@/api/http' -import getBootOrder, { - BootOrderSettings, -} from '@/api/server/settings/getBootOrder' +import { BootOrderSettings } from '@/api/server/settings/getBootOrder' import updateBootOrder from '@/api/server/settings/updateBootOrder' import useBootOrderSWR from '@/api/server/settings/useBootOrderSWR' import { Disk } from '@/api/server/useServerDetails' -import Button from '@/components/elements/Button' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' import MessageBox from '@/components/elements/MessageBox' diff --git a/resources/scripts/components/servers/settings/partials/hardware/IsoRow.tsx b/resources/scripts/components/servers/settings/partials/hardware/IsoRow.tsx index 2f69836020f..4b169b85ff3 100644 --- a/resources/scripts/components/servers/settings/partials/hardware/IsoRow.tsx +++ b/resources/scripts/components/servers/settings/partials/hardware/IsoRow.tsx @@ -1,6 +1,6 @@ import { ServerContext } from '@/state/server' import { bytesToString } from '@/util/helpers' -import useFlash, { useFlashKey } from '@/util/useFlash' +import { useFlashKey } from '@/util/useFlash' import { EyeSlashIcon } from '@heroicons/react/20/solid' import { useState } from 'react' import { useTranslation } from 'react-i18next' diff --git a/resources/scripts/components/servers/settings/partials/network/NameserversCard.tsx b/resources/scripts/components/servers/settings/partials/network/NameserversCard.tsx index 08dd2d0ac5b..f2913be69e8 100644 --- a/resources/scripts/components/servers/settings/partials/network/NameserversCard.tsx +++ b/resources/scripts/components/servers/settings/partials/network/NameserversCard.tsx @@ -1,15 +1,12 @@ import { ServerContext } from '@/state/server' -import useFlash, { useFlashKey } from '@/util/useFlash' -import useNotify from '@/util/useNotify' +import { useFlashKey } from '@/util/useFlash' import { ipAddress } from '@/util/validation' import { TrashIcon } from '@heroicons/react/20/solid' import { zodResolver } from '@hookform/resolvers/zod' -import { FieldArray, FormikProvider, useFormik } from 'formik' import { useEffect } from 'react' import { FormProvider, useFieldArray, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' import useSWR from 'swr' -import * as yup from 'yup' import { z } from 'zod' import getNetwork from '@/api/server/settings/getNetwork' @@ -18,7 +15,6 @@ import updateNetwork from '@/api/server/settings/updateNetwork' import Button from '@/components/elements/Button' import FlashMessageRender from '@/components/elements/FlashMessageRenderer' import FormCard from '@/components/elements/FormCard' -import TextInputFormik from '@/components/elements/formik/TextInputFormik' import TextInputForm from '@/components/elements/forms/TextInputForm' const NameserversCard = () => { diff --git a/resources/scripts/components/servers/terminal/ServerTerminalContainer.tsx b/resources/scripts/components/servers/terminal/ServerTerminalContainer.tsx index 8de1325bb23..871d788bb66 100644 --- a/resources/scripts/components/servers/terminal/ServerTerminalContainer.tsx +++ b/resources/scripts/components/servers/terminal/ServerTerminalContainer.tsx @@ -1,5 +1,5 @@ import { ServerContext } from '@/state/server' -import useFlash, { useFlashKey } from '@/util/useFlash' +import { useFlashKey } from '@/util/useFlash' import { Loader } from '@mantine/core' import { useEffect, useState } from 'react' import { useSearchParams } from 'react-router-dom' diff --git a/resources/scripts/globals.d.ts b/resources/scripts/globals.d.ts index d68ede095c8..e5a9064974d 100644 --- a/resources/scripts/globals.d.ts +++ b/resources/scripts/globals.d.ts @@ -1,4 +1,5 @@ import '@tanstack/react-table' +import { RowData } from '@tanstack/react-table' import { Alignment } from '@/components/elements/displays/Table' diff --git a/resources/scripts/lib/i18n.ts b/resources/scripts/lib/i18n.ts index e3bca9d5473..1910bfae60c 100644 --- a/resources/scripts/lib/i18n.ts +++ b/resources/scripts/lib/i18n.ts @@ -1,9 +1,10 @@ -import i18n from 'i18next' -import I18NextHttpBackend, { HttpBackendOptions } from 'i18next-http-backend' -import I18NextMultiloadBackendAdapter from 'i18next-multiload-backend-adapter' -import { initReactI18next } from 'react-i18next' -import { z } from 'zod' -import { makeZodI18nMap, zodI18nMap } from 'zod-i18n-map' +import i18n from 'i18next'; +import I18NextHttpBackend, { HttpBackendOptions } from 'i18next-http-backend'; +import I18NextMultiloadBackendAdapter from 'i18next-multiload-backend-adapter'; +import { initReactI18next } from 'react-i18next'; +import { z } from 'zod'; +import { zodI18nMap } from 'zod-i18n-map'; + // If we're using HMR use a unique hash per page reload so that we're always // doing cache busting. Otherwise just use the builder provided hash value in @@ -36,4 +37,4 @@ i18n.use(I18NextMultiloadBackendAdapter) i18n.loadNamespaces('zod') z.setErrorMap(zodI18nMap) -export default i18n +export default i18n \ No newline at end of file diff --git a/resources/scripts/lib/swr.ts b/resources/scripts/lib/swr.ts index 70f5d0c4cd1..04444ca0c11 100644 --- a/resources/scripts/lib/swr.ts +++ b/resources/scripts/lib/swr.ts @@ -1,6 +1,7 @@ -import { SWRResponse } from 'swr' +import { SWRResponse } from 'swr'; + // Makes the data property of the SWRResponse not undefined export type Optimistic = Omit & { data: NonNullable -} +} \ No newline at end of file diff --git a/resources/scripts/main.tsx b/resources/scripts/main.tsx index 05b0de0a27a..00b5c3b485a 100644 --- a/resources/scripts/main.tsx +++ b/resources/scripts/main.tsx @@ -1,10 +1,13 @@ -import '@/assets/css/preflight.css' -import '@/assets/css/tailwind.css' -import '@/lib/i18n' -import React from 'react' -import ReactDOM from 'react-dom/client' +import '@/assets/css/preflight.css'; +import '@/assets/css/tailwind.css'; +import '@/lib/i18n'; +import React from 'react'; +import ReactDOM from 'react-dom/client'; + + + +import App from '@/components/App'; -import App from '@/components/App' // do not remove the parentheses because they are what lazy-loads these imports import('@/util/registerCustomYupValidationRules') @@ -13,4 +16,4 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( -) +) \ No newline at end of file diff --git a/resources/scripts/routers/AdminDashboardRouter.tsx b/resources/scripts/routers/AdminDashboardRouter.tsx index a14530b9650..9d0d0622fba 100644 --- a/resources/scripts/routers/AdminDashboardRouter.tsx +++ b/resources/scripts/routers/AdminDashboardRouter.tsx @@ -7,12 +7,13 @@ import AuthenticatedRoutes from '@/routers/middleware/AuthenticatedRoutes' import { Route } from '@/routers/router' import { HomeIcon } from '@heroicons/react/20/solid' import { lazy, useContext, useEffect } from 'react' -import { Translation, useTranslation } from 'react-i18next' -import { Link, Outlet, RouteObject, useMatch } from 'react-router-dom' +import { useTranslation } from 'react-i18next' +import { Link, Outlet, useMatch } from 'react-router-dom' import ContentContainer from '@/components/elements/ContentContainer' import { NavigationBarContext } from '@/components/elements/navigation/NavigationBar' + export const routes: Route[] = [ { path: '/admin', @@ -136,4 +137,4 @@ const AdminDashboardRouter = () => { ) } -export default AdminDashboardRouter +export default AdminDashboardRouter \ No newline at end of file diff --git a/resources/scripts/routers/AdminIpamRouter.tsx b/resources/scripts/routers/AdminIpamRouter.tsx index 722230ab56a..d52c8e71e69 100644 --- a/resources/scripts/routers/AdminIpamRouter.tsx +++ b/resources/scripts/routers/AdminIpamRouter.tsx @@ -1,9 +1,8 @@ import { lazyLoad, query } from '@/routers/helpers' import { Route } from '@/routers/router' -import { HomeIcon } from '@heroicons/react/20/solid' import { lazy, useContext, useEffect } from 'react' import { Translation, useTranslation } from 'react-i18next' -import { Navigate, Outlet, RouteObject } from 'react-router-dom' +import { Navigate, Outlet } from 'react-router-dom' import getAddressPool from '@/api/admin/addressPools/getAddressPool' import getAddresses from '@/api/admin/addressPools/getAddresses' @@ -12,6 +11,7 @@ import { getKey as getAddressesKey } from '@/api/admin/addressPools/useAddresses import { NavigationBarContext } from '@/components/elements/navigation/NavigationBar' + export const routes: Route[] = [ { path: 'ipam', @@ -120,4 +120,4 @@ const AdminIpamRouter = () => { return } -export default AdminIpamRouter +export default AdminIpamRouter \ No newline at end of file diff --git a/resources/scripts/routers/AdminNodeRouter.tsx b/resources/scripts/routers/AdminNodeRouter.tsx index 23cb1395f90..08686ee5851 100644 --- a/resources/scripts/routers/AdminNodeRouter.tsx +++ b/resources/scripts/routers/AdminNodeRouter.tsx @@ -1,20 +1,18 @@ -import { AdminBanner } from '@/routers/AdminDashboardRouter' import { lazyLoad, query } from '@/routers/helpers' import { Route } from '@/routers/router' import { NodeContext } from '@/state/admin/node' import { lazy, useContext, useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Outlet, RouteObject, Routes, useMatch } from 'react-router-dom' +import { Outlet, useMatch } from 'react-router-dom' import getAddressPool from '@/api/admin/addressPools/getAddressPool' import { getKey as getPoolKey } from '@/api/admin/addressPools/useAddressPoolSWR' import { httpErrorToHuman } from '@/api/http' -import { ErrorMessage, NotFound } from '@/components/elements/ScreenBlock' +import { ErrorMessage } from '@/components/elements/ScreenBlock' import Spinner from '@/components/elements/Spinner' -import NavigationBar, { - NavigationBarContext, -} from '@/components/elements/navigation/NavigationBar' +import { NavigationBarContext } from '@/components/elements/navigation/NavigationBar' + export const routes: Route[] = [ { @@ -208,4 +206,4 @@ const AdminNodeRouter = () => { ) } -export default AdminNodeRouter +export default AdminNodeRouter \ No newline at end of file diff --git a/resources/scripts/routers/AdminServerRouter.tsx b/resources/scripts/routers/AdminServerRouter.tsx index 40825b17146..6f1acee9b64 100644 --- a/resources/scripts/routers/AdminServerRouter.tsx +++ b/resources/scripts/routers/AdminServerRouter.tsx @@ -1,11 +1,10 @@ import { lazyLoad } from '@/routers/helpers' import { Route } from '@/routers/router' import { AdminServerContext } from '@/state/admin/server' -import { ServerContext } from '@/state/server' import { ExclamationCircleIcon } from '@heroicons/react/24/outline' import { lazy, useContext, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Outlet, RouteObject, useMatch } from 'react-router-dom' +import { Outlet, useMatch } from 'react-router-dom' import { httpErrorToHuman } from '@/api/http' @@ -15,6 +14,7 @@ import { NavigationBarContext } from '@/components/elements/navigation/Navigatio import FixServerStatusButton from '@/components/admin/servers/FixServerStatusButton' + export const routes: Route[] = [ { path: 'servers', @@ -177,4 +177,4 @@ const AdminServerRouter = () => { ) } -export default AdminServerRouter +export default AdminServerRouter \ No newline at end of file diff --git a/resources/scripts/routers/AdminUserRouter.tsx b/resources/scripts/routers/AdminUserRouter.tsx index 5491f17eee3..b64b2d609ce 100644 --- a/resources/scripts/routers/AdminUserRouter.tsx +++ b/resources/scripts/routers/AdminUserRouter.tsx @@ -1,13 +1,14 @@ import { lazyLoad, query } from '@/routers/helpers' import { Route } from '@/routers/router' import { lazy, useContext, useEffect } from 'react' -import { Outlet, RouteObject } from 'react-router-dom' +import { Outlet } from 'react-router-dom' import getUser from '@/api/admin/users/getUser' import useUserSWR, { getKey } from '@/api/admin/users/useUserSWR' import { NavigationBarContext } from '@/components/elements/navigation/NavigationBar' + export const routes: Route[] = [ { path: 'users', @@ -97,4 +98,4 @@ const AdminUserRouter = () => { return } -export default AdminUserRouter +export default AdminUserRouter \ No newline at end of file diff --git a/resources/scripts/routers/DashboardRouter.tsx b/resources/scripts/routers/DashboardRouter.tsx index a76b2b559ee..a9c29ef75c0 100644 --- a/resources/scripts/routers/DashboardRouter.tsx +++ b/resources/scripts/routers/DashboardRouter.tsx @@ -4,12 +4,12 @@ import { lazyLoad } from '@/routers/helpers' import { Route } from '@/routers/router' import { lazy, useContext, useEffect } from 'react' import { useTranslation } from 'react-i18next' -import { RouteObject } from 'react-router-dom' import { NavigationBarContext } from '@/components/elements/navigation/NavigationBar' import DashboardContainer from '@/components/dashboard/DashboardContainer' + export const routes: Route[] = [ { index: true, @@ -42,4 +42,4 @@ const DashboardRouter = () => { ) } -export default DashboardRouter +export default DashboardRouter \ No newline at end of file diff --git a/resources/scripts/routers/ServerRouter.tsx b/resources/scripts/routers/ServerRouter.tsx index 103273a5cd5..f1a51f96e8a 100644 --- a/resources/scripts/routers/ServerRouter.tsx +++ b/resources/scripts/routers/ServerRouter.tsx @@ -8,7 +8,7 @@ import { } from '@heroicons/react/24/outline' import { lazy, useContext, useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Outlet, RouteObject, useMatches } from 'react-router-dom' +import { Outlet, useMatches } from 'react-router-dom' import { httpErrorToHuman } from '@/api/http' import { EloquentStatus } from '@/api/server/types' @@ -17,6 +17,7 @@ import ScreenBlock, { ErrorMessage } from '@/components/elements/ScreenBlock' import Spinner from '@/components/elements/Spinner' import { NavigationBarContext } from '@/components/elements/navigation/NavigationBar' + export const routes: Route[] = [ { element: ( @@ -258,4 +259,4 @@ const ServerRouter = () => { ) } -export default ServerRouter +export default ServerRouter \ No newline at end of file diff --git a/resources/scripts/routers/TransitionRouter.tsx b/resources/scripts/routers/TransitionRouter.tsx index ba05622ee24..404d0bf6a37 100644 --- a/resources/scripts/routers/TransitionRouter.tsx +++ b/resources/scripts/routers/TransitionRouter.tsx @@ -6,6 +6,7 @@ import tw from 'twin.macro' import Fade from '@/components/elements/Fade' + const StyledSwitchTransition = styled(SwitchTransition)` ${tw`relative`}; @@ -36,4 +37,4 @@ const TransitionRouter = ({ children }: Props) => { ) } -export default TransitionRouter +export default TransitionRouter \ No newline at end of file diff --git a/resources/scripts/routers/helpers.tsx b/resources/scripts/routers/helpers.tsx index e9cb40be925..8d2056ee423 100644 --- a/resources/scripts/routers/helpers.tsx +++ b/resources/scripts/routers/helpers.tsx @@ -1,11 +1,9 @@ import { LazyExoticComponent } from 'react' -import { MutatorOptions } from 'swr' -import { mutate } from 'swr' -import { BareFetcher } from 'swr' -import { Key } from 'swr' +import { BareFetcher, Key, MutatorOptions, mutate } from 'swr' import Spinner from '@/components/elements/Spinner' + export const lazyLoad = ( LazyElement: LazyExoticComponent<() => JSX.Element> ) => { @@ -26,4 +24,4 @@ export const query = async ( await mutate(key, data, options) return data -} +} \ No newline at end of file diff --git a/resources/scripts/routers/middleware/AuthenticatedRoutes.tsx b/resources/scripts/routers/middleware/AuthenticatedRoutes.tsx index 7fc379450e7..59b59619e18 100644 --- a/resources/scripts/routers/middleware/AuthenticatedRoutes.tsx +++ b/resources/scripts/routers/middleware/AuthenticatedRoutes.tsx @@ -24,4 +24,4 @@ const AuthenticatedRoutes: React.FC = ({ return children } -export default AuthenticatedRoutes +export default AuthenticatedRoutes \ No newline at end of file diff --git a/resources/scripts/routers/middleware/GuestRoutes.tsx b/resources/scripts/routers/middleware/GuestRoutes.tsx index 7f39ffc24e1..00023cb4f5f 100644 --- a/resources/scripts/routers/middleware/GuestRoutes.tsx +++ b/resources/scripts/routers/middleware/GuestRoutes.tsx @@ -16,4 +16,4 @@ const GuestRoutes: React.FC = ({ children }) => { return children } -export default GuestRoutes +export default GuestRoutes \ No newline at end of file diff --git a/resources/scripts/routers/router.tsx b/resources/scripts/routers/router.tsx index 3eac2c0e339..59cd595fc1e 100644 --- a/resources/scripts/routers/router.tsx +++ b/resources/scripts/routers/router.tsx @@ -3,15 +3,15 @@ import { routes as clientRoutes } from '@/routers/DashboardRouter' import { lazyLoad } from '@/routers/helpers' import AuthenticatedRoutes from '@/routers/middleware/AuthenticatedRoutes' import GuestRoutes from '@/routers/middleware/GuestRoutes' -import { FunctionComponent, LazyExoticComponent, ReactNode, lazy } from 'react' +import { ReactNode, lazy } from 'react' import { Outlet, RouteObject, createBrowserRouter } from 'react-router-dom' import { NotFound } from '@/components/elements/ScreenBlock' -import Spinner from '@/components/elements/Spinner' import NavigationBar from '@/components/elements/navigation/NavigationBar' import NavigationBarProvider from '@/components/NavigationBarProvider' + export type Route = { handle?: Handle children?: Route[] @@ -59,4 +59,4 @@ const router = createBrowserRouter([ }, ]) -export default router +export default router \ No newline at end of file diff --git a/resources/scripts/state/admin/node.ts b/resources/scripts/state/admin/node.ts index 75b0804b2e0..0cb08868d7d 100644 --- a/resources/scripts/state/admin/node.ts +++ b/resources/scripts/state/admin/node.ts @@ -4,6 +4,7 @@ import isEqual from 'react-fast-compare' import getNode from '@/api/admin/nodes/getNode' import { Node } from '@/api/admin/nodes/getNodes' + export interface NodeDataStore { data?: Node setNode: Action @@ -34,4 +35,4 @@ export const NodeContext = createContextStore({ clearNodeState: action(state => { state.node.data = undefined }), -}) +}) \ No newline at end of file diff --git a/resources/scripts/state/admin/server.ts b/resources/scripts/state/admin/server.ts index bbf9c16d2e9..92908b960ee 100644 --- a/resources/scripts/state/admin/server.ts +++ b/resources/scripts/state/admin/server.ts @@ -1,9 +1,8 @@ import { Action, Thunk, action, createContextStore, thunk } from 'easy-peasy' import isEqual from 'react-fast-compare' -import { AdminServerBuild } from '@/api/admin/servers/getServer' -import { getServer } from '@/api/admin/servers/getServer' -import getStatus, { ServerStateData } from '@/api/server/getState' +import { AdminServerBuild, getServer } from '@/api/admin/servers/getServer' + export interface ServerDataStore { data?: AdminServerBuild @@ -35,4 +34,4 @@ export const AdminServerContext = createContextStore({ clearServerState: action(state => { state.server.data = undefined }), -}) +}) \ No newline at end of file diff --git a/resources/scripts/state/flashes.ts b/resources/scripts/state/flashes.ts index 2539db6f549..22bdb1468a9 100644 --- a/resources/scripts/state/flashes.ts +++ b/resources/scripts/state/flashes.ts @@ -4,6 +4,7 @@ import { httpErrorToHuman } from '@/api/http' import { FlashMessageType } from '@/components/elements/MessageBox' + export interface FlashStore { items: FlashMessage[] addFlash: Action @@ -58,4 +59,4 @@ const flashes: FlashStore = { }), } -export default flashes +export default flashes \ No newline at end of file diff --git a/resources/scripts/state/index.ts b/resources/scripts/state/index.ts index b408acb012f..93d19d1d057 100644 --- a/resources/scripts/state/index.ts +++ b/resources/scripts/state/index.ts @@ -21,4 +21,4 @@ export const useStoreActions = typedHooks.useStoreActions export const useStoreDispatch = typedHooks.useStoreDispatch export const useStoreState = typedHooks.useStoreState -export const store = createStore(state) +export const store = createStore(state) \ No newline at end of file diff --git a/resources/scripts/state/server/index.ts b/resources/scripts/state/server/index.ts index 345311f1847..085b7d70ece 100644 --- a/resources/scripts/state/server/index.ts +++ b/resources/scripts/state/server/index.ts @@ -4,6 +4,7 @@ import isEqual from 'react-fast-compare' import getServer, { ServerBuild } from '@/api/server/getServer' import getStatus, { ServerStateData } from '@/api/server/getState' + export interface ServerDataStore { data?: ServerBuild setServer: Action @@ -58,4 +59,4 @@ export const ServerContext = createContextStore({ state.server.data = undefined state.status.data = undefined }), -}) +}) \ No newline at end of file diff --git a/resources/scripts/state/settings.ts b/resources/scripts/state/settings.ts index a95e8287947..a9ac5abb445 100644 --- a/resources/scripts/state/settings.ts +++ b/resources/scripts/state/settings.ts @@ -26,4 +26,4 @@ const settings: SettingsStore = { }), } -export default settings +export default settings \ No newline at end of file diff --git a/resources/scripts/state/user.ts b/resources/scripts/state/user.ts index 3a7e3e0d801..f31272b64d3 100644 --- a/resources/scripts/state/user.ts +++ b/resources/scripts/state/user.ts @@ -20,4 +20,4 @@ const user: UserStore = { }), } -export default user +export default user \ No newline at end of file diff --git a/resources/scripts/util/chart.ts b/resources/scripts/util/chart.ts index b80f915e4aa..0774dd12207 100644 --- a/resources/scripts/util/chart.ts +++ b/resources/scripts/util/chart.ts @@ -227,4 +227,4 @@ function useChartTickLabel( }) } -export { useChart, useChartTickLabel, getOptions, getEmptyData } +export { useChart, useChartTickLabel, getOptions, getEmptyData } \ No newline at end of file diff --git a/resources/scripts/util/helpers.ts b/resources/scripts/util/helpers.ts index c1f777d21d0..63c706bfa2d 100644 --- a/resources/scripts/util/helpers.ts +++ b/resources/scripts/util/helpers.ts @@ -1,7 +1,5 @@ import { Params } from 'react-router-dom' -import { AddressType } from '@/api/server/getServer' - export type WithRequired = T & { [P in K]-?: T[P] } export const randomInt = (low: number, high: number) => @@ -163,4 +161,4 @@ export const countIPsInRange = ( } catch { return 0 } -} +} \ No newline at end of file diff --git a/resources/scripts/util/registerCustomYupValidationRules.ts b/resources/scripts/util/registerCustomYupValidationRules.ts index 5e700f709ef..e5af99cea91 100644 --- a/resources/scripts/util/registerCustomYupValidationRules.ts +++ b/resources/scripts/util/registerCustomYupValidationRules.ts @@ -45,4 +45,4 @@ yup.addMethod(yup.string, 'hostname', function () { return hostnameRegex.test(value as string) }, }) -}) +}) \ No newline at end of file diff --git a/resources/scripts/util/useFlash.ts b/resources/scripts/util/useFlash.ts index d1f6a66894e..6d6f56d3564 100644 --- a/resources/scripts/util/useFlash.ts +++ b/resources/scripts/util/useFlash.ts @@ -26,4 +26,4 @@ const useFlashKey = (key: string): KeyedFlashStore => { } export { useFlashKey } -export default useFlash +export default useFlash \ No newline at end of file diff --git a/resources/scripts/util/useNotify.ts b/resources/scripts/util/useNotify.ts index afb75085495..b07efb54798 100644 --- a/resources/scripts/util/useNotify.ts +++ b/resources/scripts/util/useNotify.ts @@ -10,4 +10,4 @@ const useNotify = () => { }) } -export default useNotify +export default useNotify \ No newline at end of file diff --git a/resources/scripts/util/usePagination.ts b/resources/scripts/util/usePagination.ts index 2917c035836..efb6191db16 100644 --- a/resources/scripts/util/usePagination.ts +++ b/resources/scripts/util/usePagination.ts @@ -21,4 +21,4 @@ const usePagination = () => { return [page, setPage] as [number, Dispatch>] } -export default usePagination +export default usePagination \ No newline at end of file diff --git a/resources/scripts/util/usePersistedState.ts b/resources/scripts/util/usePersistedState.ts index fe4680cb40e..38fe9e03b42 100644 --- a/resources/scripts/util/usePersistedState.ts +++ b/resources/scripts/util/usePersistedState.ts @@ -21,4 +21,4 @@ export function usePersistedState
( }, [key, state]) return [state, setState] -} +} \ No newline at end of file diff --git a/resources/scripts/util/validation.ts b/resources/scripts/util/validation.ts index 7a902ac33ba..a1b7ac08c6a 100644 --- a/resources/scripts/util/validation.ts +++ b/resources/scripts/util/validation.ts @@ -56,4 +56,4 @@ export const port = (number?: ZodNumber) => (number ?? z.number()).int().min(1).max(65535) export const vmid = (number?: ZodNumber) => - (number ?? z.number()).int().min(100).max(999999999) + (number ?? z.number()).int().min(100).max(999999999) \ No newline at end of file diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index cc68301129c..9b7cfa6a511 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -2,8 +2,8 @@ namespace Tests; -use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Application; +use Illuminate\Contracts\Console\Kernel; trait CreatesApplication { diff --git a/tests/Feature/Controllers/Client/Servers/BackupControllerTest.php b/tests/Feature/Controllers/Client/Servers/BackupControllerTest.php index 1d281802aba..eb38b3143ed 100644 --- a/tests/Feature/Controllers/Client/Servers/BackupControllerTest.php +++ b/tests/Feature/Controllers/Client/Servers/BackupControllerTest.php @@ -1,10 +1,10 @@ Http::preventStrayRequests()); diff --git a/tests/Pest.php b/tests/Pest.php index 98dfb04231b..d2feadf74cc 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,9 +1,9 @@ Http::preventStrayRequests()); diff --git a/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php b/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php index 5f06f2f2734..fd06399542c 100644 --- a/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php +++ b/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php @@ -1,8 +1,8 @@ Http::preventStrayRequests());