From 1de3cbe0d94ef024945661f3c9d574e3990183c4 Mon Sep 17 00:00:00 2001 From: Pjotr Date: Sat, 3 Oct 2026 08:41:43 +0000 Subject: execute_bn_gom: show a status page while structure learning runs The runner page used to output NOTHING until the C structure learning and octave runs finished (~12s+); the browser sat on a blank page and only then got the window.open forward to the network diagram. Emit a status page first (flushed before the work starts): Structure learning is running. Forwarding to the network diagram when done... If the diagram does not open, click here. (link to layout_svg_no.php?My_key=...) so users get feedback during the run and a manual fallback if the automatic forward is blocked or fails. --- sourcecodes/execute_bn_gom.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'sourcecodes/execute_bn_gom.php') diff --git a/sourcecodes/execute_bn_gom.php b/sourcecodes/execute_bn_gom.php index 66a04e01..113841cc 100644 --- a/sourcecodes/execute_bn_gom.php +++ b/sourcecodes/execute_bn_gom.php @@ -5,6 +5,27 @@ require("terminal_commands.php"); $keyval=valid_keyval($_GET["My_key"]); +// Structure learning takes a while (C code + octave) and this page +// used to output NOTHING until it was done -- the browser sat on a +// blank page. Emit the status page FIRST and flush it, so the user +// sees what is happening, with a fallback link in case the automatic +// forward is blocked or fails. +?> + + + +Running BNW + + + +
+

Structure learning is running.

+

Forwarding to the network diagram when done…

+

If the diagram does not open, click here.

+
+ window.open("layout_svg_no.php?My_key=",'_self',false); + + -- cgit 1.4.1