diff --git a/web/src/app/api/view/route.ts b/web/src/app/api/view/route.ts
index c944d86..dfcd078 100644
--- a/web/src/app/api/view/route.ts
+++ b/web/src/app/api/view/route.ts
@@ -2,7 +2,7 @@ import { NextResponse, type NextRequest } from "next/server";
export async function GET(request: NextRequest) {
const file = new URL(request.url).searchParams.get("file");
- console.log(file);
+ console.log(`${process.env.SPACES_ENDPOINT}/comfyui-deploy/${file}`);
return NextResponse.redirect(
`${process.env.SPACES_ENDPOINT}/comfyui-deploy/${file}`
);
diff --git a/web/src/app/[workflow_id]/page.tsx b/web/src/app/workflow/[workflow_id]/page.tsx
similarity index 89%
rename from web/src/app/[workflow_id]/page.tsx
rename to web/src/app/workflow/[workflow_id]/page.tsx
index e54ef39..11f26ff 100644
--- a/web/src/app/[workflow_id]/page.tsx
+++ b/web/src/app/workflow/[workflow_id]/page.tsx
@@ -1,5 +1,5 @@
-import { DeploymentsTable, RunsTable } from "../../components/RunsTable";
-import { findFirstTableWithVersion } from "../../server/findFirstTableWithVersion";
+import { DeploymentsTable, RunsTable } from "../../../components/RunsTable";
+import { findFirstTableWithVersion } from "../../../server/findFirstTableWithVersion";
import { MachinesWSMain } from "@/components/MachinesWS";
import {
CreateDeploymentButton,
@@ -49,7 +49,7 @@ export default async function Page({
-
+
Deployments
@@ -60,7 +60,7 @@ export default async function Page({
-
+
Run
diff --git a/web/src/components/DeploymentDisplay.tsx b/web/src/components/DeploymentDisplay.tsx
index 0866099..b7936a1 100644
--- a/web/src/components/DeploymentDisplay.tsx
+++ b/web/src/components/DeploymentDisplay.tsx
@@ -21,28 +21,32 @@ curl --request POST \
}'
`;
+const curlTemplate_checkStatus = `
+curl --request GET \
+ --url 'http://localhost:3000/api/run?run_id=xxx' \
+ --header 'Content-Type: application/json'
+`;
+
const jsTemplate = `
-const options = {
+fetch('', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
- body: '{"deployment_id":""}'
-};
-
-fetch('', options)
+ body: JSON.stringify({
+ deployment_id: '',
+ }),
+})
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
`;
const jsTemplate_checkStatus = `
-const options = {
- method: 'GET',
- headers: {'Content-Type': 'application/json'},
-};
-
const run_id = '';
-fetch('?run_id=' + run_id, options)
+fetch('?run_id=' + run_id, {
+ method: 'GET',
+ headers: {'Content-Type': 'application/json'},
+})
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
@@ -82,17 +86,23 @@ export function DeploymentDisplay({
curl
+ Trigger the workflow
+ Check the status of the run, and retrieve the outputs
-
+
+
diff --git a/web/src/components/RunDisplay.tsx b/web/src/components/RunDisplay.tsx
index a8ad2b3..9b3d723 100644
--- a/web/src/components/RunDisplay.tsx
+++ b/web/src/components/RunDisplay.tsx
@@ -70,7 +70,7 @@ export function OutputRender(props: { run_id: string; filename: string }) {
return (
diff --git a/web/src/components/RunOutputs.tsx b/web/src/components/RunOutputs.tsx
index f957f33..0e8874c 100644
--- a/web/src/components/RunOutputs.tsx
+++ b/web/src/components/RunOutputs.tsx
@@ -23,7 +23,7 @@ export function RunOutputs({ run_id }: { run_id: string }) {
// .then((x) => x.json())
// .then((x) => setOutputs(x));
callServerPromise(getRunsOutput(run_id).then((x) => setOutputs(x)));
- }, [run_id, outputs]);
+ }, [run_id]);
return (
diff --git a/web/src/components/WorkflowList.tsx b/web/src/components/WorkflowList.tsx
index 552c10d..39798e5 100644
--- a/web/src/components/WorkflowList.tsx
+++ b/web/src/components/WorkflowList.tsx
@@ -9,7 +9,6 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
- DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Input } from "@/components/ui/input";
@@ -85,7 +84,7 @@ export const columns: ColumnDef[] = [
},
cell: ({ row }) => {
return (
-
+
{row.getValue("email")}
);
@@ -167,7 +166,7 @@ export const columns: ColumnDef[] = [
export function WorkflowList({ data }: { data: Payment[] }) {
const [sorting, setSorting] = React.useState([]);
const [columnFilters, setColumnFilters] = React.useState(
- [],
+ []
);
const [columnVisibility, setColumnVisibility] =
React.useState({});
@@ -242,7 +241,7 @@ export function WorkflowList({ data }: { data: Payment[] }) {
? null
: flexRender(
header.column.columnDef.header,
- header.getContext(),
+ header.getContext()
)}
);
@@ -261,7 +260,7 @@ export function WorkflowList({ data }: { data: Payment[] }) {
{flexRender(
cell.column.columnDef.cell,
- cell.getContext(),
+ cell.getContext()
)}
))}