// ============================================ // Mock Data — Simac Masic AI Vision Platform // ============================================ const MockData = { // ---- Users ---- users: [ { id: 'mgmt-1', email: 'management@masic.com', name: 'Admin User', role: 'management', customerId: null, avatar: 'AU' }, { id: 'west-1', email: 'operator@westpharma.com', name: 'Jan de Vries', role: 'customer', customerId: 'west', avatar: 'JD' }, { id: 'pharma-1', email: 'engineer@pharmapack.eu', name: 'Maria Schmidt', role: 'customer', customerId: 'pharma', avatar: 'MS' } ], // ---- Customer / Site / Equipment / Camera Hierarchy ---- hierarchy: [ { id: 'west', name: 'West Pharmaceutical', type: 'customer', icon: 'fa-building', iconClass: 'tree-node__icon--customer', children: [ { id: 'west-site-a', name: 'Site A — Heerlen', type: 'site', icon: 'fa-map-marker-alt', iconClass: 'tree-node__icon--site', children: [ { id: 'west-site-a-press01', name: 'Press-01', type: 'equipment', icon: 'fa-cog', iconClass: 'tree-node__icon--equipment', children: [ { id: 'west-site-a-press01-c5', name: 'C5 — Side View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 42 }, { id: 'west-site-a-press01-c6', name: 'C6 — Top View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 38 }, { id: 'west-site-a-press01-c7', name: 'C7 — Side View 2', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 35 }, { id: 'west-site-a-press01-c8', name: 'C8 — Side View 3', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 30 }, { id: 'west-site-a-press01-coat', name: 'Coating', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 25 } ] }, { id: 'west-site-a-press02', name: 'Press-02', type: 'equipment', icon: 'fa-cog', iconClass: 'tree-node__icon--equipment', children: [ { id: 'west-site-a-press02-c5', name: 'C5 — Side View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 28 }, { id: 'west-site-a-press02-c6', name: 'C6 — Top View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 33 } ] } ] }, { id: 'west-site-b', name: 'Site B — NY', type: 'site', icon: 'fa-map-marker-alt', iconClass: 'tree-node__icon--site', children: [ { id: 'west-site-b-press01', name: 'Press-01', type: 'equipment', icon: 'fa-cog', iconClass: 'tree-node__icon--equipment', children: [ { id: 'west-site-b-press01-c5', name: 'C5 — Side View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 50 }, { id: 'west-site-b-press01-c6', name: 'C6 — Top View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 45 } ] } ] } ] }, { id: 'pharma', name: 'PharmaPack BV', type: 'customer', icon: 'fa-building', iconClass: 'tree-node__icon--customer', children: [ { id: 'pharma-site-a', name: 'Site A — Eindhoven', type: 'site', icon: 'fa-map-marker-alt', iconClass: 'tree-node__icon--site', children: [ { id: 'pharma-site-a-press01', name: 'Press-01', type: 'equipment', icon: 'fa-cog', iconClass: 'tree-node__icon--equipment', children: [ { id: 'pharma-site-a-press01-c5', name: 'C5 — Side View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 20 }, { id: 'pharma-site-a-press01-c6', name: 'C6 — Top View', type: 'camera', icon: 'fa-camera', iconClass: 'tree-node__icon--camera', imageCount: 15 } ] } ] } ] } ], // ---- Defect Categories ---- categories: [ { id: 'good', name: 'Good', type: 'good', icon: 'fa-check-circle', color: 'success' }, { id: 'd02', name: 'D02 — Fibres > 0.5mm', type: 'bad', icon: 'fa-wind', color: 'danger' }, { id: 'd07', name: 'D07 — Critical Defects', type: 'bad', icon: 'fa-exclamation-triangle', color: 'danger' }, { id: 'd08', name: 'D08 — Critical Trimming', type: 'bad', icon: 'fa-cut', color: 'warning' }, { id: 'unsorted', name: 'Unsorted', type: 'unsorted', icon: 'fa-inbox', color: 'info' } ], // ---- Sample Images (228 real sample set images) ---- // Sample set filenames by category (from synthetic dataset) sampleFilenames: { good: [ 'C5_20250101_3833330608_00021168_06tiff.tif', 'C5_20250105_3803701000_00021000_06tiff.tif', 'C5_20250117_3818515804_00021084_06tiff.tif', 'C5_20250505_3838268876_00021196_06tiff.tif', 'C5_20250509_3808639268_00021028_06tiff.tif', 'C5_20250521_3823454072_00021112_06tiff.tif', 'C5_20250913_3813577536_00021056_06tiff.tif', 'C5_20250925_3828392340_00021140_06tiff.tif', 'C6_20250202_3834565175_00021175_06tiff.tif', 'C6_20250206_3804935567_00021007_06tiff.tif', 'C6_20250218_3819750371_00021091_06tiff.tif', 'C6_20250606_3839503443_00021203_06tiff.tif', 'C6_20250610_3809873835_00021035_06tiff.tif', 'C6_20250622_3824688639_00021119_06tiff.tif', 'C6_20251014_3814812103_00021063_06tiff.tif', 'C6_20251026_3829626907_00021147_06tiff.tif', 'C7_20250303_3835799742_00021182_06tiff.tif', 'C7_20250307_3806170134_00021014_06tiff.tif', 'C7_20250319_3820984938_00021098_06tiff.tif', 'C7_20250711_3811108402_00021042_06tiff.tif', 'C7_20250723_3825923206_00021126_06tiff.tif', 'C7_20251115_3816046670_00021070_06tiff.tif', 'C7_20251127_3830861474_00021154_06tiff.tif', 'C8_20250404_3837034309_00021189_06tiff.tif', 'C8_20250408_3807404701_00021021_06tiff.tif', 'C8_20250420_3822219505_00021105_06tiff.tif', 'C8_20250812_3812342969_00021049_06tiff.tif', 'C8_20250824_3827157773_00021133_06tiff.tif', 'C8_20251216_3817281237_00021077_06tiff.tif', 'C8_20251228_3832096041_00021161_06tiff.tif' ], d02: [ 'C5_20250101_100000000_00000000_06tiff.tif', 'C5_20250101_203703628_00000588_06tiff.tif', 'C5_20250105_174074020_00000420_06tiff.tif', 'C5_20250109_144444412_00000252_06tiff.tif', 'C5_20250109_248148040_00000840_06tiff.tif', 'C5_20250113_114814804_00000084_06tiff.tif', 'C5_20250113_218518432_00000672_06tiff.tif', 'C5_20250117_188888824_00000504_06tiff.tif', 'C5_20250121_159259216_00000336_06tiff.tif', 'C5_20250121_262962844_00000924_06tiff.tif', 'C6_20250202_101234567_00000007_06tiff.tif', 'C6_20250202_204938195_00000595_06tiff.tif', 'C6_20250206_175308587_00000427_06tiff.tif', 'C6_20250210_145678979_00000259_06tiff.tif', 'C6_20250210_249382607_00000847_06tiff.tif', 'C7_20250303_102469134_00000014_06tiff.tif', 'C7_20250303_206172762_00000602_06tiff.tif', 'C7_20250307_176543154_00000434_06tiff.tif', 'C7_20250311_146913546_00000266_06tiff.tif', 'C7_20250311_250617174_00000854_06tiff.tif' ], d07: [ 'C5_20250101_2588887072_00014112_06tiff.tif', 'C5_20250113_2603701876_00014196_06tiff.tif', 'C5_20250117_2574072268_00014028_06tiff.tif', 'C5_20250125_2618516680_00014280_06tiff.tif', 'C5_20250501_2623454948_00014308_06tiff.tif', 'C5_20250505_2593825340_00014140_06tiff.tif', 'C5_20250517_2608640144_00014224_06tiff.tif', 'C5_20250521_2579010536_00014056_06tiff.tif', 'C5_20250905_2628393216_00014336_06tiff.tif', 'C5_20250909_2598763608_00014168_06tiff.tif', 'C6_20250202_2590121639_00014119_06tiff.tif', 'C6_20250214_2604936443_00014203_06tiff.tif', 'C6_20250218_2575306835_00014035_06tiff.tif', 'C6_20250226_2619751247_00014287_06tiff.tif', 'C6_20250602_2624689515_00014315_06tiff.tif', 'C7_20250303_2591356206_00014126_06tiff.tif', 'C7_20250315_2606171010_00014210_06tiff.tif', 'C7_20250319_2576541402_00014042_06tiff.tif', 'C7_20250327_2620985814_00014294_06tiff.tif', 'C7_20250703_2625924082_00014322_06tiff.tif' ], d08: [ 'C5_20250101_1344443536_00007056_06tiff.tif', 'C5_20250521_1334567000_00007000_06tiff.tif', 'C5_20250925_1339505268_00007028_06tiff.tif', 'C6_20250622_1335801567_00007007_06tiff.tif', 'C6_20251026_1340739835_00007035_06tiff.tif', 'C7_20250723_1337036134_00007014_06tiff.tif', 'C7_20251127_1341974402_00007042_06tiff.tif', 'C8_20250824_1338270701_00007021_06tiff.tif', 'C8_20251228_1343208969_00007049_06tiff.tif' ] }, // Demo images (subset of sample data for gallery view) images: [ // Good images (30 from sample set) { id: 'img-1', filename: 'C5_20250101_3833330608_00021168_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.2 MB', date: '2025-01-01', hasMask: false }, { id: 'img-2', filename: 'C5_20250105_3803701000_00021000_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '3.8 MB', date: '2025-01-05', hasMask: false }, { id: 'img-3', filename: 'C6_20250202_3834565175_00021175_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '5.1 MB', date: '2025-02-02', hasMask: false }, { id: 'img-4', filename: 'C7_20250303_3835799742_00021182_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.5 MB', date: '2025-03-03', hasMask: false }, { id: 'img-5', filename: 'C8_20250404_3837034309_00021189_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '3.9 MB', date: '2025-04-04', hasMask: false }, { id: 'img-6', filename: 'C5_20250505_3838268876_00021196_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.6 MB', date: '2025-05-05', hasMask: false }, { id: 'img-7', filename: 'C6_20250606_3839503443_00021203_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '5.0 MB', date: '2025-06-06', hasMask: false }, { id: 'img-8', filename: 'C7_20250711_3811108402_00021042_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.3 MB', date: '2025-07-11', hasMask: false }, { id: 'img-9', filename: 'C8_20250812_3812342969_00021049_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.1 MB', date: '2025-08-12', hasMask: false }, { id: 'img-10', filename: 'C5_20250913_3813577536_00021056_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.4 MB', date: '2025-09-13', hasMask: false }, // D02 images (fibres) — 20 from sample set { id: 'img-11', filename: 'C5_20250101_100000000_00000000_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.1 MB', date: '2025-01-01', hasMask: true }, { id: 'img-12', filename: 'C5_20250101_203703628_00000588_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.3 MB', date: '2025-01-01', hasMask: true }, { id: 'img-13', filename: 'C6_20250202_101234567_00000007_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.7 MB', date: '2025-02-02', hasMask: false }, { id: 'img-14', filename: 'C6_20250202_204938195_00000595_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.5 MB', date: '2025-02-02', hasMask: true }, { id: 'img-15', filename: 'C7_20250303_102469134_00000014_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '3.9 MB', date: '2025-03-03', hasMask: false }, { id: 'img-16', filename: 'C7_20250303_206172762_00000602_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.8 MB', date: '2025-03-03', hasMask: true }, { id: 'img-17', filename: 'C8_20250404_103703701_00000021_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.2 MB', date: '2025-04-04', hasMask: false }, { id: 'img-18', filename: 'C5_20250501_134567876_00000196_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.0 MB', date: '2025-05-01', hasMask: true }, // D07 images (critical) { id: 'img-19', filename: 'C5_20250101_2588887072_00014112_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.2 MB', date: '2025-01-01', hasMask: true }, { id: 'img-20', filename: 'C5_20250113_2603701876_00014196_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.4 MB', date: '2025-01-13', hasMask: true }, { id: 'img-21', filename: 'C6_20250202_2590121639_00014119_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.0 MB', date: '2025-02-02', hasMask: false }, { id: 'img-22', filename: 'C6_20250214_2604936443_00014203_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.3 MB', date: '2025-02-14', hasMask: true }, { id: 'img-23', filename: 'C7_20250303_2591356206_00014126_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '4.9 MB', date: '2025-03-03', hasMask: false }, { id: 'img-24', filename: 'C7_20250315_2606171010_00014210_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.1 MB', date: '2025-03-15', hasMask: true }, { id: 'img-25', filename: 'C8_20250404_2592590773_00014133_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '4.7 MB', date: '2025-04-04', hasMask: false }, // D08 images (trimming) { id: 'img-26', filename: 'C5_20250101_1344443536_00007056_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd08', isGood: false, size: '4.8 MB', date: '2025-01-01', hasMask: true }, { id: 'img-27', filename: 'C5_20250521_1334567000_00007000_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd08', isGood: false, size: '4.6 MB', date: '2025-05-21', hasMask: false }, { id: 'img-28', filename: 'C6_20250622_1335801567_00007007_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd08', isGood: false, size: '5.0 MB', date: '2025-06-22', hasMask: true }, { id: 'img-29', filename: 'C7_20250723_1337036134_00007014_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd08', isGood: false, size: '4.4 MB', date: '2025-07-23', hasMask: false }, { id: 'img-30', filename: 'C8_20250824_1338270701_00007021_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd08', isGood: false, size: '4.9 MB', date: '2025-08-24', hasMask: true }, // Additional sample images for variety { id: 'img-31', filename: 'C5_20250105_174074020_00000420_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.0 MB', date: '2025-01-05', hasMask: true }, { id: 'img-32', filename: 'C6_20250206_175308587_00000427_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.6 MB', date: '2025-02-06', hasMask: false }, { id: 'img-33', filename: 'C5_20250113_2603701876_00014196_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.2 MB', date: '2025-01-13', hasMask: true }, { id: 'img-34', filename: 'C6_20250214_2604936443_00014203_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.3 MB', date: '2025-02-14', hasMask: true }, { id: 'img-35', filename: 'C7_20250315_2606171010_00014210_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.1 MB', date: '2025-03-15', hasMask: true }, { id: 'img-36', filename: 'C5_20250109_144444412_00000252_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.3 MB', date: '2025-01-09', hasMask: true }, { id: 'img-37', filename: 'C6_20250210_145678979_00000259_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.4 MB', date: '2025-02-10', hasMask: false }, { id: 'img-38', filename: 'C7_20250307_176543154_00000434_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.7 MB', date: '2025-03-07', hasMask: true }, { id: 'img-39', filename: 'C8_20250408_177777721_00000441_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.1 MB', date: '2025-04-08', hasMask: false }, { id: 'img-40', filename: 'C5_20250505_2593825340_00014140_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.0 MB', date: '2025-05-05', hasMask: true }, { id: 'img-41', filename: 'C6_20250602_2624689515_00014315_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '5.4 MB', date: '2025-06-02', hasMask: false }, { id: 'img-42', filename: 'C7_20250703_2625924082_00014322_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd07', isGood: false, size: '4.8 MB', date: '2025-07-03', hasMask: true }, { id: 'img-43', filename: 'C8_20250804_241975205_00000805_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'd02', isGood: false, size: '4.5 MB', date: '2025-08-04', hasMask: false }, { id: 'img-44', filename: 'C5_20250509_3808639268_00021028_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '3.7 MB', date: '2025-05-09', hasMask: false }, { id: 'img-45', filename: 'C6_20250610_3809873835_00021035_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.2 MB', date: '2025-06-10', hasMask: false }, { id: 'img-46', filename: 'C7_20250723_3825923206_00021126_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.6 MB', date: '2025-07-23', hasMask: false }, { id: 'img-47', filename: 'C8_20250824_3827157773_00021133_06tiff.tif', camera: 'C8 — Side View 3', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.0 MB', date: '2025-08-24', hasMask: false }, { id: 'img-48', filename: 'C5_20250521_3823454072_00021112_06tiff.tif', camera: 'C5 — Side View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.3 MB', date: '2025-05-21', hasMask: false }, { id: 'img-49', filename: 'C6_20250622_3824688639_00021119_06tiff.tif', camera: 'C6 — Top View', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.7 MB', date: '2025-06-22', hasMask: false }, { id: 'img-50', filename: 'C7_20250711_3811108402_00021042_06tiff.tif', camera: 'C7 — Side View 2', equipment: 'Press-01', site: 'Site A', customer: 'west', category: 'good', isGood: true, size: '4.1 MB', date: '2025-07-11', hasMask: false } ], // ---- AI Models ---- models: [ { id: 'ad-standard-v1', name: 'AD-Standard v1', type: 'AD', // Anomaly Detection description: 'Unsupervised anomaly detection — standard threshold', selected: true }, { id: 'ad-sensitive-v2', name: 'AD-Sensitive v2', type: 'AD', description: 'Unsupervised anomaly detection — sensitive threshold', selected: false }, { id: 'ss-fibres-v1', name: 'SS-Fibres v1', type: 'SS', // Semantic Segmentation description: 'Pixel-level fibre defect segmentation', selected: false }, { id: 'ss-critical-v1', name: 'SS-Critical v1', type: 'SS', description: 'Critical defect (D07/D08) pixel segmentation', selected: false } ], // ---- Datasets ---- datasets: [ { id: 'west2257', name: 'West 2257 — Defect Kit', imageCount: 20, customer: 'west' }, { id: 'pharma01', name: 'PharmaPack 01 — Production Set', imageCount: 15, customer: 'pharma' } ], // ---- Quarantine Items ---- quarantineItems: [ { id: 'q-1', filename: 'C5_20240808_999999999_corrupt.tif', camera: 'C5 — Side View', category: 'Unknown', reason: 'corruption', date: '2024-08-08', size: '0 KB' }, { id: 'q-2', filename: 'C6_20240809_888888888_badmeta.jpg', camera: 'C6 — Top View', category: 'Unknown', reason: 'metadata', date: '2024-08-09', size: '1.2 MB' }, { id: 'q-3', filename: 'C5_20240810_777777777_suspicious.png', camera: 'C5 — Side View', category: 'Unknown', reason: 'security', date: '2024-08-10', size: '4.5 MB' }, { id: 'q-4', filename: 'C7_20240811_666666666_dup1.tif', camera: 'C7 — Side View 2', category: 'Unknown', reason: 'duplicate', date: '2024-08-11', size: '4.2 MB' }, { id: 'q-5', filename: 'C7_20240811_666666667_dup2.tif', camera: 'C7 — Side View 2', category: 'Unknown', reason: 'duplicate', date: '2024-08-11', size: '4.2 MB' }, { id: 'q-6', filename: 'C8_20240812_555555555_badfile.bmp', camera: 'C8 — Side View 3', category: 'Unknown', reason: 'corruption', date: '2024-08-12', size: '0 KB' }, { id: 'q-7', filename: 'C5_20240813_444444444_flagged.png', camera: 'C5 — Side View', category: 'Unknown', reason: 'security', date: '2024-08-13', size: '3.8 MB' }, { id: 'q-8', filename: 'C6_20240814_333333333_badmeta2.jpg', camera: 'C6 — Top View', category: 'Unknown', reason: 'metadata', date: '2024-08-14', size: '2.1 MB' } ], // ---- Validation Results (simulated) ---- validationResults: { 'ad-standard-v1': { accuracy: 0.97, precision: 0.95, recall: 0.96, f1: 0.955, falsePositiveRate: 0.02, rocData: [0.0, 0.05, 0.12, 0.20, 0.31, 0.42, 0.55, 0.65, 0.75, 0.82, 0.88, 0.92, 0.95, 0.97, 0.98, 0.99, 0.99, 1.0, 1.0, 1.0] }, 'ad-sensitive-v2': { accuracy: 0.94, precision: 0.91, recall: 0.98, f1: 0.944, falsePositiveRate: 0.06, rocData: [0.0, 0.08, 0.18, 0.30, 0.43, 0.56, 0.68, 0.78, 0.86, 0.92, 0.95, 0.97, 0.98, 0.99, 0.99, 1.0, 1.0, 1.0, 1.0, 1.0] }, 'ss-fibres-v1': { accuracy: 0.96, precision: 0.94, recall: 0.95, f1: 0.945, falsePositiveRate: 0.03, rocData: [0.0, 0.04, 0.10, 0.18, 0.28, 0.40, 0.52, 0.63, 0.73, 0.81, 0.88, 0.92, 0.95, 0.97, 0.98, 0.99, 0.99, 1.0, 1.0, 1.0] }, 'ss-critical-v1': { accuracy: 0.95, precision: 0.93, recall: 0.94, f1: 0.935, falsePositiveRate: 0.04, rocData: [0.0, 0.06, 0.14, 0.24, 0.36, 0.48, 0.60, 0.70, 0.79, 0.86, 0.91, 0.94, 0.96, 0.98, 0.99, 0.99, 1.0, 1.0, 1.0, 1.0] } }, // ---- System Status ---- systemServices: [ { name: 'Upload Service', status: 'online' }, { name: 'Validation Engine', status: 'online' }, { name: 'Security Scanner', status: 'online' }, { name: 'Label Assistant', status: 'limited' }, { name: 'Export Pipeline', status: 'online' }, { name: 'Synthetic Generator', status: 'online' } ], // ---- Recent Activity ---- activityLog: [ { type: 'upload', user: 'Jan de Vries', message: 'Uploaded 20 images to C5 — Side View', time: '2 hours ago' }, { type: 'flag', user: 'System', message: '3 images quarantined (corruption detected)', time: '3 hours ago' }, { type: 'complete', user: 'Maria Schmidt', message: 'Completed labeling for D02 dataset', time: '5 hours ago' }, { type: 'upload', user: 'Jan de Vries', message: 'Uploaded 15 images to C6 — Top View', time: '1 day ago' }, { type: 'complete', user: 'System', message: 'Dataset West 2257 marked as ready', time: '1 day ago' } ], // ---- Quick Actions ---- quickActions: [ { icon: 'fa-cloud-arrow-up', label: 'New Upload', view: 'upload' }, { icon: 'fa-database', label: 'View Dataset', view: 'dashboard' }, { icon: 'fa-images', label: 'Data Manager', view: 'gallery' }, { icon: 'fa-shield-halved', label: 'Quarantine', view: 'quarantine' }, { icon: 'fa-brain', label: 'AI Models', view: 'model-comparison' }, { icon: 'fa-pen-nib', label: 'Annotate', view: 'gallery' } ], // ---- Wizard Steps ---- wizardSteps: [ { step: 1, label: 'Source' }, { step: 2, label: 'Categories' }, { step: 3, label: 'Security' }, { step: 4, label: 'Buckets' }, { step: 5, label: 'Submit' } ], // ---- Pipeline Steps ---- pipelineSteps: [ { step: 1, label: 'Import', icon: 'fa-cloud-arrow-up' }, { step: 2, label: 'Extract', icon: 'fa-magnifying-glass-chart' }, { step: 3, label: 'Classify', icon: 'fa-tags' }, { step: 4, label: 'Validate', icon: 'fa-shield-halved' }, { step: 5, label: 'Enrich', icon: 'fa-vector-square' }, { step: 6, label: 'Ready', icon: 'fa-check-double' } ], // ---- Utility Methods ---- getUserById(id) { return this.users.find(u => u.id === id); }, getUserRoleDisplay(userId) { const user = this.getUserById(userId); if (!user) return { label: 'Unknown', badgeIcon: 'fa-circle-question' }; if (user.role === 'management') { return { label: 'Management', badgeIcon: 'fa-user-shield' }; } return { label: user.name.split(' ')[0] + ' — ' + this.getCustomerName(user.customerId), badgeIcon: 'fa-user' }; }, getCustomerName(customerId) { const map = { west: 'West Pharmaceutical', pharma: 'PharmaPack BV' }; return map[customerId] || customerId; }, isManagementUser(userId) { const user = this.getUserById(userId); return user && user.role === 'management'; }, isCustomerUser(userId) { const user = this.getUserById(userId); return user && user.role === 'customer'; }, getImagesByCustomer(customerId) { return this.images.filter(img => img.customer === customerId); }, getImagesByCamera(customerId, cameraName) { return this.images.filter(img => img.customer === customerId && img.camera === cameraName); }, getImageCountForNode(nodeId) { // Count images matching this node const node = this.findNodeInHierarchy(nodeId); if (!node) return 0; if (node.type === 'camera') { const customer = this.findCustomerNode(nodeId); return this.images.filter(img => img.camera === node.name && img.customer === customer.id).length; } // For parent nodes, sum up children let count = 0; const customer = this.findCustomerNode(nodeId); if (customer) { count = this.images.filter(img => img.customer === customer.id).length; } return count; }, findNodeInHierarchy(nodeId, nodes = null) { if (!nodes) nodes = this.hierarchy; for (const node of nodes) { if (node.id === nodeId) return node; if (node.children) { const found = this.findNodeInHierarchy(nodeId, node.children); if (found) return found; } } return null; }, findCustomerNode(nodeId) { // Extract customer id from nodeId (e.g., 'west-site-a-press01-c5' -> 'west') const parts = nodeId.split('-'); const first = parts[0]; const customerMap = { west: 'west', pharma: 'pharma' }; return this.hierarchy.find(c => c.id === customerMap[first]) || null; }, getTotalImages() { return this.images.length; }, getTotalCameras() { const cameras = []; const walk = (nodes) => { nodes.forEach(n => { if (n.type === 'camera') cameras.push(n); if (n.children) walk(n.children); }); }; walk(this.hierarchy); return cameras.length; } };