feat(deployment): add pull request filtering and pagination to deployment and backup execution components

fix(ui): make them more stylish yeah
This commit is contained in:
Andras Bacsai
2025-07-13 12:36:53 +02:00
parent fbe98cfd11
commit 0b84792871
8 changed files with 493 additions and 73 deletions

View File

@@ -36,6 +36,18 @@ class ScheduledDatabaseBackup extends BaseModel
return $this->hasMany(ScheduledDatabaseBackupExecution::class)->where('created_at', '>=', now()->subDays($days))->get();
}
public function executionsPaginated(int $skip = 0, int $take = 10)
{
$executions = $this->hasMany(ScheduledDatabaseBackupExecution::class)->orderBy('created_at', 'desc');
$count = $executions->count();
$executions = $executions->skip($skip)->take($take)->get();
return [
'count' => $count,
'executions' => $executions,
];
}
public function server()
{
if ($this->database) {