feat: Implement container customization and add Portainer installation/removal playbooks.
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
This commit is contained in:
@@ -7,6 +7,28 @@ from pydantic import BaseModel, Field, ConfigDict
|
||||
|
||||
# === Container Schemas ===
|
||||
|
||||
class ContainerCustomizationOut(BaseModel):
|
||||
id: int
|
||||
host_id: str
|
||||
container_id: str
|
||||
icon_key: Optional[str] = None
|
||||
icon_color: Optional[str] = None
|
||||
bg_color: Optional[str] = None
|
||||
updated_at: Optional[datetime] = None
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class ContainerCustomizationUpsert(BaseModel):
|
||||
icon_key: Optional[str] = None
|
||||
icon_color: Optional[str] = None
|
||||
bg_color: Optional[str] = None
|
||||
|
||||
|
||||
class ContainerCustomizationListResponse(BaseModel):
|
||||
customizations: List[ContainerCustomizationOut]
|
||||
|
||||
|
||||
class DockerContainerBase(BaseModel):
|
||||
"""Base schema for Docker container."""
|
||||
container_id: str = Field(..., description="Docker container ID")
|
||||
@@ -28,6 +50,7 @@ class DockerContainerResponse(DockerContainerBase):
|
||||
"""Response schema for Docker container."""
|
||||
id: int
|
||||
host_id: str
|
||||
customization: Optional[ContainerCustomizationOut] = None
|
||||
created_at: Optional[datetime] = None
|
||||
last_update_at: Optional[datetime] = None
|
||||
|
||||
@@ -283,6 +306,7 @@ class DockerContainerAggregatedResponse(DockerContainerBase):
|
||||
host_id: str
|
||||
host_name: str
|
||||
host_ip: str
|
||||
customization: Optional[ContainerCustomizationOut] = None
|
||||
created_at: Optional[datetime] = None
|
||||
last_update_at: Optional[datetime] = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user