fix(applications): persist restart limit state for stopped containers (#11566)

This commit is contained in:
Andras Bacsai
2026-08-31 13:13:26 +02:00
committed by GitHub
parent e514a2d61f
commit 67b33c27a9
97 changed files with 2181 additions and 397 deletions
+7 -1
View File
@@ -3,13 +3,14 @@
namespace App\Models;
use App\Support\ValidationPatterns;
use App\Traits\HasRestartLimit;
use Illuminate\Database\Eloquent\SoftDeletes;
use RuntimeException;
use Spatie\Url\Url;
class ApplicationPreview extends BaseModel
{
use SoftDeletes;
use HasRestartLimit, SoftDeletes;
protected $fillable = [
'uuid',
@@ -102,6 +103,11 @@ class ApplicationPreview extends BaseModel
return $this->belongsTo(Application::class);
}
public function restartLimitMaximum(): int
{
return $this->application->max_restart_count ?? $this->max_restart_count ?? 0;
}
public function persistentStorages()
{
return $this->morphMany(LocalPersistentVolume::class, 'resource');