Put resources where somebody would look for them
`resources` was reachable from the SDK and the API and nowhere else, and `node_queued` was published to nothing at all — so a node waiting for a machine looked exactly like a node that had hung, which is the failure the event was added for. The node panel gets a Resources section: a size by name, the numbers for a node that wants its own, and how long it is expected to take. Picking a flavor drops the numbers, because saying both is two answers and the engine refuses it. A queued node draws a neutral dot rather than one of the three status colours — it is not running, it did not go well, and it did not go wrong; it is idle with a reason, which the tooltip gives. And a Workers screen, which is the first UI for any of this: every machine the engine can reach with what is free of each, what is attached, what a cluster has been asked for, and the sizes, editable. `fluksio status` grew a line of the same. The demo's training node already preferred a GPU worker, which was exactly the declaration that used to be dropped, so it now says how much of that machine it takes as well.
This commit is contained in:
@@ -60,7 +60,14 @@ const NODE_ICONS = {
|
||||
|
||||
// One dot says everything about a node's state. Idle nodes carry no dot at all,
|
||||
// so the canvas stays quiet until something happens.
|
||||
// Queued is neutral on purpose: the three status colours mean "running",
|
||||
// "went well" and "went wrong", and a node waiting for a machine is none of
|
||||
// those — it is idle with a reason, which the tooltip gives.
|
||||
const STATUS_STYLES = {
|
||||
queued: {
|
||||
dot: "bg-muted-foreground",
|
||||
label: "Queued — waiting for a machine",
|
||||
},
|
||||
running: { dot: "bg-primary animate-pulse", label: "Running" },
|
||||
success: { dot: "bg-status-success", label: "Last run succeeded" },
|
||||
error: { dot: "bg-destructive", label: "Something went wrong" },
|
||||
@@ -305,7 +312,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
/>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="max-h-60 max-w-xs overflow-y-auto whitespace-pre-line break-words">
|
||||
{problem || style.label}
|
||||
{problem || live?.detail || style.label}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user