Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions api/routers/equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ class ColumnDef(BaseModel):

class EquipmentParamPayload(BaseModel):
name: str
type: str = "float"
unit: str = ""
min_value: str = ""
max_value: str = ""
description: str = ""
equipment_parameter_id: str = ""
recipe_settable: bool = True


class EquipmentOutputPayload(BaseModel):
Expand Down Expand Up @@ -128,6 +131,7 @@ class RegistrationPayload(BaseModel):

class ExperimentTypeParamPayload(BaseModel):
name: str
type: str = "float"
unit: str = ""
is_variable: bool = True
mode: str = "variable"
Expand All @@ -136,6 +140,8 @@ class ExperimentTypeParamPayload(BaseModel):
max_value: str = ""
source: str = "equipment"
description: str = ""
equipment_parameter_id: str = ""
recipe_settable: bool = True


class ExperimentTypePayload(BaseModel):
Expand Down
18 changes: 17 additions & 1 deletion web/app/equipment/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,25 @@ export default function EquipmentDetailPage({
<span className="font-medium">{input.name}</span>
<span className="text-xs text-[hsl(var(--muted-foreground))]">{input.unit || "N/A"}</span>
</div>
<p className="mt-1 text-xs text-[hsl(var(--muted-foreground))]">
<div className="mt-2 flex flex-wrap gap-1.5 text-xs text-[hsl(var(--muted-foreground))]">
<span className="rounded-md bg-[hsl(var(--muted))] px-1.5 py-0.5">
{input.type || "float"}
</span>
{input.equipment_parameter_id && (
<span className="rounded-md bg-[hsl(var(--muted))] px-1.5 py-0.5">
Eq Param {input.equipment_parameter_id}
</span>
)}
<span className="rounded-md bg-[hsl(var(--muted))] px-1.5 py-0.5">
{input.recipe_settable !== false ? "Recipe settable" : "Not recipe settable"}
</span>
</div>
<p className="mt-2 text-xs text-[hsl(var(--muted-foreground))]">
{input.min_value ?? "—"} to {input.max_value ?? "—"}
</p>
{input.description && (
<p className="mt-1 text-xs text-[hsl(var(--muted-foreground))]">{input.description}</p>
)}
</div>
))}
{inputs.length === 0 && (
Expand Down
Loading