Skip to content
Open
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
2 changes: 2 additions & 0 deletions core/services/workflow_service/schemas/compute_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ def replace_minio_host(url: str | None) -> str | None:

class BaseIODTO(BaseModel):
id: UUID | None = None
name: str | None = None
data_type: DataType

@classmethod
def from_input_output(cls, io):
return cls(
id=io.uuid,
name=io.name,
data_type=io.data_type
)

Expand Down
39 changes: 23 additions & 16 deletions frontend/components/nodes/ComputeBlockNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useSelectedComputeBlock } from "@/hooks/useSelectedComputeBlock"
import type { ComputeBlock, InputOutput } from "../CreateComputeBlockModal"
import { ComputeBlockStatus, InputOutputType } from "../CreateComputeBlockModal"
import { CheckCircle, Error, Warning, Schedule, Autorenew } from "@mui/icons-material"
import Tooltip from "@mui/material/Tooltip"

export interface ComputeBlockNodeType extends Node {
id: string,
Expand Down Expand Up @@ -67,22 +68,28 @@ export default function ComputeBlockNode({ data }: { data: ComputeBlock }) {
const renderHandles = (items: InputOutput[], type: "target" | "source", position: Position) => {
return items.map((item, index) => {
return (
<Handle
key={index}
type={type}
position={position}
id={item.id}
style={{
...handleStyles[item.data_type] || {
backgroundImage: "",
backgroundColor: "grey",
},
width: "15px",
height: "15px",
borderRadius: "50%",
top: `${(index + 1) * 20}%`,
}}
/>
<Tooltip
key={item.id}
title={`${item.name} (${item.data_type})`}
placement={type === "target" ? "left" : "right"}
arrow
disableInteractive
>
<Handle
key={item.id}
id={item.id}
type={type}
position={position}
style={{
...handleStyles[item.data_type],
width: "15px",
height: "15px",
borderRadius: "50%",
top: `${(index + 1) * 20}%`,
pointerEvents: "all",
}}
/>
</Tooltip>
)
})
}
Expand Down
17 changes: 12 additions & 5 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ export default [
...config.nextExtension,
{
rules: {
...config.nextExtension.rules,
"semi": ["error", "never"],
"quotes": ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }], // Override quotes rule
"@stylistic/quotes": ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }] // Override the @stylistic/quotes plugin rule as wellls: true }], // Override or add the quotes rule
}
}
"quotes": ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
"@stylistic/quotes": ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
},
},
// Override for generated Next.js file
{
files: ["next-env.d.ts"],
rules: {
"@typescript-eslint/triple-slash-reference": "off",
},
},
]

1 change: 1 addition & 0 deletions frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading