fix(admin): 修复详情页弹层内接口请求路径解析错误

This commit is contained in:
augushong
2026-08-15 10:56:01 +08:00
parent 8de759394c
commit 5a41f6a425
2 changed files with 9 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ pre { padding: 10px; overflow-x: auto; border: 1px solid #e5e5e5; }
<table>
<tr><th>#</th><th>缺陷</th><th>处置</th></tr>
<tr><td>B1已修复</td><td>app/admin/view/xhprof/run_watch/index.js:26 调用 window.UA_CORE.util.toDateString —— UA_CORE 全项目零定义T7 笔误 API浏览器抛 "Cannot read properties of undefined (reading 'util')",命中记录页数据行渲染崩溃</td><td class="pass">照抄 T5 formatRequestTime JS 实现替换(保留 isNaN 兜底);实测 32 行正常渲染、console 0 errorfix 提交入库</td></tr>
<tr><td>B2上报,不在 T9 修复范围</td><td>app/admin/view/xhprof/run/detail.js:37 $.ajax 用裸相对 URL 'xhprof.run/detail' /admin/xhprof.run/detail iframe 内解析为 /admin/xhprof.run/xhprof.run/detail 404详情页函数表与 SQL 摘要在浏览器端加载失败服务端渲染的头部统计正常API 层功能本身正常)</td><td class="warn">上报编排器;建议修法 url: ua.url('xhprof.run/detail') T6 文件T9 红线禁止改动)</td></tr>
<tr><td>B2修复</td><td>app/admin/view/xhprof/run/detail.js $.ajax 用裸相对 URL 'xhprof.run/detail'相对地址的解析基准是"当前 URL 目录":详情页自身位于 /admin/xhprof.run/detail(基准目录 /admin/xhprof.run/),拼出 /admin/xhprof.run/xhprof.run/detail 404,函数表与 SQL 摘要在浏览器端加载失败服务端渲染的头部统计正常API 层功能本身正常)</td><td class="pass">改为 url: location.pathname + location.search当前页 URL 即同体 API 端点,对后台入口自定义改名免疫),并删除 data:{id}id 已在 query 中防重复拼接);弹层与非弹层两上下文实测:函数表 Top100 加载(函数总数 568main() 在列、SQL 摘要条有值1.17s / 16.76% / 90 函数 / 138 、console 0 errorfix 提交入库</td></tr>
</table>
<h2>六、关键命令与输出摘录</h2>
@@ -102,15 +102,15 @@ $env:XHPROF_ENABLE='false'; docker compose ... up -d # 8 请求全 200jsonl
<h2>七、截图存证6 1920x1080 + 390x844</h2>
<div class="shots">
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/01-run-index-1920.png" alt="采样列表 1920"><figcaption>01 采样列表1920x1080 23 条,无添加按钮)</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/02-run-detail-1920.png" alt="运行详情 1920"><figcaption>02 运行详情1920x1080头部统计正常;函数表 B2 影响未加载,已上报</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/02-run-detail-1920.png" alt="运行详情 1920"><figcaption>02 运行详情1920x1080B2 修复后:函数表 Top100 加载、SQL 摘要有值、main() 在列</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/03-watch-index-1920.png" alt="监控规则 1920"><figcaption>03 监控规则1920x10803 条预置规则)</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/04-run-watch-index-1920.png" alt="命中记录 1920"><figcaption>04 命中记录1920x1080B1 修复后 32 行正常渲染 + 超阈值徽章)</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/05-run-index-390.png" alt="采样列表 390"><figcaption>05 采样列表390x844横向滚动不崩</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/06-run-detail-390.png" alt="运行详情 390"><figcaption>06 运行详情390x844统计卡片纵向堆叠不崩</figcaption></figure>
<figure><img src="../../runtime/agents/xhprof-backend-screenshots/06-run-detail-390.png" alt="运行详情 390"><figcaption>06 运行详情390x844B2 修复后:函数表加载、统计卡片纵向堆叠不崩)</figcaption></figure>
</div>
<h2>八、结论</h2>
<p>6 组主链断言 + 4 条失败路径 + 3 条回归(+终态恢复)全部通过;页面 QA 两分辨率不崩。XHProf 后台化全链路(采集 jsonl 落盘 定时导入入库 watch 物化 后台三页面 过期清理)在真实容器环境验证可用。遗留 B2详情页浏览器端 ajax 相对路径 404)已上报编排器,不影响列表/命中/监控页面与服务端 API</p>
<p>6 组主链断言 + 4 条失败路径 + 3 条回归(+终态恢复)全部通过;页面 QA 两分辨率不崩。XHProf 后台化全链路(采集 jsonl 落盘 定时导入入库 watch 物化 后台三页面 过期清理)在真实容器环境验证可用。T9 期间发现的两处前端缺陷B1 命中记录页假 API、B2 详情页相对路径 404)均已修复并浏览器实测通过,无遗留问题</p>
</body>
</html>