Files
Nexus/web/app/assets/execDetailGrouping-BfJ_-Vag.js
T
Nexus Agent f127f07ab2 feat(rdp): 3389 页独立管理 RDP 主机
rdp_hosts 表与专用 API,在 3389远程页添加/连接,不再依赖子机列表。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 20:58:46 +08:00

2 lines
1.0 KiB
JavaScript

import{Ir as e,Lt as t,Pt as n}from"./index-_6O5JL4W.js";import{t as r}from"./usePageAutoRefresh-DLhUSsyH.js";var i=8e3,a=3e4;function o(o,s){let{runningItems:c}=t();r(async()=>{s?.enabled&&!s.enabled()||await o(!0)},()=>c.value.length>0?i:a);let l=n(()=>{s?.enabled&&!s.enabled()||o(!1)});e(()=>{l()})}function s(e){return e.replace(/\b\d{1,3}(?:\.\d{1,3}){3}\b/g,`<ip>`).replace(/:\d{2,5}\b/g,`:<port>`).replace(/\/[^\s'"]+/g,`/<path>`).replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,`<uuid>`).replace(/\s+/g,` `).trim()}function c(e){let t=e.trim();return!t||t===`—`?`未知错误`:s(t.split(`
`)[0]?.trim()||t).slice(0,200)||`未知错误`}function l(e){let t=new Map;for(let n of e){if(!n.failed)continue;let e=c(n.summary),r=t.get(e);r?r.push(n):t.set(e,[n])}return[...t.entries()].map(([e,t])=>({errorKey:e,rows:t.sort((e,t)=>e.serverName.localeCompare(t.serverName,`zh`)),count:t.length})).sort((e,t)=>t.count-e.count||e.errorKey.localeCompare(t.errorKey,`zh`))}export{o as n,l as t};