diff --git a/frontend/index.html b/frontend/index.html index cd55d5a..b3ca784 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -7095,7 +7095,7 @@ async function profilerCheck(i) { } async function profilerRunRule(r) { - const res = { path: r.path, status: 'pass', checks: [] }; + const res = { path: r.path, name: null, status: 'pass', checks: [] }; let sel; try { sel = await pysimFetch('/api/select', { path: r.path }); @@ -7104,6 +7104,7 @@ async function profilerRunRule(r) { res.error = e.message; return res; } + if (sel && sel.name) res.name = sel.name; if (!sel || sel.exists !== true) { res.status = 'fail'; res.checks.push({ label: 'exists', expected: true, actual: false, ok: false }); @@ -7164,13 +7165,31 @@ async function profilerRunRule(r) { return res; } +function profilerCustomNameForPath(path) { + if (!path) return null; + const norm = path.toUpperCase(); + for (const c of pysimCustomFiles) { + const parts = c.path.split('/').filter(Boolean); + if (!parts.length) continue; + let segs; + if (parts[0].toUpperCase() === '3F00') segs = ['MF'].concat(parts.slice(1)); + else segs = parts; + if (segs.join('/').toUpperCase() === norm) return c.name; + } + return null; +} + function profilerRenderReport(results) { let html = ''; for (const r of results) { const color = r.status === 'pass' ? 'text-emerald-600' : (r.status === 'fail' ? 'text-red-600' : 'text-yellow-600'); const icon = r.status === 'pass' ? '✓' : (r.status === 'fail' ? '✗' : '⚠'); + const name = profilerCustomNameForPath(r.path) || r.name; + const title = name + ? '' + esc(name) + ' (' + esc(r.path) + ')' + : '' + esc(r.path) + ''; html += '