+
Machine Status
- {props.machines.map((x) => (
-
- ))}
+
+ {props.machines.map((x) => (
+
+ ))}
+
);
}
@@ -55,17 +59,19 @@ function MachineWS({
const { lastMessage, readyState } = useWebSocket(
`${wsEndpoint}/comfyui-deploy/ws`,
{
- shouldReconnect: ()=> true,
+ shouldReconnect: () => true,
reconnectAttempts: 20,
reconnectInterval: 1000,
}
);
const connectionStatus = {
- [ReadyState.CONNECTING]: "Connecting",
- [ReadyState.OPEN]: "Open",
- [ReadyState.CLOSING]: "Closing",
- [ReadyState.CLOSED]: "Closed",
+ [ReadyState.CONNECTING]: (
+
+ ),
+ [ReadyState.OPEN]:
,
+ [ReadyState.CLOSING]:
,
+ [ReadyState.CLOSED]:
,
[ReadyState.UNINSTANTIATED]: "Uninstantiated",
}[readyState];
@@ -81,8 +87,8 @@ function MachineWS({
}, [lastMessage]);
return (
-
- {machine.name} - {connectionStatus}
-
+
+ {machine.name} {connectionStatus}
+
);
}
diff --git a/web/src/components/VersionSelect.tsx b/web/src/components/VersionSelect.tsx
index 9f8c5fb..48aadba 100644
--- a/web/src/components/VersionSelect.tsx
+++ b/web/src/components/VersionSelect.tsx
@@ -2,6 +2,7 @@
import { callServerPromise } from "./callServerPromise";
import { LoadingIcon } from "@/components/LoadingIcon";
+import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -199,3 +200,48 @@ export function CreateDeploymentButton({
);
}
+
+const customInputNodes: Record
= {
+ ComfyUIDeployExternalText: "string",
+};
+
+export function VersionDetails({
+ workflow,
+}: {
+ workflow: Awaited>;
+}) {
+ const [version] = useQueryState("version", {
+ defaultValue: workflow?.versions[0].version ?? 1,
+ ...parseAsInteger,
+ });
+ const workflow_version = workflow?.versions.find(
+ (x) => x.version === version
+ );
+ return (
+
+ Workflow Details
+
+ {workflow_version?.workflow_api && (
+
+ {Object.entries(workflow_version.workflow_api).map(
+ ([key, value]) => {
+ if (!value.class_type) return <> >;
+ const nodeType = customInputNodes[value.class_type];
+ if (nodeType) {
+ const input_id = value.inputs.input_id;
+ const defaultValue = value.inputs.default_value;
+ return (
+ <>
+ {input_id} {nodeType} {defaultValue}
+ >
+ );
+ }
+ return <>>;
+ }
+ )}
+
+ )}
+
+
+ );
+}