From 15a456a0ce8ae7abbe75cbcfb8b8ae9f5984eacf Mon Sep 17 00:00:00 2001 From: Rene Fichtmueller Date: Sat, 25 Apr 2026 21:29:25 +0200 Subject: [PATCH] fix: form factor detail panel shows only Flexoptix transceivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - API call: +&vendor=Flexoptix filter - Section renamed to 'Flexoptix-Lösungen' with favicon - Each row shows 'Shop ↗' link directly to flexoptix.net search - 'Show all' button labeled 'Alle X Flexoptix-{FF}-Produkte' - Primary button: flexoptix.net with form factor filter - Empty state: friendly message when no Flexoptix products yet --- packages/dashboard/index.html | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/dashboard/index.html b/packages/dashboard/index.html index 80f5bab..b98b52d 100644 --- a/packages/dashboard/index.html +++ b/packages/dashboard/index.html @@ -4861,9 +4861,10 @@ async function openFormFactorDetail(name) { // Open panel immediately with skeleton openPanel('
Lade ' + esc(name) + '…
'); - // Fetch transceivers for this form factor - var txData = await api('/api/transceivers?form_factor=' + encodeURIComponent(f.name) + '&limit=10').catch(function(){ return {}; }); + // Fetch Flexoptix transceivers for this form factor + var txData = await api('/api/transceivers?form_factor=' + encodeURIComponent(f.name) + '&vendor=Flexoptix&limit=10').catch(function(){ return {}; }); var txRows = txData.data || []; + var txTotal = txData.total || txRows.length; var h = ''; @@ -4950,39 +4951,42 @@ async function openFormFactorDetail(name) { // ── Transceivers in Catalog ──────────────────────────────────────────────── h += '
'; - h += '
'; - h += 'Unsere Transceiver (' + (f.transceiver_count || txRows.length) + ' in Datenbank)'; + h += '
'; + h += '
Flexoptix-Lösungen
'; + h += ''; + h += (txTotal > 0 ? '' + txTotal + ' verfügbar' : ''); h += '
'; if (txRows.length) { var speedColors2 = { 1600:'#7c3aed', 800:'#c1121f', 400:'#FF8100', 200:'#e6a800', 100:'#2d6a4f', 40:'#4287f5', 25:'#0ea5e9', 10:'#888', 1:'#555' }; h += '
'; - txRows.slice(0,8).forEach(function(t) { + txRows.forEach(function(t) { var spCol = speedColors2[t.speed_gbps] || '#888'; var reach = t.reach_label || (t.reach_meters ? (t.reach_meters >= 1000 ? (t.reach_meters/1000)+'km' : t.reach_meters+'m') : ''); + var shopUrl = 'https://www.flexoptix.net/en/search/ajax/suggest/?q=' + encodeURIComponent(t.part_number || ''); h += '
' + '' + (t.speed_gbps || '?') + 'G' + '' + esc(t.part_number || '—') + '' - + (t.vendor_name ? '' + esc(t.vendor_name) + '' : '') + (reach ? '' + esc(reach) + '' : '') + + 'Shop ↗' + '
'; }); h += '
'; - if ((f.transceiver_count || 0) > 8) { + if (txTotal > 10) { h += ''; + + 'Alle ' + txTotal + ' Flexoptix-' + esc(f.name) + '-Produkte anzeigen →'; } } else { - h += '
Noch keine Transceiver in der Datenbank.
'; + h += '
Noch keine Flexoptix-Produkte für ' + esc(f.name) + ' in der Datenbank.
'; } h += '
'; // ── Action buttons ───────────────────────────────────────────────────────── h += '
'; - h += ''; - h += 'flexoptix.net ↗'; + + 'TIP DB →'; h += '
'; // ── Technical notes ────────────────────────────────────────────────────────