migrating tests (Application, Console and Cronjob)

This commit is contained in:
Saeed Vaziry
2024-10-08 22:15:50 +02:00
parent 974af959f1
commit 0da21f40bd
39 changed files with 254 additions and 2684 deletions

View File

@ -34,6 +34,15 @@ class CronJob extends AbstractModel
'hidden' => 'boolean',
];
public static array $statusColors = [
CronjobStatus::CREATING => 'warning',
CronjobStatus::READY => 'success',
CronjobStatus::DELETING => 'danger',
CronjobStatus::ENABLING => 'warning',
CronjobStatus::DISABLING => 'warning',
CronjobStatus::DISABLED => 'gray',
];
public function server(): BelongsTo
{
return $this->belongsTo(Server::class);
@ -75,4 +84,14 @@ public function frequencyLabel(): string
return $this->frequency;
}
public function isEnabled(): bool
{
return $this->status === CronjobStatus::READY;
}
public function isDisabled(): bool
{
return $this->status === CronjobStatus::DISABLED;
}
}