ACLASCollege commited on
Commit
df880f7
·
verified ·
1 Parent(s): 8a1c980

Polish repeatable dashboard demo flow

Browse files
Files changed (1) hide show
  1. index.html +29 -5
index.html CHANGED
@@ -465,6 +465,23 @@
465
  cons.appendChild(d); cons.scrollTop = cons.scrollHeight;
466
  }
467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  function showSelectedFile(name, noteText) {
469
  const dropZone = document.getElementById('drop-zone');
470
  dropZone.replaceChildren();
@@ -516,22 +533,29 @@
516
  return;
517
  }
518
  btn.disabled = true;
 
 
 
 
519
  log("INIT: Preparing local demo intake...");
520
 
521
  // Vision Agent
522
- document.getElementById('v-fill').style.width = "100%";
523
  log("VISION: Demo animation only; document bytes are not authenticated in-browser...");
524
  await new Promise(r => setTimeout(r, 800));
 
525
 
526
  // Graph Agent
527
- document.getElementById('g-fill').style.width = "100%";
528
  log("GRAPH: Skipping browser-side registry approval; server audit required...");
529
  await new Promise(r => setTimeout(r, 1500)); // Simulating a deeper search
 
530
 
531
  // Logic Agent
532
- document.getElementById('l-fill').style.width = "100%";
533
  log("LOGIC: Refusing automatic approval without signed server evidence...");
534
  await new Promise(r => setTimeout(r, 800));
 
535
 
536
  await finish();
537
  };
@@ -627,8 +651,8 @@
627
  const done = document.createElement('button');
628
  done.className = 'btn-main';
629
  done.style.width = '100%';
630
- done.innerText = 'DONE';
631
- done.onclick = () => location.reload();
632
  report.appendChild(done);
633
  }
634
  </script>
 
465
  cons.appendChild(d); cons.scrollTop = cons.scrollHeight;
466
  }
467
 
468
+ function setAgent(id, label, width, color = 'var(--accent)') {
469
+ const status = document.getElementById(`${id}-status`);
470
+ const fill = document.getElementById(`${id}-fill`);
471
+ status.innerText = label;
472
+ status.style.color = color;
473
+ fill.style.width = width;
474
+ }
475
+
476
+ function resetRunState() {
477
+ btn.disabled = false;
478
+ btn.innerText = i18n[currentLang].btn_audit;
479
+ setAgent('v', 'IDLE', '0%', 'var(--dim)');
480
+ setAgent('g', 'IDLE', '0%', 'var(--dim)');
481
+ setAgent('l', 'IDLE', '0%', 'var(--dim)');
482
+ document.getElementById('modal').style.display = 'none';
483
+ }
484
+
485
  function showSelectedFile(name, noteText) {
486
  const dropZone = document.getElementById('drop-zone');
487
  dropZone.replaceChildren();
 
533
  return;
534
  }
535
  btn.disabled = true;
536
+ btn.innerText = 'AUDITING...';
537
+ setAgent('v', 'IDLE', '0%', 'var(--dim)');
538
+ setAgent('g', 'IDLE', '0%', 'var(--dim)');
539
+ setAgent('l', 'IDLE', '0%', 'var(--dim)');
540
  log("INIT: Preparing local demo intake...");
541
 
542
  // Vision Agent
543
+ setAgent('v', 'SCANNING', '100%');
544
  log("VISION: Demo animation only; document bytes are not authenticated in-browser...");
545
  await new Promise(r => setTimeout(r, 800));
546
+ setAgent('v', 'DONE', '100%');
547
 
548
  // Graph Agent
549
+ setAgent('g', 'RESOLVING', '100%');
550
  log("GRAPH: Skipping browser-side registry approval; server audit required...");
551
  await new Promise(r => setTimeout(r, 1500)); // Simulating a deeper search
552
+ setAgent('g', 'DONE', '100%');
553
 
554
  // Logic Agent
555
+ setAgent('l', 'AUDITING', '100%');
556
  log("LOGIC: Refusing automatic approval without signed server evidence...");
557
  await new Promise(r => setTimeout(r, 800));
558
+ setAgent('l', 'DONE', '100%');
559
 
560
  await finish();
561
  };
 
651
  const done = document.createElement('button');
652
  done.className = 'btn-main';
653
  done.style.width = '100%';
654
+ done.innerText = 'RUN ANOTHER AUDIT';
655
+ done.onclick = resetRunState;
656
  report.appendChild(done);
657
  }
658
  </script>