Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

AYON Settings: Disk mapping #5786

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions server_addon/core/server/settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
from .tools import GlobalToolsModel, DEFAULT_TOOLS_VALUES


class DiskMappingItemModel(BaseSettingsModel):
_layout = "expanded"
source: str = Field("", title="Source")
destination: str = Field("", title="Destination")


class DiskMappingModel(BaseSettingsModel):
windows: list[DiskMappingItemModel] = Field(
title="Windows",
default_factory=list,
)
linux: list[DiskMappingItemModel] = Field(
title="Linux",
default_factory=list,
)
darwin: list[DiskMappingItemModel] = Field(
title="MacOS",
default_factory=list,
)


class ImageIOFileRuleModel(BaseSettingsModel):
name: str = Field("", title="Rule name")
pattern: str = Field("", title="Regex pattern")
Expand Down Expand Up @@ -97,6 +118,10 @@ class CoreSettings(BaseSettingsModel):
widget="textarea",
scope=["studio"],
)
disk_mapping: DiskMappingModel = Field(
default_factory=DiskMappingModel,
title="Disk mapping",
)
tools: GlobalToolsModel = Field(
default_factory=GlobalToolsModel,
title="Tools"
Expand Down
Loading