-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1899 lines (1706 loc) · 144 KB
/
index.html
File metadata and controls
1899 lines (1706 loc) · 144 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ModelOp Custom Monitor Quickstart Guide</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Chart.js -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<!-- Viz.js (Graphviz) for ERD and Pathways -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/2.1.2/viz.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/2.1.2/full.render.js"></script>
<!-- HTML2Canvas for Slide Generation -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<!-- Google Fonts & Material Symbols -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet">
<style>
:root {
--primary: #006630;
--primary-hover: #004d24;
--bg-color: #ffffff;
--panel-bg: #ffffff;
--panel-light: #f8fafc;
--text-main: #1e293b;
--text-light: #64748b;
--border: #e2e8f0;
--card-shadow: 0 1px 3px rgba(0,0,0,0.05);
--code-bg: #1a1a1a;
--code-border: #333333;
--pill-bg: #e2e8f0;
--pill-text: #475569;
}
.dark-mode {
--bg-color: #141414;
--panel-bg: #1e1e1e;
--panel-light: #252525;
--text-main: #e5e7eb;
--text-light: #9ca3af;
--border: #2e2e2e;
--card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
--code-bg: #141414;
--code-border: #2e2e2e;
--pill-bg: #334155;
--pill-text: #cbd5e1;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--bg-color);
color: var(--text-main);
transition: background-color 0.3s, color 0.3s;
}
.page-section { display: none !important; animation: fadeIn 0.3s ease-out; }
.page-section.active { display: block !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
h2 { color: var(--text-main); letter-spacing: -0.02em; }
.text-body { color: var(--text-light); line-height: 1.6; }
.card { background-color: var(--panel-bg); border: 1px solid var(--border); border-radius: 0.5rem; box-shadow: var(--card-shadow); }
pre {
background-color: var(--code-bg); color: #d1d5db; padding: 1.25rem;
border-radius: 0.5rem; font-size: 0.85rem; border: 1px solid var(--code-border);
overflow-x: auto; line-height: 1.5;
}
/* Sidebar Styling & Minimization */
.sidebar-expanded { width: 256px; }
.sidebar-minimized { width: 80px; }
.sidebar-minimized .nav-text, .sidebar-minimized .nav-header-text, .sidebar-minimized .nav-footer { display: none; }
.sidebar-minimized .nav-btn { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-minimized .nav-btn .material-symbols-outlined { margin: 0; font-size: 24px; }
.sidebar-minimized .sidebar-header-container { padding-left: 0; padding-right: 0; justify-content: center; }
.sidebar-minimized .sidebar-actions { flex-direction: column !important; gap: 12px; }
.nav-btn { color: var(--text-main); border-left: 4px solid transparent; }
.nav-btn:hover { color: var(--primary); background-color: var(--panel-light); }
.nav-btn.active { background-color: var(--panel-light); color: var(--primary); border-left: 4px solid var(--primary); font-weight: 600; }
.action-btn { height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 13px; font-weight: 500; gap: 6px; }
.action-btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border); padding: 0 12px; }
.action-btn-outline:hover { background: var(--panel-light); border-color: var(--primary); }
.theme-toggle-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--text-light); }
.theme-toggle-btn:hover { background: var(--panel-light); color: var(--text-main); }
/* ERD Nodes & Interactive Elements */
#erd-canvas .node, #erd-agentic-canvas .node, #pathway-canvas .node { cursor: pointer; transition: opacity 0.2s; }
#erd-canvas .node:hover, #erd-agentic-canvas .node:hover, #pathway-canvas .node:hover { opacity: 0.8; }
#erd-canvas svg, #erd-agentic-canvas svg, #pathway-canvas svg { width: 100%; height: auto; max-height: 500px; }
.interactive-card { transition: all 0.2s ease; cursor: pointer; }
.interactive-card:hover { border-color: var(--primary); background: var(--panel-light); transform: translateY(-2px); }
.interactive-card.selected { border-color: var(--primary); background: var(--panel-light); border-left: 4px solid var(--primary); }
.template-pill { background-color: var(--pill-bg); color: var(--pill-text); padding: 4px 12px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.template-pill:hover { background-color: var(--panel-light); border-color: var(--border); }
.template-pill.active { background-color: var(--primary); color: white; }
.metric-btn { background-color: var(--panel-light); border: 1px solid var(--border); color: var(--text-main); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 500; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; }
.metric-btn:hover, .metric-btn.active-metric { border-color: var(--primary); background-color: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(0, 102, 48, 0.3); }
/* Glossary Tooltips */
.glossary-term { text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--primary); cursor: help; position: relative; font-weight: 500; }
.glossary-term:hover::after {
content: attr(data-tooltip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
background-color: var(--text-main); color: var(--bg-color); padding: 8px 12px; border-radius: 6px;
font-size: 0.75rem; white-space: normal; width: 200px; text-align: left; z-index: 50; font-weight: normal;
box-shadow: 0 4px 6px rgba(0,0,0,0.2); pointer-events: none;
}
/* Accordion */
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out; opacity: 0; margin-top: 0; }
.accordion-item.active .accordion-content { max-height: 250px; opacity: 1; margin-top: 0.75rem; }
.accordion-item.active .step-marker { background-color: var(--primary); color: white; }
.accordion-item.active .card { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0, 102, 48, 0.1); }
/* Toast Notifications */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none;}
.toast { background: var(--panel-bg); color: var(--text-main); padding: 12px 20px; border-radius: 6px; font-size: 13px; border-left: 4px solid var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0; transform: translateY(20px); transition: all 0.3s ease; pointer-events: all; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);}
.toast.show { opacity: 1; transform: translateY(0); }
.dark-mode .toast { box-shadow: 0 4px 12px rgba(0,0,0,0.6); }
/* Metric Detail Formula block */
.metric-formula { display: inline-block; background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.8em; color: var(--primary); border: 1px solid var(--border); }
.dark-mode .metric-formula { background: rgba(255,255,255,0.05); }
input[type="checkbox"].accent-primary { accent-color: var(--primary); }
/* Slide Staging Area (16:9 Aspect Ratio) */
#slide-staging-area {
position: absolute; top: -9999px; left: -9999px;
width: 1280px; height: 720px;
background: white; color: #1e293b; font-family: 'Poppins', sans-serif;
z-index: -10; overflow: hidden; display: flex; flex-direction: column; padding: 40px; box-sizing: border-box;
}
#slide-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #006630; padding-bottom: 15px; margin-bottom: 25px; }
#slide-title { font-size: 32px; font-weight: 700; color: #006630; margin:0; padding:0; }
#slide-subtitle { font-size: 18px; color: #64748b; font-weight: 500; }
#slide-body { flex: 1; display: flex; gap: 30px; min-height: 0; overflow: hidden; }
.slide-inset { flex: 0 0 380px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; display: flex; flex-direction: column; box-shadow: 0 4px 6px rgba(0,0,0,0.05); overflow-y: auto; }
.slide-inset h3 { font-size: 20px; font-weight: 700; color: #1e293b; margin-bottom: 15px; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px;}
.slide-inset .content { font-size: 14px; color: #475569; line-height: 1.5; }
.slide-visual-area { flex: 1; display: flex; align-items: center; justify-content: center; background: transparent; border-radius: 12px; overflow: hidden; position: relative;}
.slide-visual-area img, .slide-visual-area canvas, .slide-visual-area svg { max-width: 100%; max-height: 100%; object-fit: contain; }
#slide-footer { margin-top: 20px; display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; font-weight: 600; }
/* Fullscreen & Floating Modal Modes */
.viz-fullscreen {
position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
width: 100vw !important; height: 100vh !important; z-index: 9999 !important; border-radius: 0 !important;
display: flex !important; flex-direction: column !important; background: var(--bg-color) !important; padding: 0 !important; border: none !important;
}
.viz-fullscreen .zoom-pan-wrapper { height: 100% !important; max-height: none !important; width: 100% !important; padding: 0 !important; margin: 0 !important;}
.floating-modal {
position: absolute; top: 20px; left: 20px; width: 340px; max-height: calc(100vh - 40px);
background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
z-index: 10000; display: none; flex-direction: column; overflow: hidden; transition: height 0.3s ease;
}
.floating-modal.minimized { height: 38px !important; }
.floating-modal.active { display: flex; }
.floating-modal-content { overflow-y: auto; padding: 16px; flex: 1; }
/* Zoom Pan Wrapper */
.zoom-pan-wrapper { width: 100%; height: 100%; cursor: grab; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; padding: 0; margin: 0; }
.zoom-pan-wrapper:active { cursor: grabbing; }
</style>
</head>
<body class="flex h-screen overflow-hidden flex-col md:flex-row relative">
<!-- Toast Container -->
<div id="toast-container"></div>
<!-- Global Floating Fullscreen Config Modal -->
<div id="fs-config-modal" class="floating-modal">
<div class="flex justify-between items-center bg-[var(--panel-light)] p-2 px-3 border-b border-[var(--border)] cursor-pointer" onclick="this.parentElement.classList.toggle('minimized'); const ic = this.querySelector('.expand-icon'); ic.innerText = ic.innerText === 'expand_more' ? 'expand_less' : 'expand_more';">
<span class="font-bold text-[var(--primary)] text-xs uppercase tracking-wider flex items-center gap-1"><span class="material-symbols-outlined text-[14px]">tune</span> Config & Inspector</span>
<span class="material-symbols-outlined text-[16px] text-[var(--text-light)] expand-icon">expand_more</span>
</div>
<div class="floating-modal-content flex flex-col gap-4" id="fs-config-content">
<!-- Content cloned via JS -->
</div>
</div>
<!-- Fallback Download Modal for Iframes -->
<div id="download-fallback-modal" class="fixed inset-0 z-[100000] hidden items-center justify-center bg-black/80 p-4 lg:p-10 transition-opacity">
<div class="bg-[var(--panel-bg)] rounded-xl p-6 w-full max-w-5xl flex flex-col shadow-2xl h-[90vh]">
<div class="flex justify-between items-center mb-4">
<div>
<h3 class="text-xl font-bold text-[var(--text-main)] flex items-center gap-2">
<span class="material-symbols-outlined text-[var(--primary)]">file_download</span> Download Ready
</h3>
<p class="text-sm text-[var(--text-light)] mt-1">Right-click the image below and select <b>"Save Image As..."</b> to copy it.</p>
</div>
<button onclick="document.getElementById('download-fallback-modal').classList.replace('flex', 'hidden')" class="text-[var(--text-light)] hover:text-[var(--text-main)] transition-colors">
<span class="material-symbols-outlined text-3xl">close</span>
</button>
</div>
<div class="overflow-auto flex-1 border-2 border-dashed border-[var(--border)] rounded-lg flex items-center justify-center bg-[var(--panel-light)] p-4">
<img id="fallback-download-img" src="" alt="Generated Slide" class="max-w-full h-auto object-contain shadow-md" />
</div>
</div>
</div>
<!-- Hidden Slide Staging Area (for HTML2Canvas) -->
<div id="slide-staging-area">
<div id="slide-header">
<div>
<h1 id="slide-title">ModelOp Enterprise Governance</h1>
</div>
<div id="slide-subtitle">Curated Insight</div>
</div>
<div id="slide-body">
<div class="slide-inset" id="slide-inset">
<h3 id="slide-inset-title">Taxonomy Context</h3>
<div class="content" id="slide-inset-content"></div>
</div>
<div class="slide-visual-area" id="slide-visual">
<!-- SVG/Image injected dynamically -->
</div>
</div>
<div id="slide-footer">
<div>CONFIDENTIAL - FOR INTERNAL ENABLEMENT ONLY</div>
<div>ModelOp Center v3.4</div>
</div>
</div>
<!-- Floating Metric Tooltip -->
<div id="metric-floating-tooltip" class="fixed hidden z-50 bg-[var(--panel-bg)] border border-[var(--border)] shadow-2xl rounded-lg p-5 w-[350px] text-sm pointer-events-none transition-opacity duration-200 opacity-0">
<h4 id="tt-metric-title" class="font-bold text-[15px] text-[var(--primary)] mb-1 pb-2 border-b border-[var(--border)]"></h4>
<p id="tt-metric-desc" class="text-[var(--text-main)] mt-3 mb-2 text-[13px] leading-relaxed"></p>
<div id="tt-metric-formula-container" class="mb-3 hidden"><code id="tt-metric-formula" class="metric-formula"></code></div>
<ul class="text-xs text-[var(--text-light)] space-y-2 mt-2">
<li class="bg-[var(--panel-light)] p-2 rounded"><strong class="text-[var(--text-main)] block mb-1">Business Context:</strong> <span id="tt-metric-biz"></span></li>
<li class="bg-[var(--panel-light)] p-2 rounded"><strong class="text-[var(--text-main)] block mb-1">GRC Leaders:</strong> <span id="tt-metric-grc"></span></li>
<li class="bg-[var(--panel-light)] p-2 rounded"><strong class="text-[var(--text-main)] block mb-1">Model Owners:</strong> <span id="tt-metric-model"></span></li>
</ul>
</div>
<!-- Mobile Header -->
<div class="md:hidden flex flex-shrink-0 items-center justify-between bg-[var(--panel-bg)] p-4 border-b border-[var(--border)] z-20 shadow-sm">
<div><h1 class="text-xl font-bold text-[var(--primary)]">ModelOp</h1></div>
<div class="flex items-center gap-2">
<button onclick="window.exportCurrentSlide()" class="action-btn action-btn-outline hidden sm:flex text-[var(--primary)] border-[var(--primary)]" title="Download Current Tab as PPT Slide">
<span class="material-symbols-outlined text-[16px]">download</span> Slide
</button>
<button onclick="window.toggleTheme()" class="theme-toggle-btn"><span id="theme-icon-mobile" class="material-symbols-outlined">light_mode</span></button>
<button onclick="window.toggleMobileMenu()" class="theme-toggle-btn"><span class="material-symbols-outlined text-2xl">menu</span></button>
</div>
</div>
<div id="mobile-overlay" class="fixed inset-0 z-30 hidden md:hidden" onclick="window.toggleMobileMenu()"></div>
<!-- Sidebar Navigation -->
<nav id="sidebar" class="sidebar-expanded fixed md:relative inset-y-0 left-0 transform -translate-x-full md:translate-x-0 transition-all duration-300 ease-in-out bg-[var(--panel-bg)] border-r border-[var(--border)] flex flex-col h-full z-40 shadow-xl md:shadow-none shrink-0 overflow-hidden">
<div class="sidebar-header-container p-6 pb-4 flex justify-between items-center whitespace-nowrap">
<div class="nav-header-text overflow-hidden">
<h1 class="text-2xl font-bold text-[var(--primary)] tracking-tight">ModelOp</h1>
<p class="text-[10px] uppercase tracking-widest font-bold text-[var(--text-light)] mt-1">Quickstart Guide</p>
</div>
<div class="sidebar-actions hidden md:flex items-center gap-1">
<button onclick="window.exportCurrentSlide()" class="action-btn action-btn-outline text-[var(--primary)] border-[var(--primary)] px-2" title="Download Current View as PPT Slide PNG">
<span class="material-symbols-outlined text-[16px]">download</span>
</button>
<button onclick="window.toggleTheme()" class="theme-toggle-btn" title="Toggle Dark/Light Mode">
<span id="theme-icon" class="material-symbols-outlined text-[20px]">light_mode</span>
</button>
<button onclick="window.toggleSidebarSize()" class="theme-toggle-btn text-[var(--text-light)] hover:text-[var(--primary)]" title="Collapse Sidebar">
<span id="sidebar-icon" class="material-symbols-outlined text-[20px]">keyboard_double_arrow_left</span>
</button>
</div>
<button onclick="window.toggleMobileMenu()" class="md:hidden text-[var(--text-main)]"><span class="material-symbols-outlined">close</span></button>
</div>
<div class="flex-1 py-4 overflow-y-auto mt-2">
<ul class="space-y-1">
<li>
<button class="nav-btn active w-full text-left px-6 py-3 text-sm flex items-center gap-3 transition-colors" onclick="window.switchTab(this, 'dashboard')" title="Overview">
<span class="material-symbols-outlined text-[20px]">dashboard_customize</span> <span class="nav-text">Overview</span>
</button>
</li>
<li>
<button class="nav-btn w-full text-left px-6 py-3 text-sm flex items-center gap-3 transition-colors" onclick="window.switchTab(this, 'catalog')" title="DS Metrics Catalog">
<span class="material-symbols-outlined text-[20px]">analytics</span> <span class="nav-text">DS Metrics Catalog</span>
</button>
</li>
<li>
<button class="nav-btn w-full text-left px-6 py-3 text-sm flex items-center gap-3 transition-colors" onclick="window.switchTab(this, 'pathway')" title="Selection Pathway">
<span class="material-symbols-outlined text-[20px]">route</span> <span class="nav-text">Selection Pathway</span>
</button>
</li>
<li>
<button class="nav-btn w-full text-left px-6 py-3 text-sm flex items-center gap-3 transition-colors" onclick="window.switchTab(this, 'architecture')" title="Execution Architecture">
<span class="material-symbols-outlined text-[20px]">account_tree</span> <span class="nav-text">Execution Architecture</span>
</button>
</li>
<li>
<button class="nav-btn w-full text-left px-6 py-3 text-sm flex items-center gap-3 transition-colors" onclick="window.switchTab(this, 'artifacts')" title="Artifact Explorer">
<span class="material-symbols-outlined text-[20px]">code_blocks</span> <span class="nav-text">Artifact Explorer</span>
</button>
</li>
<li>
<button class="nav-btn w-full text-left px-6 py-3 text-sm flex items-center gap-3 transition-colors" onclick="window.switchTab(this, 'deployment')" title="Deployment Workflow">
<span class="material-symbols-outlined text-[20px]">call_made</span> <span class="nav-text">Deployment Workflow</span>
</button>
</li>
</ul>
</div>
<div class="nav-footer p-6 border-t border-[var(--border)] text-[11px] text-[var(--text-light)] leading-relaxed whitespace-normal">
Reference: <a href="https://modelopdocs.atlassian.net/wiki/spaces/dv33/pages/1978436307/Monitor+Report" target="_blank" class="text-[var(--primary)] hover:underline">ModelOp v3.4 Master Docs</a>
</div>
</nav>
<!-- Main Content Area -->
<main class="flex-1 h-full overflow-y-auto relative bg-[var(--bg-color)] flex flex-col" id="main-content-scroll">
<div class="p-6 md:p-10 lg:p-12 flex-1 relative">
<!-- SECTION 1: Overview -->
<section id="dashboard" class="page-section active max-w-4xl mx-auto">
<div class="mb-10">
<h2 class="text-3xl font-bold mb-4 tracking-tight">Bridging Standard Metrics & Enterprise Needs</h2>
<p class="text-body text-lg">ModelOp Center provides a comprehensive suite of out-of-the-box (OOTB) monitors. However, enterprise requirements often demand unique calculations. This guide introduces the capabilities of custom Python-based monitors.</p>
</div>
<div class="space-y-6 mb-10">
<div class="card p-6 border-l-4 border-l-[var(--primary)]">
<h4 class="font-bold text-[15px] mb-2 flex items-center gap-2 text-[var(--text-main)]">
<span class="material-symbols-outlined text-[18px] text-[var(--primary)]">code</span> The Developer Value
</h4>
<p class="text-sm text-body">Write standard Python code using <span class="glossary-term" data-tooltip="Libraries like Pandas, Scikit-learn, SciPy, etc.">Data Science libraries</span> and have it automatically integrated into an enterprise-grade governance platform. No complex API integrations required.</p>
</div>
<div class="card p-6 border-l-4 border-l-[var(--primary)]">
<h4 class="font-bold text-[15px] mb-2 flex items-center gap-2 text-[var(--text-main)]">
<span class="material-symbols-outlined text-[18px] text-[var(--primary)]">verified_user</span> The Governance Value
</h4>
<p class="text-sm text-body">Ensures that no matter how complex the model metric, the "evidence" is always captured in a standardized, auditable format for risk and compliance.</p>
</div>
</div>
<div class="card p-8">
<h4 class="font-bold text-xl mb-2 text-[var(--text-main)]">Monitors by Model Modality</h4>
<p class="text-sm text-body mb-8">Custom monitors can be built to supplement any of these OOTB categories based on your domain.</p>
<div class="relative w-full h-[300px]"><canvas id="capChart"></canvas></div>
</div>
</section>
<!-- SECTION 2: Data Science Metrics Catalog -->
<section id="catalog" class="page-section max-w-6xl mx-auto pb-10">
<div class="mb-10">
<h2 class="text-3xl font-bold mb-4 tracking-tight">Data Science Metrics Catalog</h2>
<p class="text-body text-lg">Hover or click on any metric pill below to view its algorithmic definition and dual-persona insights. These definitions guide standard and custom monitor creation.</p>
</div>
<div class="grid grid-cols-1 xl:grid-cols-2 gap-6">
<div class="card p-6 flex flex-col h-full xl:col-span-2 border-t-4 border-t-[var(--primary)]">
<div class="flex items-center gap-3 mb-4 border-b border-[var(--border)] pb-3">
<span class="material-symbols-outlined text-[var(--primary)] text-[28px]">psychology</span>
<h4 class="font-bold text-xl text-[var(--text-main)]">1. Generative AI / NLP Validations</h4>
</div>
<p class="text-sm text-body mb-4">Secures conversational agents and generative models against hallucinations, toxic output, and data leakage.</p>
<div class="flex flex-wrap gap-2 mt-auto">
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'pii')" onmouseleave="window.hideMetricTooltip()">PII/PHI Disclosure Detection</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'prompt_template')" onmouseleave="window.hideMetricTooltip()">Prompt Template Verification</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'rails')" onmouseleave="window.hideMetricTooltip()">Rails Compliance</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'sentiment')" onmouseleave="window.hideMetricTooltip()">Sentiment Analysis</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'sbert')" onmouseleave="window.hideMetricTooltip()">SBERT Similarity</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'cross_llm')" onmouseleave="window.hideMetricTooltip()">Cross-LLM Validation</button>
</div>
</div>
<div class="card p-6 flex flex-col h-full border-t-4 border-t-[#8b5cf6]">
<div class="flex items-center gap-3 mb-4 border-b border-[var(--border)] pb-3">
<span class="material-symbols-outlined text-[#8b5cf6] text-[28px]">balance</span>
<h4 class="font-bold text-lg text-[var(--text-main)]">2. Ethical Fairness & Bias</h4>
</div>
<p class="text-sm text-body mb-4 flex-1">Evaluates model behavior disparities against <span class="glossary-term" data-tooltip="A column flagged in the schema representing attributes like race, gender, or age.">protected classes</span> to ensure regulatory compliance.</p>
<div class="flex flex-wrap gap-2 mt-auto">
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'pred_pos_disp')" onmouseleave="window.hideMetricTooltip()">Predicted Positive Disparity</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'for_disp')" onmouseleave="window.hideMetricTooltip()">False Omission Rate (FOR) Disparity</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'fdr_disp')" onmouseleave="window.hideMetricTooltip()">FDR Disparity</button>
</div>
</div>
<div class="card p-6 flex flex-col h-full border-t-4 border-t-[#f59e0b]">
<div class="flex items-center gap-3 mb-4 border-b border-[var(--border)] pb-3">
<span class="material-symbols-outlined text-[#f59e0b] text-[28px]">show_chart</span>
<h4 class="font-bold text-lg text-[var(--text-main)]">3. Regression & Credit Risk</h4>
</div>
<p class="text-sm text-body mb-4 flex-1">Assesses continuous prediction errors and rank-ordering capabilities, crucial for financial/credit models.</p>
<div class="flex flex-wrap gap-2 mt-auto">
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'mae')" onmouseleave="window.hideMetricTooltip()">MAE</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'rmse')" onmouseleave="window.hideMetricTooltip()">RMSE</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'r2')" onmouseleave="window.hideMetricTooltip()">R-Squared</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'gini')" onmouseleave="window.hideMetricTooltip()">Gini Coefficient</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'cstat')" onmouseleave="window.hideMetricTooltip()">C-Stat</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'rank_break')" onmouseleave="window.hideMetricTooltip()">Rank-Order Break</button>
</div>
</div>
<div class="card p-6 flex flex-col h-full border-t-4 border-t-[#10b981]">
<div class="flex items-center gap-3 mb-4 border-b border-[var(--border)] pb-3">
<span class="material-symbols-outlined text-[#10b981] text-[28px]">join_inner</span>
<h4 class="font-bold text-lg text-[var(--text-main)]">4. Classification Performance</h4>
</div>
<p class="text-sm text-body mb-4 flex-1">Evaluates discrete prediction models. Requires schemas mapping <code>score_column</code> and <code>label_column</code>.</p>
<div class="flex flex-wrap gap-2 mt-auto">
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'accuracy')" onmouseleave="window.hideMetricTooltip()">Accuracy</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'auc')" onmouseleave="window.hideMetricTooltip()">AUC-ROC</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'precision')" onmouseleave="window.hideMetricTooltip()">Precision</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'recall')" onmouseleave="window.hideMetricTooltip()">Recall</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'f1')" onmouseleave="window.hideMetricTooltip()">F1-Score</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'cm')" onmouseleave="window.hideMetricTooltip()">Confusion Matrix</button>
</div>
</div>
<div class="card p-6 flex flex-col h-full border-t-4 border-t-[#3b82f6]">
<div class="flex items-center gap-3 mb-4 border-b border-[var(--border)] pb-3">
<span class="material-symbols-outlined text-[#3b82f6] text-[28px]">query_stats</span>
<h4 class="font-bold text-lg text-[var(--text-main)]">5. Data & Concept Drift</h4>
</div>
<p class="text-sm text-body mb-4 flex-1">Detects shifts in input distributions over time by comparing <span class="glossary-term" data-tooltip="The reference dataset, usually the training data.">baseline data</span> against a sample slice.</p>
<div class="flex flex-wrap gap-2 mt-auto">
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'ks')" onmouseleave="window.hideMetricTooltip()">Kolmogorov-Smirnov (KS)</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'epps')" onmouseleave="window.hideMetricTooltip()">Epps-Singleton</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'jsd')" onmouseleave="window.hideMetricTooltip()">Jensen-Shannon</button>
<button class="metric-btn" onmouseenter="window.activateMetric(event, 'kl')" onmouseleave="window.hideMetricTooltip()">Kullback-Leibler</button>
</div>
</div>
</div>
<div class="pt-8">
<div id="quick-copy-container" class="bg-[var(--panel-bg)] border border-[var(--border)] rounded-xl shadow-lg transition-all duration-300 opacity-0 hidden">
<div class="bg-[var(--panel-light)] border-b border-[var(--border)] px-5 py-3 flex justify-between items-center rounded-t-xl">
<div class="flex items-center gap-2">
<span class="material-symbols-outlined text-[var(--primary)] text-lg">markdown</span>
<span class="text-xs font-bold text-[var(--text-main)] uppercase tracking-widest">Active Tooltip Detail</span>
</div>
<button onclick="window.copyMetricMarkdown(this)" class="py-1 px-3 bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-white rounded text-xs flex items-center gap-1 transition-all shadow-sm">
<span class="material-symbols-outlined text-[14px] copy-icon">content_copy</span> <span class="copy-text">Copy Raw Markdown</span>
</button>
</div>
<div class="p-6">
<div class="mb-4 pb-4 border-b border-[var(--border)]">
<p class="text-xs text-[var(--text-light)] italic border-l-2 border-[var(--primary)] pl-3">
<strong>ModelOp Governance Philosophy:</strong> A mathematical formula is just a number until mapped to a business outcome. ModelOp Center links these raw statistical inferences to operational ground truth, establishing tangible enterprise KPIs (e.g., P&L impact, risk tiering, compliance validation) necessary for automated governance.
</p>
</div>
<div id="quick-copy-rendered" class="text-[14px] text-[var(--text-main)] mb-6">
<p class="text-[var(--text-light)] italic">Hover over a metric pill above to load its detailed data science definition...</p>
</div>
<div class="mt-6 pt-4 border-t border-[var(--border)]">
<h5 class="text-xs font-bold text-[var(--text-light)] uppercase tracking-wider mb-3">ModelOp Reference Documentation</h5>
<ul class="space-y-2 flex flex-col text-sm">
<li><a href="https://modelopdocs.atlassian.net/wiki/spaces/dv33/pages/1978436307/Monitor+Report" target="_blank" class="text-[var(--primary)] hover:underline flex items-center gap-1 w-fit"><span class="material-symbols-outlined text-[16px]">open_in_new</span> Monitor & Report Capabilities</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- SECTION 3: Selection Pathway -->
<section id="pathway" class="page-section max-w-full mx-auto">
<div class="mb-8 max-w-6xl mx-auto">
<h2 class="text-3xl font-bold mb-4 tracking-tight">Enterprise Monitor Selection Pathway</h2>
<p class="text-body text-lg max-w-4xl">Selecting the right AI monitor requires mapping the technical model type directly to enterprise business outcomes. Use this dynamic tree to navigate from your raw data state to the specific ModelOp monitors required.</p>
</div>
<div class="flex flex-col lg:flex-row gap-6 relative lg:h-[600px] w-full">
<div class="w-full lg:w-80 flex flex-col gap-4 shrink-0 h-full card p-6" id="pathway-inspector-container">
<div class="flex justify-between items-center mb-3">
<h3 class="font-bold text-[var(--primary)] uppercase tracking-wider text-xs flex items-center gap-1">
<span class="material-symbols-outlined text-[14px]">manage_search</span> Node Inspector
</h3>
<span class="text-[10px] text-[var(--text-light)] ml-auto normal-case tracking-normal">(Ctrl+Click for Multi)</span>
</div>
<h4 id="pw-detail-title" class="font-bold text-lg mb-2 text-[var(--text-main)]">Model Selection</h4>
<div id="pw-detail-content" class="text-sm text-body flex-1 overflow-y-auto space-y-3 pr-2">
Select your model types above, then click nodes in the graph to map the required governance monitors to their specific enterprise use cases.
</div>
<div class="mt-auto pt-4 border-t border-[var(--border)]">
<div class="text-[10px] uppercase font-bold text-[var(--text-light)]">System Component Identifier</div>
<div id="pw-detail-system" class="text-xs font-mono bg-[var(--panel-light)] border border-[var(--border)] text-[var(--text-main)] px-2 py-1 rounded mt-1 inline-block">modelop.model.registration</div>
</div>
</div>
<div class="card flex-1 flex flex-col min-h-[500px] lg:min-h-0 h-full overflow-hidden bg-[var(--panel-light)] border-[var(--border)] relative" id="pathway-card-container">
<button onclick="window.toggleFullscreen('pathway-card-container', 'pathway-inspector-container', 'pathway-filters-container')" class="absolute top-4 right-4 z-20 bg-[var(--panel-bg)] border border-[var(--border)] p-1.5 rounded hover:text-[var(--primary)] text-[var(--text-light)] shadow-sm transition-colors"><span class="material-symbols-outlined text-[18px]">fullscreen</span></button>
<div id="pathway-canvas" class="zoom-pan-wrapper w-full h-full">
<div class="animate-pulse text-[var(--text-light)] flex items-center justify-center w-full h-full gap-2"><span class="material-symbols-outlined animate-spin">sync</span> Generating Pathway Map...</div>
</div>
</div>
<div class="w-full lg:w-72 flex flex-col gap-4 shrink-0 h-full card p-6" id="pathway-filters-container">
<div class="flex justify-between items-center mb-3">
<h3 class="font-bold text-[var(--primary)] uppercase tracking-wider text-xs flex items-center gap-1">
<span class="material-symbols-outlined text-[16px]">filter_alt</span> Pathway Filters
</h3>
<button onclick="this.parentElement.nextElementSibling.classList.toggle('hidden')" class="text-[var(--text-light)] hover:text-[var(--primary)]"><span class="material-symbols-outlined text-[16px]">unfold_less</span></button>
</div>
<div class="transition-all flex flex-col flex-1">
<p class="text-xs text-[var(--text-light)] mb-4">Toggle model types below to dynamically generate the recommended monitor pathway branches.</p>
<div class="space-y-3">
<label class="flex items-center gap-3 text-sm text-[var(--text-main)] cursor-pointer hover:bg-[var(--panel-light)] p-2 rounded transition-colors border border-transparent hover:border-[var(--border)]">
<input type="checkbox" id="cb-class" class="accent-primary w-4 h-4" checked onchange="window.renderPathwayERD()"> <span class="font-medium">Classification Models</span>
</label>
<label class="flex items-center gap-3 text-sm text-[var(--text-main)] cursor-pointer hover:bg-[var(--panel-light)] p-2 rounded transition-colors border border-transparent hover:border-[var(--border)]">
<input type="checkbox" id="cb-reg" class="accent-primary w-4 h-4" checked onchange="window.renderPathwayERD()"> <span class="font-medium">Regression Models</span>
</label>
<label class="flex items-center gap-3 text-sm text-[var(--text-main)] cursor-pointer hover:bg-[var(--panel-light)] p-2 rounded transition-colors border border-transparent hover:border-[var(--border)]">
<input type="checkbox" id="cb-llm" class="accent-primary w-4 h-4" checked onchange="window.renderPathwayERD()"> <span class="font-medium">GenAI & LLMs</span>
</label>
</div>
<div class="mt-4 pt-4 border-t border-[var(--border)]">
<h4 class="font-bold text-[var(--text-main)] text-xs mb-2">Industry Context Presets</h4>
<select class="w-full text-sm bg-[var(--bg-color)] border border-[var(--border)] text-[var(--text-main)] rounded p-1 mb-2" onchange="window.applyIndustryTemplate(this.value, 'pathway')">
<option value="">-- Standard Enterprise --</option>
<option value="banking">Banking (Fraud/AML)</option>
<option value="credit">Credit (Underwriting)</option>
<option value="healthcare">Healthcare (Diagnosis/PHI)</option>
<option value="causality">Causality (Marketing Lift)</option>
</select>
<div id="pathway-industry-rec" class="text-xs text-[var(--primary)] font-medium hidden p-2 bg-[var(--panel-light)] rounded border border-[var(--primary)] mt-2"></div>
</div>
<div class="mt-auto pt-4 border-t border-[var(--border)]">
<p class="text-[10px] text-[var(--text-light)] leading-tight italic flex items-start gap-1">
<span class="material-symbols-outlined text-[12px] shrink-0">info</span>
Disclaimer: This is an enablement tool intended for guidance and is not to be used for final or automated business decision making.
</p>
</div>
</div>
</div>
</div>
</section>
<!-- SECTION 4: ERD Architecture -->
<section id="architecture" class="page-section max-w-6xl mx-auto">
<div class="flex flex-col md:flex-row justify-between items-start md:items-end mb-10 gap-4">
<div>
<h2 class="text-3xl font-bold mb-4 tracking-tight">Key Concepts: Execution Architectures</h2>
<p class="text-body text-lg">Interact with the architecture diagrams below. Toggle between standard monitoring and agentic LLM patterns.</p>
</div>
<div class="bg-[var(--panel-light)] p-1 rounded-lg border border-[var(--border)] flex shrink-0">
<button id="btn-arch-standard" onclick="window.switchArchitecture('standard')" class="px-4 py-2 rounded-md text-sm font-semibold transition-all bg-[var(--primary)] text-white shadow-sm">Standard Monitor</button>
<button id="btn-arch-agentic" onclick="window.switchArchitecture('agentic')" class="px-4 py-2 rounded-md text-sm font-semibold text-[var(--text-light)] hover:text-[var(--text-main)] transition-all">Agentic LLM</button>
</div>
</div>
<!-- Standard ERD Canvas -->
<div id="arch-standard-container" class="flex flex-col lg:flex-row gap-8 relative lg:h-[600px]">
<div class="w-full lg:w-80 flex flex-col gap-4 shrink-0 h-full" id="arch-controls">
<div class="card p-6 h-full flex flex-col min-h-[300px] lg:min-h-0">
<div class="flex justify-between items-center mb-3">
<h3 class="font-bold text-[var(--primary)] uppercase tracking-wider text-xs flex items-center gap-1">
<span class="material-symbols-outlined text-[14px]">manage_search</span> Node Inspector
</h3>
<span class="text-[10px] text-[var(--text-light)] ml-auto normal-case tracking-normal">Ctrl+Click multi</span>
</div>
<h4 id="erd-detail-title" class="font-bold text-xl mb-3 text-[var(--text-main)]">Execution Process</h4>
<div id="erd-detail-content" class="text-sm text-body space-y-3 flex-1 overflow-y-auto pr-2">
<p>Select a node in the diagram to view its details.</p>
<ol class="list-decimal pl-4 space-y-2 mt-4 text-xs text-[var(--text-light)]">
<li>Process initiated (via UI/API)</li>
<li>Metrics job created (via MLC)</li>
<li>Job sent to Runtime</li>
<li>Runtime loads datasets & code</li>
<li>Runtime executes Python source</li>
<li>Output yielded as JSON</li>
<li>Model Test Result attached</li>
</ol>
</div>
<div class="mt-auto pt-4 border-t border-[var(--border)]" id="erd-sys-wrapper">
<div class="text-[10px] uppercase font-bold text-[var(--text-light)]">System Component Identifier</div>
<div id="erd-detail-system" class="text-xs font-mono bg-[var(--panel-light)] border border-[var(--border)] text-[var(--text-main)] px-2 py-1 rounded mt-1 inline-block">modelop.core</div>
</div>
</div>
</div>
<div class="card flex-1 flex flex-col min-h-[500px] lg:min-h-0 h-full overflow-hidden relative" id="erd-card-container">
<button onclick="window.toggleFullscreen('erd-card-container', 'arch-controls')" class="absolute top-4 right-4 z-20 bg-[var(--panel-bg)] border border-[var(--border)] p-1.5 rounded hover:text-[var(--primary)] text-[var(--text-light)] shadow-sm transition-colors"><span class="material-symbols-outlined text-[18px]">fullscreen</span></button>
<div id="erd-canvas" class="zoom-pan-wrapper w-full h-full">
<div class="animate-pulse text-[var(--text-light)] flex items-center justify-center w-full h-full gap-2"><span class="material-symbols-outlined animate-spin">sync</span> Generating Architecture Map...</div>
</div>
</div>
</div>
<!-- Agentic Viz.js Canvas -->
<div id="arch-agentic-container" class="hidden flex-col lg:flex-row gap-8 transition-all relative lg:h-[600px]">
<div class="w-full lg:w-80 flex flex-col gap-4 shrink-0 h-full" id="agentic-controls">
<div class="card p-6 h-full flex flex-col min-h-[300px] lg:min-h-0">
<div class="flex justify-between items-center mb-3">
<h3 class="font-bold text-[var(--primary)] uppercase tracking-wider text-xs flex items-center gap-1">
<span class="material-symbols-outlined text-[14px]">manage_search</span> Node Inspector
</h3>
<span class="text-[10px] text-[var(--text-light)] ml-auto normal-case tracking-normal">Ctrl+Click multi</span>
</div>
<h4 id="erd-agentic-detail-title" class="font-bold text-xl mb-3 text-[var(--text-main)]">Agentic Architecture</h4>
<div id="erd-agentic-detail-content" class="text-sm text-body space-y-3 flex-1 overflow-y-auto pr-2">
<p>Select a node in the diagram to view its details.</p>
<ul class="list-disc pl-4 space-y-2 mt-4 text-xs text-[var(--text-light)]">
<li>Autonomous reasoning & planning</li>
<li>Tool and API execution (MCP)</li>
<li>Multi-agent orchestration</li>
<li>Guardrail validations</li>
<li>Continuous LLM monitoring</li>
</ul>
</div>
<div class="mt-auto pt-4 border-t border-[var(--border)]" id="agentic-sys-wrapper">
<div class="text-[10px] uppercase font-bold text-[var(--text-light)]">System Component Identifier</div>
<div id="erd-agentic-detail-system" class="text-xs font-mono bg-[var(--panel-light)] border border-[var(--border)] text-[var(--text-main)] px-2 py-1 rounded mt-1 inline-block">modelop.agent</div>
</div>
</div>
</div>
<div class="card flex-1 flex flex-col min-h-[500px] lg:min-h-0 h-full overflow-hidden relative" id="agentic-card-container">
<button onclick="window.toggleFullscreen('agentic-card-container', 'agentic-controls')" class="absolute top-4 right-4 z-20 bg-[var(--panel-bg)] border border-[var(--border)] p-1.5 rounded hover:text-[var(--primary)] text-[var(--text-light)] shadow-sm transition-colors"><span class="material-symbols-outlined text-[18px]">fullscreen</span></button>
<div id="erd-agentic-canvas" class="zoom-pan-wrapper w-full h-full">
<div class="animate-pulse text-[var(--text-light)] flex items-center justify-center w-full h-full gap-2"><span class="material-symbols-outlined animate-spin">sync</span> Generating Architecture Map...</div>
</div>
</div>
</div>
</section>
<!-- SECTION 5: Artifact Explorer -->
<section id="artifacts" class="page-section max-w-6xl mx-auto">
<div class="mb-10">
<h2 class="text-3xl font-bold mb-4 tracking-tight">Artifact Explorer & Generator</h2>
<p class="text-body text-lg">A custom monitor is defined by specific files in a Git repository. Explore the required structure and generate contextual Data Science code boilerplates.</p>
</div>
<div class="flex flex-col lg:flex-row gap-8">
<div class="w-full lg:w-[280px] xl:w-1/4 space-y-4 shrink-0">
<div class="text-xs font-bold text-[var(--text-light)] uppercase tracking-widest mb-2 flex items-center gap-1">
<span class="material-symbols-outlined text-[14px]">verified</span> Required Files
</div>
<div id="card-py" class="card p-4 interactive-card selected" onclick="window.showArtifact('py')">
<h4 class="font-bold text-[14px] flex items-center justify-between text-[var(--text-main)]">custom_metrics.py <span class="material-symbols-outlined text-[16px] text-[var(--primary)]">terminal</span></h4>
<p class="text-xs text-body mt-1">Primary Model Source Code</p>
</div>
<div id="card-json" class="card p-4 interactive-card" onclick="window.showArtifact('json')">
<h4 class="font-bold text-[14px] flex items-center justify-between text-[var(--text-main)]">metadata.json <span class="material-symbols-outlined text-[16px] text-blue-500">data_object</span></h4>
<p class="text-xs text-body mt-1">Monitor Classification Meta</p>
</div>
<div id="card-req" class="card p-4 interactive-card" onclick="window.showArtifact('req')">
<h4 class="font-bold text-[14px] flex items-center justify-between text-[var(--text-main)]">required_assets.json <span class="material-symbols-outlined text-[16px] text-orange-500">list_alt</span></h4>
<p class="text-xs text-body mt-1">Input Data Definitions</p>
</div>
</div>
<div class="flex-1 w-full min-w-0">
<div class="card p-0 flex flex-col overflow-hidden h-full min-h-[600px]">
<div class="p-6 border-b border-[var(--border)] bg-[var(--panel-light)] shrink-0">
<h3 id="art-title" class="text-lg font-bold text-[var(--text-main)] font-mono">custom_metrics.py</h3>
<p id="art-desc" class="text-body text-sm mt-2">The algorithmic brain. Use the pills below to generate boilerplate logic for different Data Science use cases.</p>
<div id="template-selector" class="flex flex-wrap gap-2 mt-4">
<button class="template-pill active" data-type="class" onclick="window.switchTemplate('class')">Classification</button>
<button class="template-pill" data-type="drift" onclick="window.switchTemplate('drift')">Data Drift (SciPy)</button>
<button class="template-pill" data-type="llm" onclick="window.switchTemplate('llm')">LLM Validation</button>
</div>
</div>
<div class="relative flex-1 group bg-[var(--code-bg)] overflow-hidden flex flex-col">
<button onclick="window.copyArtifactCode(this)" class="absolute top-4 right-4 py-1.5 px-3 bg-[#2d2d2d] hover:bg-[#3d3d3d] border border-[#444] rounded text-xs text-gray-200 flex items-center gap-1.5 transition-all opacity-0 group-hover:opacity-100 z-10 focus:opacity-100 shadow-md">
<span class="material-symbols-outlined text-[14px] copy-icon">content_copy</span> <span class="copy-text">Copy</span>
</button>
<pre class="flex-1 m-0 rounded-none border-none p-6 text-[#e5e7eb] overflow-auto"><code id="art-code" class="language-python"></code></pre>
</div>
</div>
</div>
</div>
</section>
<!-- SECTION 6: Deployment -->
<section id="deployment" class="page-section max-w-4xl mx-auto">
<div class="mb-10">
<h2 class="text-3xl font-bold mb-4 tracking-tight">Onboarding Roadmap</h2>
<p class="text-body text-lg">Follow this interactive guide to promote your custom monitor from a local IDE script into a production-ready ModelOp asset.</p>
</div>
<div class="space-y-4 relative ml-4 md:ml-0">
<div class="absolute left-[23px] top-8 bottom-8 w-0.5 bg-[var(--border)] z-0"></div>
<div class="accordion-item active relative flex items-start gap-6 group cursor-pointer" onclick="window.toggleAccordion(this)">
<div class="step-marker w-12 h-12 rounded-full bg-[var(--panel-bg)] border-[3px] border-[var(--primary)] text-[var(--primary)] flex items-center justify-center font-bold shrink-0 z-10 shadow-sm transition-colors">1</div>
<div class="card p-6 w-full transition-all">
<div class="flex justify-between items-center">
<h4 class="font-bold text-[17px] text-[var(--text-main)] flex items-center gap-2"><span class="material-symbols-outlined text-[var(--text-light)] text-[18px]">cloud_upload</span> Connect Git Repository</h4>
<span class="material-symbols-outlined text-[var(--text-light)] transition-transform duration-300">expand_more</span>
</div>
<div class="accordion-content text-sm text-body">
<p>Import your custom code via the ModelOp UI. Navigate to <strong>Monitors > Add Monitor</strong> and select "Git".</p>
<ul class="list-disc pl-5 mt-2 space-y-1 text-xs">
<li>Provide the Repository URL and target Branch.</li>
<li>Assign an Access Group to control viewing permissions.</li>
<li>The system automatically scans for the <code>metrics()</code> entry point.</li>
</ul>
</div>
</div>
</div>
<div class="accordion-item relative flex items-start gap-6 group cursor-pointer" onclick="window.toggleAccordion(this)">
<div class="step-marker w-12 h-12 rounded-full bg-[var(--panel-bg)] border-[3px] border-[var(--border)] text-[var(--text-light)] flex items-center justify-center font-bold shrink-0 z-10 shadow-sm transition-colors">2</div>
<div class="card p-6 w-full transition-all border-transparent">
<div class="flex justify-between items-center">
<h4 class="font-bold text-[17px] text-[var(--text-main)] flex items-center gap-2"><span class="material-symbols-outlined text-[var(--text-light)] text-[18px]">camera</span> Freeze a Snapshot</h4>
<span class="material-symbols-outlined text-[var(--text-light)] transition-transform duration-300">chevron_right</span>
</div>
<div class="accordion-content text-sm text-body">
<p>Snapshots create an immutable version of your monitor code linked to a specific commit.</p>
<p class="mt-2 text-xs">This guarantees production stability, ensuring that subsequent commits to the Git branch don't silently alter or break actively scheduled tests.</p>
</div>
</div>
</div>
<div class="accordion-item relative flex items-start gap-6 group cursor-pointer" onclick="window.toggleAccordion(this)">
<div class="step-marker w-12 h-12 rounded-full bg-[var(--panel-bg)] border-[3px] border-[var(--border)] text-[var(--text-light)] flex items-center justify-center font-bold shrink-0 z-10 shadow-sm transition-colors">3</div>
<div class="card p-6 w-full transition-all border-transparent">
<div class="flex justify-between items-center">
<h4 class="font-bold text-[17px] text-[var(--text-main)] flex items-center gap-2"><span class="material-symbols-outlined text-[var(--text-light)] text-[18px]">link</span> Map Data & Execute</h4>
<span class="material-symbols-outlined text-[var(--text-light)] transition-transform duration-300">chevron_right</span>
</div>
<div class="accordion-content text-sm text-body">
<p>Attach the monitor snapshot to your Business Model's "Monitoring" tab.</p>
<ul class="list-disc pl-5 mt-2 space-y-1 text-xs">
<li>The UI will prompt you to map specific data assets as defined in your <code>required_assets.json</code>.</li>
<li>Click <strong>Play</strong> to spawn the Job and yield your metrics.</li>
</ul>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
<script>
// --- Single Global Source of Truth for State ---
window.isDarkMode = false;
window.isMenuOpen = false;
window.isSidebarMinimized = false;
window.currentTemplate = 'class';
window.currentMetricMarkdown = '';
window.tooltipTimeout = null;
// Viz Selection States
window.expandedNodeId = null;
window.selectedNodesErd = new Set();
window.selectedNodesAgentic = new Set();
window.selectedNodesPathway = new Set();
// --- Data Science Metrics Dictionary ---
window.metricData = {
'pii': { title: 'PII/PHI Disclosure Detection', desc: 'Flags when outputs contain personal identifiers.', formula: '', biz: 'Compares generated LLM outputs against known patterns (Ground Truth) to mitigate Regulatory Breach.', grc: 'Direct lens into privacy.', model: 'Indicates prompts are leaking sensitive data.' },
'prompt_template': { title: 'Prompt Template Verification', desc: 'Checks whether prompts follow approved templates.', formula: '', biz: 'Compares user-submitted prompt structures against corporate guidelines.', grc: 'Limits “shadow prompting”.', model: 'Ensures consistent prompts.' },
'rails': { title: 'Rails Compliance', desc: 'Tests whether responses obey your RAILs / policy rules.', formula: '', biz: 'Compares semantic intent against predefined corporate safety boundaries.', grc: 'Links AI behavior to standards.', model: 'Pinpoints where guardrails fail.' },
'sentiment': { title: 'Sentiment Analysis', desc: 'Measures emotional tone of responses.', formula: '', biz: 'Compares emotional polarity against acceptable standards.', grc: 'Guards against hostile communications.', model: 'Helps tune prompts.' },
'sbert': { title: 'SBERT Similarity', desc: 'Scores how close an answer’s meaning is to a reference answer.', formula: 'sim ≈ (A·B) ÷ (‖A‖·‖B‖)', biz: 'Compares vectorized semantic meaning against a ground-truth "gold standard".', grc: 'Shows if responses align with "good" examples.', model: 'Fast semantic check.' },
'cross_llm': { title: 'Cross‑LLM Validation', desc: 'Uses another tool to verify if answers are factual.', formula: '', biz: 'Compares claims against an evaluative judge model.', grc: 'Extra defense against hallucinations.', model: 'Practical way to spot wrong answers.' },
'pred_pos_disp': { title: 'Predicted Positive Disparity', desc: 'Compares positive‑prediction rates across groups.', formula: '∝ ‖P(ŷ=1│A) − P(ŷ=1│B)‖', biz: 'Compares favorable inferences between demographic groups.', grc: 'Direct fairness signal.', model: 'Shows where thresholds create unequal access.' },
'for_disp': { title: 'False Omission Rate Disparity', desc: 'Compares missed positives in “negative” decisions.', formula: 'FOR = FN ÷ (FN + TN)', biz: 'Compares missed ground truth risk across groups.', grc: 'Surfaces under‑treatment.', model: 'Helps avoid overlooking risk.' },
'fdr_disp': { title: 'FDR Disparity', desc: 'Compares how often positive predictions are wrong.', formula: 'FDR = FP ÷ (TP + FP)', biz: 'Compares incorrect positive predictions across groups.', grc: 'Shows false accusation bias.', model: 'Guides rebalancing.' },
'mae': { title: 'MAE', desc: 'Average size of prediction errors, ignoring direction.', formula: 'MAE = (1 ÷ n)·Σ‖ŷᵢ − yᵢ‖', biz: 'Compares magnitude against actual values to measure financial miss.', grc: 'Easy “average miss”.', model: 'Straightforward loss measure.' },
'rmse': { title: 'RMSE', desc: 'Error metric that penalizes large misses more strongly.', formula: 'RMSE = √[(1 ÷ n)·Σ(ŷᵢ − yᵢ)²]', biz: 'Compares squared differences to highlight tail risk.', grc: 'Highlights occasional big errors.', model: 'Sensitive to outliers.' },
'r2': { title: 'R‑Squared', desc: 'Share of outcome variance explained by the model.', formula: 'R² = 1 − (SS_res ÷ SS_tot)', biz: 'Compares captured variance against total variance.', grc: 'Explains outcome drivers.', model: 'Goodness‑of‑fit metric.' },
'gini': { title: 'Gini Coefficient', desc: 'Measures how well scores separate cases.', formula: 'Gini ≈ 2·AUC − 1', biz: 'Compares cumulative distribution against actual default occurrences.', grc: 'Familiar credit‑risk summary.', model: 'Go‑to ranking metric.' },
'cstat': { title: 'C‑Stat', desc: 'Probability that a higher‑risk gets a higher score.', formula: '', biz: 'Compares rank-ordering of predictions against observed outcomes.', grc: 'Intuitive indicator.', model: 'Standard in credit‑risk.' },
'rank_break': { title: 'Rank‑Order Break Analysis', desc: 'Checks that higher score bands correspond to higher risk.', formula: '', biz: 'Compares progression of score buckets against actual default rates.', grc: 'Detects scorecard behavioral shifts.', model: 'Flags bucket ordering flips.' },
'accuracy': { title: 'Accuracy', desc: 'Percent of predictions that are simply correct.', formula: 'Accuracy = (TP + TN) ÷ (TP + TN + FP + FN)', biz: 'Compares correct inferences against total volume.', grc: 'Fast, intuitive check.', model: 'Baseline score.' },
'auc': { title: 'AUC–ROC', desc: 'Summarizes model separation across thresholds.', formula: '', biz: 'Compares rank-order capability against random guess.', grc: 'Risk vs non‑risk ranking.', model: 'Robust imbalanced data metric.' },
'precision': { title: 'Precision', desc: 'Of positive predictions, how many were true?', formula: 'Precision = TP ÷ (TP + FP)', biz: 'Compares true positive outcomes against positive predictions.', grc: 'Model trust factor.', model: 'Key for false alarm cost.' },
'recall': { title: 'Recall', desc: 'Of all real positives, how many caught?', formula: 'Recall = TP ÷ (TP + FN)', biz: 'Compares captured true positives against actual ground truth.', grc: 'Missed risk/opportunity.', model: 'Critical for dangerous misses.' },
'f1': { title: 'F1‑Score', desc: 'Single number balancing precision and recall.', formula: 'F1 = 2·(P·R) ÷ (P + R)', biz: 'Compares harmonic mean against theoretical perfection.', grc: 'Balanced quality view.', model: 'Trade-off management.' },
'cm': { title: 'Confusion Matrix', desc: 'Breaks results into TP, FP, TN, FN.', formula: '', biz: 'Compares discrete counts against exact ground truth.', grc: 'Trade‑offs visible.', model: 'Raw counts derivation.' },
'ks': { title: 'KS Test', desc: 'Checks if data distribution looks different.', formula: 'KS ≈ max‖F₀(x) − F₁(x)‖', biz: 'Compares production inputs against training baseline.', grc: 'Flags quiet shifts.', model: 'Early warning for retraining.' },
'epps': { title: 'Epps–Singleton', desc: 'Test for “same vs different” distributions.', formula: '', biz: 'Compares recent batches against expected patterns.', grc: 'Adds confidence to alerts.', model: 'Second opinion drift check.' },
'jsd': { title: 'Jensen–Shannon', desc: 'Symmetric distance between distributions.', formula: 'JSD(P‖Q) = ½·KL(P‖M) + ½·KL(Q‖M)', biz: 'Compares current features against reference to quantify staleness.', grc: 'Simple drift score.', model: 'Compact tracking number.' },
'kl': { title: 'Kullback–Leibler', desc: 'Measures "surprise" of new data.', formula: 'KL(P‖Q) = ΣPᵢ·log(Pᵢ ÷ Qᵢ)', biz: 'Compares likelihood under original assumptions vs reality.', grc: 'Quantifies scenario moves.', model: 'Checks model assumptions.' }
};
// --- Core UI Interactions ---
window.toggleSidebarSize = function() {
window.isSidebarMinimized = !window.isSidebarMinimized;
const sb = document.getElementById('sidebar');
const icon = document.getElementById('sidebar-icon');
if (window.isSidebarMinimized) {
sb.classList.replace('sidebar-expanded', 'sidebar-minimized');
icon.innerText = 'keyboard_double_arrow_right';
} else {
sb.classList.replace('sidebar-minimized', 'sidebar-expanded');
icon.innerText = 'keyboard_double_arrow_left';
}
setTimeout(() => {
if(window.capChartObj) window.capChartObj.resize();
}, 310);
};
window.switchTab = function(btn, tabId) {
document.querySelectorAll('.nav-btn').forEach(b => b.classList.remove('active'));
document.querySelectorAll('.page-section').forEach(s => s.classList.remove('active'));
if(btn) btn.classList.add('active');
const target = document.getElementById(tabId);
if (target) target.classList.add('active');
if(tabId === 'architecture') {
setTimeout(() => {
window.renderERD();
if(!document.getElementById('arch-agentic-container').classList.contains('hidden')) {
window.renderERDAgentic();
}
}, 50);
}
if(tabId === 'pathway') setTimeout(window.renderPathwayERD, 50);
if(tabId !== 'catalog') {
const copyContainer = document.getElementById('quick-copy-container');
copyContainer.classList.remove('opacity-100');
copyContainer.classList.add('opacity-0');
setTimeout(() => { copyContainer.classList.add('hidden'); }, 300);
}
if(window.isMenuOpen) window.toggleMobileMenu();
};
window.toggleMobileMenu = function() {
window.isMenuOpen = !window.isMenuOpen;
const sb = document.getElementById('sidebar');
const overlay = document.getElementById('mobile-overlay');
if(window.isMenuOpen) {
sb.classList.remove('-translate-x-full');
overlay.classList.remove('hidden');
} else {
sb.classList.add('-translate-x-full');
overlay.classList.add('hidden');
}
};
window.toggleTheme = function() {
window.isDarkMode = !window.isDarkMode;
document.body.classList.toggle('dark-mode', window.isDarkMode);
const iconName = window.isDarkMode ? 'dark_mode' : 'light_mode';
document.getElementById('theme-icon').innerText = iconName;
document.getElementById('theme-icon-mobile').innerText = iconName;
window.initChart();
if (document.getElementById('architecture').classList.contains('active')) {
window.renderERD();
if(!document.getElementById('arch-agentic-container').classList.contains('hidden')) window.renderERDAgentic();
}
if (document.getElementById('pathway').classList.contains('active')) window.renderPathwayERD();
};
window.toggleAccordion = function(element) {
document.querySelectorAll('.accordion-item').forEach(item => {
if (item !== element) {
item.classList.remove('active');
item.querySelector('.step-marker').classList.replace('border-[var(--primary)]', 'border-[var(--border)]');
item.querySelector('.step-marker').classList.replace('text-[var(--primary)]', 'text-[var(--text-light)]');
item.querySelector('.card').classList.add('border-transparent');
const icon = item.querySelector('.material-symbols-outlined.transition-transform');
icon.innerText = 'chevron_right';
icon.classList.remove('rotate-90');
}
});
const isActive = element.classList.contains('active');
if (!isActive) {
element.classList.add('active');
element.querySelector('.step-marker').classList.replace('border-[var(--border)]', 'border-[var(--primary)]');
element.querySelector('.step-marker').classList.replace('text-[var(--text-light)]', 'text-[var(--primary)]');
element.querySelector('.card').classList.remove('border-transparent');
const icon = element.querySelector('.material-symbols-outlined.transition-transform');
icon.innerText = 'expand_more';
}
};
window.showToast = function(message, type = "success") {
const container = document.getElementById('toast-container');
const toast = document.createElement('div');
toast.className = 'toast ' + type;
toast.innerHTML = `<span class="material-symbols-outlined">${type === 'success' ? 'check_circle' : 'error'}</span> ${message}`;
container.appendChild(toast);
setTimeout(() => toast.classList.add('show'), 10);
setTimeout(() => {
toast.classList.remove('show');
setTimeout(() => toast.remove(), 300);
}, 3000);
};
// --- Slide Export Engine (HTML2Canvas) ---
window.generateSlideContentFromNodes = function(selectedSet, detailsMap, defaultTitle, defaultDesc, containerSelector) {
if (selectedSet.size === 0) {
const visibleNodeElems = document.querySelectorAll(`${containerSelector} .node`);
const visibleIds = Array.from(visibleNodeElems).map(el => el.getAttribute('id'));
let html = `<div style="margin-bottom:15px; color: ${window.isDarkMode ? '#e5e7eb' : '#1e293b'};"><b>${defaultTitle}</b><br><span style="color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">${defaultDesc}</span></div><div style="font-size:12px; display:flex; flex-direction:column; gap:10px; max-height:450px; padding-right:10px; overflow-y:auto;">`;
visibleIds.forEach(id => {
const val = detailsMap[id];
if (val) {
html += `<div><b style="color:#00a962; font-size:13px;">${val.title}</b><br><span style="color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">${val.text}</span></div>`;
}
});
html += `</div>`;
return { title: defaultTitle, content: html };
} else {
let html = `<div style="display:flex; flex-direction:column; gap:15px; overflow-y:auto; max-height:450px; padding-right:10px;">`;
selectedSet.forEach(id => {
const val = detailsMap[id];
if(val) html += `<div><b style="color:#00a962; font-size:16px;">${val.title}</b><br><span style="font-size:14px; color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">${val.text}</span><br><code style="font-size:11px; color:#94a3b8; background:rgba(128,128,128,0.15); padding:2px 4px; border-radius:4px; margin-top:4px; display:inline-block;">${val.sys}</code></div>`;
});
html += `</div>`;
return { title: selectedSet.size > 1 ? 'Selected Components' : detailsMap[Array.from(selectedSet)[0]].title, content: html };
}
};
window.exportCurrentSlide = function() {
const stagingArea = document.getElementById('slide-staging-area');
const insetTitle = document.getElementById('slide-inset-title');
const insetContent = document.getElementById('slide-inset-content');
const visualArea = document.getElementById('slide-visual');
// Sync Theme Colors to Staging Area explicitly
if (window.isDarkMode) {
stagingArea.style.background = '#141414';
stagingArea.style.color = '#e5e7eb';
document.getElementById('slide-header').style.borderBottomColor = '#006630';
document.getElementById('slide-title').style.color = '#00a962';
document.getElementById('slide-subtitle').style.color = '#9ca3af';
document.getElementById('slide-inset').style.background = '#1e1e1e';
document.getElementById('slide-inset').style.borderColor = '#2e2e2e';
document.getElementById('slide-inset').style.boxShadow = '0 4px 6px rgba(0,0,0,0.5)';
insetTitle.style.color = '#e5e7eb';
visualArea.style.background = '#141414';
document.getElementById('slide-footer').style.color = '#64748b';
} else {
stagingArea.style.background = '#ffffff';
stagingArea.style.color = '#1e293b';
document.getElementById('slide-header').style.borderBottomColor = '#006630';
document.getElementById('slide-title').style.color = '#006630';
document.getElementById('slide-subtitle').style.color = '#64748b';
document.getElementById('slide-inset').style.background = '#f8fafc';
document.getElementById('slide-inset').style.borderColor = '#e2e8f0';
document.getElementById('slide-inset').style.boxShadow = '0 4px 6px rgba(0,0,0,0.05)';
insetTitle.style.color = '#1e293b';
visualArea.style.background = '#ffffff';
document.getElementById('slide-footer').style.color = '#94a3b8';
}
const activeTab = document.querySelector('.page-section.active').id;
visualArea.innerHTML = '';
if (activeTab === 'dashboard') {
insetTitle.innerText = "Value Proposition";
insetContent.innerHTML = `<span style="color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">Enterprise requirements demand unique calculations beyond standard OOTB metrics. ModelOp enables custom python monitors to integrate natively into enterprise-grade governance platforms. This ensures 'evidence' is always captured in an auditable format for risk and compliance.</span>`;
const img = new Image();
img.src = document.getElementById('capChart').toDataURL('image/png');
visualArea.appendChild(img);
window.triggerHtml2Canvas();
}
else if (activeTab === 'catalog') {
insetTitle.innerText = document.getElementById('tt-metric-title').innerText || "Metrics Catalog";
insetContent.innerHTML = `<span style="color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">${document.getElementById('tt-metric-desc').innerHTML || "ModelOp provides comprehensive governance tracking across Classification, Regression, Fairness, and GenAI LLM validations."}</span>`;
if (document.getElementById('tt-metric-formula') && document.getElementById('tt-metric-formula').innerText) {
insetContent.innerHTML += `<br><br><code style="color:#00a962; font-weight:bold;">${document.getElementById('tt-metric-formula').innerText}</code>`;
}
const sysContent = document.getElementById('tt-metric-biz') ? document.getElementById('tt-metric-biz').innerText : "";
if(sysContent) insetContent.innerHTML += `<br><br><b style="color:${window.isDarkMode ? '#e5e7eb' : '#1e293b'};">Business Impact:</b> <span style="color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">${sysContent}</span>`;
visualArea.innerHTML = `<div style="text-align:center; color:var(--text-light); font-size:24px; border: 2px dashed var(--border); padding: 40px; border-radius: 12px; height:100%; display:flex; flex-direction:column; justify-content:center;"><b>ModelOp Center v3.4</b><br>Governing Enterprise AI Data Science</div>`;
window.triggerHtml2Canvas();
}
else if (activeTab === 'pathway') {
const info = window.generateSlideContentFromNodes(window.selectedNodesPathway, window.pathwayDetails, "Selection Pathway", "Selecting the right AI monitor requires mapping the technical model type and data characteristics directly to enterprise business outcomes.", "#pathway-canvas");
insetTitle.innerText = info.title;
insetContent.innerHTML = info.content;
window.processSVGForSlide(document.querySelector('#pathway-canvas svg'), visualArea);
}
else if (activeTab === 'architecture') {
if (!document.getElementById('arch-standard-container').classList.contains('hidden')) {
const info = window.generateSlideContentFromNodes(window.selectedNodesErd, window.erdDetails, "Execution Architecture", "Orchestration combines Business Model context, Monitor assets, and Data references.", "#erd-canvas");
insetTitle.innerText = info.title;
insetContent.innerHTML = info.content;
window.processSVGForSlide(document.querySelector('#erd-canvas svg'), visualArea);
} else {
const info = window.generateSlideContentFromNodes(window.selectedNodesAgentic, window.agenticErdDetails, "Agentic Architecture", "Orchestration of Foundation Models, Tooling, and continuous telemetry monitoring.", "#erd-agentic-canvas");
insetTitle.innerText = info.title;
insetContent.innerHTML = info.content;
window.processSVGForSlide(document.querySelector('#erd-agentic-canvas svg'), visualArea);
}
}
else if (activeTab === 'artifacts') {
insetTitle.innerText = "Monitor Artifacts";
insetContent.innerHTML = `<span style="color: ${window.isDarkMode ? '#9ca3af' : '#475569'};">A custom monitor is defined by specific files in a Git repository, including primary source code, schema requirements, and metadata classifications.</span>`;
const codeText = document.getElementById('art-code').innerText;
const bgCol = window.isDarkMode ? '#141414' : '#1a1a1a';
visualArea.innerHTML = `<pre style="background:${bgCol}; color:#e5e7eb; padding:20px; border-radius:8px; font-family:monospace; font-size:13px; width:100%; height:100%; white-space:pre-wrap; overflow:hidden; border: 1px solid ${window.isDarkMode ? '#2e2e2e' : '#333333'}; box-sizing: border-box;">${codeText.substring(0, 1000)}${codeText.length > 1000 ? '\n... (truncated for slide)' : ''}</pre>`;
window.triggerHtml2Canvas();
}
else if (activeTab === 'deployment') {
insetTitle.innerText = "Deployment Workflow";
let listHtml = "<div style='display:flex; flex-direction:column; gap:30px; margin-top:20px;'>";
document.querySelectorAll('#deployment .accordion-item').forEach((item, index) => {
const titleRaw = item.querySelector('h4').innerText;
const title = titleRaw.replace(/expand_more|chevron_right/g, '').trim();
const desc = item.querySelector('.accordion-content p').innerText;
const txtColor = window.isDarkMode ? '#e5e7eb' : '#1e293b';
const detailColor = window.isDarkMode ? '#9ca3af' : '#64748b';
listHtml += `<div style="display:flex; gap:20px; align-items:flex-start;">
<div style="width:40px; height:40px; border-radius:50%; background:#006630; color:white; display:flex; align-items:center; justify-content:center; font-weight:bold; font-size:20px; flex-shrink:0;">${index+1}</div>
<div><h4 style="margin:0 0 5px 0; color:${txtColor}; font-size:20px;">${title}</h4><p style="margin:0; color:${detailColor}; font-size:15px;">${desc}</p></div>