mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
migrating tests (Application, Console and Cronjob)
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user