Merge remote-tracking branch 'origin/dev' into feat/save-load-nodes

This commit is contained in:
Pim Hutting
2025-12-04 11:04:56 +01:00
13 changed files with 335 additions and 63 deletions

View File

@@ -113,9 +113,20 @@ function VisualProgrammingUI() {
// currently outputs the prepared program to the console
function runProgram() {
const program = graphReducer();
console.log(program);
const phases = graphReducer();
const program = {phases}
console.log(JSON.stringify(program, null, 2));
fetch(
"http://localhost:8000/program",
{
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify(program),
}
).then((res) => {
if (!res.ok) throw new Error("Failed communicating with the backend.")
console.log("Successfully sent the program to the backend.");
}).catch(() => console.log("Failed to send program to the backend."));
}
/**