mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
2.x
This commit is contained in:
@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\SiteStatus;
|
||||
use App\Exceptions\SourceControlIsNotConnected;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\SiteTypes\SiteType;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
use App\Traits\HasProjectThroughServer;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@ -44,6 +46,7 @@
|
||||
class Site extends AbstractModel
|
||||
{
|
||||
use HasFactory;
|
||||
use HasProjectThroughServer;
|
||||
|
||||
protected $fillable = [
|
||||
'server_id',
|
||||
@ -73,6 +76,13 @@ class Site extends AbstractModel
|
||||
'source_control_id' => 'integer',
|
||||
];
|
||||
|
||||
public static array $statusColors = [
|
||||
SiteStatus::READY => 'success',
|
||||
SiteStatus::INSTALLING => 'warning',
|
||||
SiteStatus::INSTALLATION_FAILED => 'danger',
|
||||
SiteStatus::DELETING => 'danger',
|
||||
];
|
||||
|
||||
public static function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
|
Reference in New Issue
Block a user