Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop
This commit is contained in:
commit
9a57011071
|
@ -19,8 +19,8 @@ HASHIDS_SALT=
|
||||||
HASHIDS_LENGTH=8
|
HASHIDS_LENGTH=8
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_DRIVER=smtp
|
||||||
MAIL_HOST=mailtrap.io
|
MAIL_HOST=smtp.example.com
|
||||||
MAIL_PORT=2525
|
MAIL_PORT=25
|
||||||
MAIL_USERNAME=
|
MAIL_USERNAME=
|
||||||
MAIL_PASSWORD=
|
MAIL_PASSWORD=
|
||||||
MAIL_ENCRYPTION=tls
|
MAIL_ENCRYPTION=tls
|
||||||
|
|
|
@ -25,11 +25,13 @@ class Kernel extends ConsoleKernel
|
||||||
// Execute scheduled commands for servers every minute, as if there was a normal cron running.
|
// Execute scheduled commands for servers every minute, as if there was a normal cron running.
|
||||||
$schedule->command('p:schedule:process')->everyMinute()->withoutOverlapping();
|
$schedule->command('p:schedule:process')->everyMinute()->withoutOverlapping();
|
||||||
|
|
||||||
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be removed
|
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted.
|
||||||
// from the UI view for the server.
|
$pruneAge = config('backups.prune_age', 360); // Defaults to 6 hours (time is in minuteS)
|
||||||
$schedule->command('p:maintenance:prune-backups', [
|
if ($pruneAge > 0) {
|
||||||
'--since-minutes' => '30',
|
$schedule->command('p:maintenance:prune-backups', [
|
||||||
])->everyThirtyMinutes();
|
'--since-minutes' => $pruneAge,
|
||||||
|
])->everyThirtyMinutes();
|
||||||
|
}
|
||||||
|
|
||||||
// Every day cleanup any internal backups of service files.
|
// Every day cleanup any internal backups of service files.
|
||||||
$schedule->command('p:maintenance:clean-service-backups')->daily();
|
$schedule->command('p:maintenance:clean-service-backups')->daily();
|
||||||
|
|
|
@ -52,7 +52,7 @@ class BackupRemoteUploadController extends Controller
|
||||||
public function __invoke(Request $request, string $backup)
|
public function __invoke(Request $request, string $backup)
|
||||||
{
|
{
|
||||||
// Get the size query parameter.
|
// Get the size query parameter.
|
||||||
$size = (int)$request->query('size');
|
$size = (int) $request->query('size');
|
||||||
if (empty($size)) {
|
if (empty($size)) {
|
||||||
throw new BadRequestHttpException('A non-empty "size" query parameter must be provided.');
|
throw new BadRequestHttpException('A non-empty "size" query parameter must be provided.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Repositories\Wings;
|
namespace Pterodactyl\Repositories\Wings;
|
||||||
|
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
use Pterodactyl\Models\Backup;
|
use Pterodactyl\Models\Backup;
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
|
@ -48,7 +49,7 @@ class DaemonBackupRepository extends DaemonRepository
|
||||||
'json' => [
|
'json' => [
|
||||||
'adapter' => $this->adapter ?? config('backups.default'),
|
'adapter' => $this->adapter ?? config('backups.default'),
|
||||||
'uuid' => $backup->uuid,
|
'uuid' => $backup->uuid,
|
||||||
'ignored_files' => $backup->ignored_files,
|
'ignore' => implode('\n', $backup->ignored_files),
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -117,9 +117,9 @@ class InitiateBackupService
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the server has reached or exceeded it's backup limit
|
// Check if the server has reached or exceeded it's backup limit
|
||||||
if (!$server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
|
if (! $server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
|
||||||
// Do not allow the user to continue if this server is already at its limit and can't override.
|
// Do not allow the user to continue if this server is already at its limit and can't override.
|
||||||
if (!$override || $server->backup_limit <= 0) {
|
if (! $override || $server->backup_limit <= 0) {
|
||||||
throw new TooManyBackupsException($server->backup_limit);
|
throw new TooManyBackupsException($server->backup_limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,10 @@ return [
|
||||||
// uses to upload backups to S3 storage. Value is in minutes, so this would default to an hour.
|
// uses to upload backups to S3 storage. Value is in minutes, so this would default to an hour.
|
||||||
'presigned_url_lifespan' => env('BACKUP_PRESIGNED_URL_LIFESPAN', 60),
|
'presigned_url_lifespan' => env('BACKUP_PRESIGNED_URL_LIFESPAN', 60),
|
||||||
|
|
||||||
|
// The time to wait before automatically failing a backup, time is in minutes and defaults
|
||||||
|
// to 6 hours. To disable this feature, set the value to `0`.
|
||||||
|
'prune_age' => env('BACKUP_PRUNE_AGE', 360),
|
||||||
|
|
||||||
'disks' => [
|
'disks' => [
|
||||||
// There is no configuration for the local disk for Wings. That configuration
|
// There is no configuration for the local disk for Wings. That configuration
|
||||||
// is determined by the Daemon configuration, and not the Panel.
|
// is determined by the Daemon configuration, and not the Panel.
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"name": "Sponge Version",
|
"name": "Sponge Version",
|
||||||
"description": "The version of SpongeVanilla to download and use.",
|
"description": "The version of SpongeVanilla to download and use.",
|
||||||
"env_variable": "SPONGE_VERSION",
|
"env_variable": "SPONGE_VERSION",
|
||||||
"default_value": "1.11.2-6.1.0-BETA-21",
|
"default_value": "1.12.2-7.3.0",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
"user_editable": false,
|
"user_editable": false,
|
||||||
"rules": "required|regex:\/^([a-zA-Z0-9.\\-_]+)$\/"
|
"rules": "required|regex:\/^([a-zA-Z0-9.\\-_]+)$\/"
|
||||||
|
|
|
@ -127,7 +127,7 @@ export default ({ database, className }: Props) => {
|
||||||
<Can action={'database.view_password'}>
|
<Can action={'database.view_password'}>
|
||||||
<div css={tw`mt-6`}>
|
<div css={tw`mt-6`}>
|
||||||
<Label>Password</Label>
|
<Label>Password</Label>
|
||||||
<CopyOnClick text={database.password?.valueOf}><Input type={'text'} readOnly value={database.password}/></CopyOnClick>
|
<CopyOnClick text={database.password}><Input type={'text'} readOnly value={database.password}/></CopyOnClick>
|
||||||
</div>
|
</div>
|
||||||
</Can>
|
</Can>
|
||||||
<div css={tw`mt-6`}>
|
<div css={tw`mt-6`}>
|
||||||
|
|
Loading…
Reference in New Issue