Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: show backup timezone on the UI

Andras Bacsaic33132d8d9a5
diff --git a/app/Livewire/Project/Database/BackupEdit.php b/app/Livewire/Project/Database/BackupEdit.php
index b3a54f0abd..bf5302cb9c 100644
--- a/app/Livewire/Project/Database/BackupEdit.php
+++ b/app/Livewire/Project/Database/BackupEdit.php
@@ -40,6 +40,9 @@ class BackupEdit extends Component
#[Validate(['required', 'string'])]
public string $frequency = '';
+ #[Validate(['readonly', 'string'])]
+ public string $timezone = '';
+
#[Validate(['required', 'integer', 'min:1'])]
public int $numberOfBackupsLocally = 1;
@@ -80,6 +83,7 @@ class BackupEdit extends Component
} else {
$this->backupEnabled = $this->backup->enabled;
$this->frequency = $this->backup->frequency;
+ $this->timezone = data_get($this->backup->server(), 'settings.server_timezone', 'Instance timezone');
$this->numberOfBackupsLocally = $this->backup->number_of_backups_locally;
$this->saveS3 = $this->backup->save_s3;
$this->s3StorageId = $this->backup->s3_storage_id;
diff --git a/resources/views/livewire/project/database/backup-edit.blade.php b/resources/views/livewire/project/database/backup-edit.blade.php
index b91b35802a..59628636d7 100644
--- a/resources/views/livewire/project/database/backup-edit.blade.php
+++ b/resources/views/livewire/project/database/backup-edit.blade.php
@@ -70,6 +70,8 @@
</div>
<div class="flex gap-2">
<x-forms.input label="Frequency" id="frequency" />
+ <x-forms.input label="Timezone" id="timezone" disabled
+ helper="The timezone of the server where the backup is scheduled to run (if not set, the instance timezone will be used)" />
<x-forms.input label="Number of backups to keep (locally)" id="numberOfBackupsLocally" />
</div>
</div>
diff --git a/resources/views/livewire/project/database/scheduled-backups.blade.php b/resources/views/livewire/project/database/scheduled-backups.blade.php
index d468f090ab..e8d66d9eea 100644
--- a/resources/views/livewire/project/database/scheduled-backups.blade.php
+++ b/resources/views/livewire/project/database/scheduled-backups.blade.php
@@ -5,9 +5,10 @@
<a class="box"
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
<div class="flex flex-col">
- <div>Frequency: {{ $backup->frequency }}</div>
+ <div>Frequency: {{ $backup->frequency }}
+ ({{ data_get($backup->server(), 'settings.server_timezone', 'Instance timezone') }})
+ </div>
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
- <div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
</div>
</a>
@else
@@ -17,9 +18,10 @@
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
'flex flex-col border-l-2 border-transparent',
])>
- <div>Frequency: {{ $backup->frequency }}</div>
+ <div>Frequency: {{ $backup->frequency }}
+ ({{ data_get($backup->server(), 'settings.server_timezone', 'Instance timezone') }})
+ </div>
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
- <div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
</div>
</div>
@endif