mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
feat(canvas): add interactive resource views and team avatars (#12160)
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Traits\Auditable;
|
||||
use App\Traits\ClearsGlobalSearchCache;
|
||||
use App\Traits\HasSafeStringAttribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
@@ -33,6 +34,18 @@ class Environment extends BaseModel
|
||||
'uuid',
|
||||
];
|
||||
|
||||
/**
|
||||
* Moving cards on the environment canvas is layout, not a change worth an audit event.
|
||||
*/
|
||||
protected array $auditExclude = ['canvas_positions'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'canvas_positions' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::deleting(function ($environment) {
|
||||
@@ -148,6 +161,11 @@ class Environment extends BaseModel
|
||||
return $this->hasMany(Service::class);
|
||||
}
|
||||
|
||||
public function resourceLinks(): HasMany
|
||||
{
|
||||
return $this->hasMany(ResourceLink::class);
|
||||
}
|
||||
|
||||
protected function customizeName($value)
|
||||
{
|
||||
return str($value)->lower()->trim()->replace('/', '-')->toString();
|
||||
|
||||
Reference in New Issue
Block a user