Files
Nexus/web/app/assets/labels-CzOhyWto.js
T
Nexus Agent 0b2d7ac50d feat(scripts): 异步执行、全局进度看板与完成提示音设置
脚本 exec 立即返回 running 并在后台跑批次;/ws/alerts 推送 script_progress/complete;
新增 ScriptRunsPage、Telegram 汇总通知与可配置的浏览器完成提示音。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 07:07:02 +08:00

1 line
3.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var e=[[/rsync:\s*connection unexpectedly closed/gi,`rsync:连接意外关闭`],[/rsync error:\s*some files\/attrs were not transferred/gi,`rsync 错误:部分文件或属性未能传输`],[/rsync error:\s*error in rsync protocol data stream/gi,`rsync 错误:协议数据流异常`],[/rsync error:\s*/gi,`rsync 错误:`],[/rsync:\s*/gi,`rsync`],[/Host key verification failed/gi,`SSH 主机密钥验证失败`],[/Could not resolve hostname/gi,`无法解析主机名`],[/Permission denied,\s*please try again/gi,`权限被拒绝,请重试`],[/Permission denied\s*\(publickey/gi,`公钥认证失败,权限被拒绝`],[/Permission denied/gi,`权限被拒绝`],[/No such file or directory/gi,`文件或目录不存在`],[/Connection refused/gi,`连接被拒绝`],[/Connection timed out/gi,`连接超时`],[/Connection reset by peer/gi,`连接被对端重置`],[/Network is unreachable/gi,`网络不可达`],[/No route to host/gi,`无法路由到主机`],[/No space left on device/gi,`磁盘空间不足`],[/Read-only file system/gi,`文件系统为只读`],[/Operation timed out/gi,`操作超时`],[/Operation not permitted/gi,`操作不允许`],[/Authentication failed/gi,`认证失败`],[/Broken pipe/gi,`连接中断(管道破裂)`],[/Protocol error/gi,`协议错误`],[/Too many open files/gi,`打开的文件过多`],[/Name or service not known/gi,`无法解析主机名或服务名`],[/ssh:\s*connect to host/gi,`ssh:无法连接到主机`],[/ssh:\s*/gi,`ssh`],[/Command failed\s*\(exit\s*(\d+)\)/gi,`命令失败(退出码 $1`],[/rsync exited with code\s*(\d+)/gi,`rsync 退出码 $1`],[/\bexit code\s*(\d+)/gi,`退出码 $1`],[/Server not found/gi,`服务器不存在`],[/failed to set times on/gi,`无法设置文件时间戳:`],[/\bsender\b/gi,`发送端`],[/\breceiver\b/gi,`接收端`]],t=/[\u4e00-\u9fff\u3400-\u4dbf]/g;function n(e){let n=e.match(t);if(!n?.length)return!1;let r=e.replace(/\s+/g,``);return r.length?n.length/r.length>=.2:!1}function r(t){if(t==null)return``;let r=t.trim();if(!r)return``;if(n(r))return t;let i=r;for(let[t,n]of e)i=i.replace(t,n);return i}function i(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function a(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(`zh-CN`,{hour12:!1})}function o(e){switch(e){case`success`:return`成功`;case`failed`:return`失败`;case`running`:return`进行中`;case`cancelled`:return`已取消`;default:return e}}function s(e){switch(e){case`success`:return`success`;case`failed`:return`error`;case`cancelled`:return`grey`;case`running`:return`info`;default:return`warning`}}function c(e){if(!e)return`—`;let t=[],n=e.match(/chown=([^\s]+)/)?.[1],r=e.match(/chmod=([^\s]+)/)?.[1];return n&&t.push(n),r&&t.push(r),t.length?t.join(` · `):e}function l(e){switch(e){case`incremental`:return`增量`;case`full`:return`全量`;case`checksum`:return`校验和`;case`overwrite`:return`覆盖`;default:return e||`—`}}function u(e){return e===`成功`?`success`:e===`失败`?`error`:e===`已取消`?`grey`:`warning`}function d(e){return e?`success`:`error`}export{o as a,l as c,s as i,r as l,c as n,u as o,i as r,d as s,a as t};