chore: 同步 embed 静态资源(base=/ 修复深链白屏)

二进制 / K8s embed 模式 go:embed 使用 backend/static
This commit is contained in:
Logan.Li committed 2026-06-26 11:04:50 +08:00
1 parent 992e9b2ecc
commit 921b44d6a4
155 files changed
+187 -184

No files matched your search

@@ -0,0 +1,11 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BtOQNd6b.js","assets/index-BTQygws6.js","assets/index-gdjfqXlA.css","assets/dashboard-DIS6joUE.js","assets/server-C0cSEEX-.js","assets/region-CWnyU1Ly.js","assets/index-DSkkspoy.js","assets/pipeline-CgOYDc3n.js","assets/config-CxWPmf4g.js","assets/credential-BnmvNrfT.js","assets/automation-Bve9hYh8.js","assets/alert-BgGvEFrj.js","assets/alert-center-Bpw1a6Eu.js","assets/site-DwJsZTdz.js","assets/trace-L8uY5gM3.js","assets/grafana-DTc3taUi.js","assets/datasource-CgE8bmC1.js","assets/metrics-CFR1r9Ln.js","assets/agent-Bb56k6oq.js","assets/account-HBV_I0ZG.js","assets/platform-2GgNsjLE.js","assets/billing-CtDdgyDv.js","assets/audit-DVfdGNwm.js","assets/terminal-D0xu_OgS.js","assets/approval-DHBTR1U2.js","assets/ai-BNXuq6Dq.js"])))=>i.map(i=>d[i]);
import{i as Ke,al as vr,j as e,r as o,be as Or,D as _e,a as Me,b as Qe,c as Te,d as Re,s as hr,a6 as Oe,M as We,Q as nr,O as he,o as Fe,B as j,a5 as ze,S as He,e as Je,a2 as gr,$ as ie,X as be,v as ur,t as G,L as Ue,at as zr,ac as Lr,a9 as Hr,ap as Ur,ab as Xe,ae as Dr,aa as Vr,ad as Wr,aB as qr,W as Gr,b9 as br,N as Kr,H as dr,aS as Sr,aT as jr,aU as yr,aV as Nr,aW as qe,aX as ge,f as Qr}from"./index-BTQygws6.js";import{C as ke,a as Ee}from"./card-D0oz3NII.js";import{I as W}from"./input-C6mE-wO9.js";import{C as ue}from"./checkbox-D73wKf04.js";import{b as Le,e as Y,T as Jr,a as Xr,c as ne,d as Zr}from"./table-Dh5trM9F.js";import{S as fe,a as we,b as Ce,c as Ie,d as U}from"./select-pPlmgAjn.js";import{u as Yr,q as fr,a as es,b as rs}from"./unwrap-Bv0ReG-f.js";import{u as $e}from"./useMutation-C9fIiouP.js";import{s as ee}from"./server-C0cSEEX-.js";import{S as ss}from"./stat-strip-M_Ng3raR.js";import{B as O}from"./badge-BsIZhz7S.js";import{c as Ne}from"./account-HBV_I0ZG.js";import{R as de}from"./refresh-cw-e9vbQhCy.js";import{S as wr}from"./search-BDsFve6h.js";import{x as ts,a as os}from"./xterm-DSqgeKvr.js";import{m as as,a as cs,f as ns}from"./xterm-utils-slbfdUHf.js";import{c as Ze,s as ds}from"./credential-BnmvNrfT.js";import{M as Cr,a as Ir}from"./minimize-2-DBp9LGa2.js";import{F as Fr}from"./folder-open-B72Redy5.js";import{U as Ye}from"./upload-DAFoufx2.js";import{F as lr,a as ls}from"./folder-CQ5eyfNi.js";import{A as ps}from"./arrow-left-C7utsRsB.js";import{D as er}from"./download-BSvsFf63.js";import{T as rr}from"./trash-2-5oUve9eW.js";import{r as ms}from"./region-CWnyU1Ly.js";import{L as V}from"./label-8e-EC7mH.js";import{T as pr}from"./textarea-DDxE7TMs.js";import{S as xs}from"./save-w9vZ9YyU.js";import{H as is}from"./hard-drive-zBn-z9Ht.js";import{E as vs}from"./ellipsis-ClGZZTS8.js";import{S as hs}from"./square-pen-DYung4SK.js";import{P as gs}from"./plus-DOS6OUrq.js";import"./index-WFeZT6kc.js";import"./chevron-up-Z8QjN8G2.js";const us=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sr=Ke("chevron-left",us);const bs=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Ge=Ke("file-spreadsheet",bs);const Ss=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],js=Ke("folder-plus",Ss);function ys(r={page:1,page_size:100}){return Yr({queryKey:fr.servers(r),queryFn:async()=>{const p=await ee.getServers(r);return{list:rs(p),total:es(p)}},staleTime:3e4})}function Ns(){const r=vr(),p=()=>r.invalidateQueries({queryKey:["servers"]}),c=$e({mutationFn:u=>ee.createServer(u),onSuccess:p}),t=$e({mutationFn:({id:u,data:g})=>ee.updateServer(u,g),onSuccess:p}),a=$e({mutationFn:u=>ee.deleteServer(u),onSuccess:p}),v=$e({mutationFn:u=>ee.batchDelete(u),onSuccess:p});return{createMutation:c,updateMutation:t,deleteMutation:a,batchDeleteMutation:v,invalidate:p}}function fs({servers:r}){const p=r.filter(a=>a.status==="running").length,c=r.filter(a=>a.status==="maintenance").length,t=r.filter(a=>a.status==="stopped").length;return e.jsx(ss,{"code-path":"src/components/server/ServerStatsStrip.tsx:14:5",items:[{label:"服务器",value:r.length,color:"blue"},{label:"运行中",value:p,color:"emerald"},{label:"维护中",value:c,color:"amber"},{label:"已停止",value:t,color:"muted"}]})}const ws=[{id:"aws",name:"AWS",color:"bg-orange-500",icon:"AWS"},{id:"aliyun",name:"阿里云",color:"bg-orange-600",icon:"AL"},{id:"tencent",name:"腾讯云",color:"bg-blue-500",icon:"TX"},{id:"huawei",name:"华为云",color:"bg-red-500",icon:"HW"},{id:"azure",name:"Azure",color:"bg-blue-600",icon:"AZ"}];function Cs({open:r,onClose:p}){const[c,t]=o.useState([]),[a,v]=o.useState(1),[u,g]=o.useState(""),[x,M]=o.useState(null),[S,E]=o.useState([]),[n,N]=o.useState([]),[f,T]=o.useState(""),[w,i]=o.useState(!1),[h,C]=o.useState([]),[I,D]=o.useState([]),[z,y]=o.useState(!1),[L,m]=o.useState([]),[b,R]=o.useState(!1),[F,A]=o.useState(null),[Z,q]=o.useState("22"),[re,l]=o.useState([]),[$,Q]=o.useState(""),J=async()=>{try{const s=await Ne.getAccounts();t(s?.list||[])}catch(s){console.error("加载云账号失败:",s)}};o.useEffect(()=>{r&&(J(),Or(async()=>{const{credentialApi:s}=await import("./index-BtOQNd6b.js");return{credentialApi:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25])).then(({credentialApi:s})=>{s.list().then(_=>l(_?.list||[])).catch(()=>l([]))}))},[r]);const B=c.filter(s=>s.provider===u&&s.status==="active"),X=o.useCallback(async s=>{try{return(await Ne.getAccountRegions(s))?.list||[]}catch{return[]}},[]),K=o.useCallback(async s=>{i(!0);try{await Ne.synLine truncated
\x1B[31m[连接已关闭]\x1B[0m\r
`)},F.onerror=()=>{y.write(`\r
\x1B[31m[连接发生错误]\x1B[0m\r
`)},()=>{try{F.close(),y.dispose()}catch{}g.current=null,x.current=null,E(!1)}},[r,c,I]),o.useEffect(()=>{if(!r||!I)return;let y,L=0;const m=()=>{const b=u.current,R=M.current,F=g.current,A=x.current;if(!b||!R||!F){L++<30&&requestAnimationFrame(m);return}y=cs(b,R,F,A);try{ns(R,F,A)}catch{}};return m(),()=>y?.()},[r,I,n]),e.jsx(_e,{"code-path":"src/components/server/TerminalDialog.tsx:184:5",open:r,onOpenChange:p,children:e.jsxs(Me,{"code-path":"src/components/server/TerminalDialog.tsx:185:7",showCloseButton:!1,className:ie("bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] p-0 gap-0","!duration-0 !transition-none",n?"!max-w-none !w-screen !h-screen !rounded-none !translate-x-0 !translate-y-0 !left-0 !top-0":""),style:n?{maxWidth:"100vw",width:"100vw",height:"100vh"}:{maxWidth:"960px",width:"92vw"},children:[e.jsxs(Te,{"code-path":"src/components/server/TerminalDialog.tsx:197:9",className:"sr-only",children:["终端 - ",t]}),e.jsx(Re,{"code-path":"src/components/server/TerminalDialog.tsx:198:9",className:"sr-only",children:"SSH 终端连接"}),e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:200:9",className:"flex items-center justify-between px-4 py-2 border-b border-[var(--dg-border)]",children:[e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:201:11",className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{"code-path":"src/components/server/TerminalDialog.tsx:202:13",className:ie("w-2 h-2 rounded-full",S?"bg-emerald-400":"bg-red-400")}),e.jsx("span",{"code-path":"src/components/server/TerminalDialog.tsx:203:13",className:"text-[var(--dg-text-primary)] font-medium",children:t}),e.jsxs("span",{"code-path":"src/components/server/TerminalDialog.tsx:204:13",className:"text-[var(--dg-text-muted)]",children:["(",a,")"]})]}),e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:206:11",className:"flex items-center gap-1",children:[e.jsx("button",{"code-path":"src/components/server/TerminalDialog.tsx:207:13",onClick:()=>N(!n),className:"p-1.5 rounded hover:bg-[var(--dg-bg-hover)] text-[var(--dg-text-secondary)]",children:n?e.jsx(Cr,{"code-path":"src/components/server/TerminalDialog.tsx:211:29",className:"h-4 w-4"}):e.jsx(Ir,{"code-path":"src/components/server/TerminalDialog.tsx:211:65",className:"h-4 w-4"})}),e.jsx("button",{"code-path":"src/components/server/TerminalDialog.tsx:213:13",onClick:()=>p(!1),className:"p-1.5 rounded hover:bg-[var(--dg-bg-hover)] text-[var(--dg-text-secondary)]",children:e.jsx(be,{"code-path":"src/components/server/TerminalDialog.tsx:217:15",className:"h-4 w-4"})})]})]}),!I&&e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:223:11",className:"p-6 flex flex-col items-center justify-center gap-4",style:{height:"480px"},children:[e.jsx(ur,{"code-path":"src/components/server/TerminalDialog.tsx:224:13",className:"h-12 w-12 text-amber-400"}),e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:225:13",className:"text-center",children:[e.jsx("p",{"code-path":"src/components/server/TerminalDialog.tsx:226:15",className:"text-[var(--dg-text-primary)] font-medium mb-1",children:"服务器未配置认证凭据"}),e.jsx("p",{"code-path":"src/components/server/TerminalDialog.tsx:227:15",className:"text-sm text-[var(--dg-text-muted)]",children:"请选择一个凭据用于 SSH 连接"})]}),f.length===0?e.jsx("p",{"code-path":"src/components/server/TerminalDialog.tsx:230:15",className:"text-xs text-[var(--dg-text-muted)]",children:"暂无可用凭据,请先去「凭证配置」添加"}):e.jsxs("select",{"code-path":"src/components/server/TerminalDialog.tsx:232:15",value:w,onChange:y=>i(y.target.value),className:"w-64 px-3 py-2 bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)] rounded-md text-[var(--dg-text-primary)] text-sm",children:[e.jsx("option",{"code-path":"src/components/server/TerminalDialog.tsx:237:17",value:"",children:"-- 选择凭据 --"}),f.map(y=>e.jsxs("option",{"code-path":"src/components/server/TerminalDialog.tsx:239:19",value:String(y.id),children:[y.type==="ssh_key"?"🔑":"🔒"," ",y.name]},y.id))]}),e.jsx(j,{"code-path":"src/components/server/TerminalDialog.tsx:245:13",onClick:z,disabled:!w||h,className:"bg-[var(--dg-blue)] hover:opacity-90 text-white",children:h?"关联中...":"确认连接"})]}),I&&e.jsx("div",{"code-path":"src/components/server/TerminalDialog.tsx:256:11",ref:u,className:"xterm-terminal-host",style:{height:n?"calc(100vh - 49px)":"520px"}})]})})}const Fs=r=>r<1024?`${r} B`:r<1048576?`${(r/1024).toFixed(1)} KB`:`${(r/1048576).toFixed(2)} MB`;function ks({open:r,onOpenChange:p,serverId:c,serverName:t}){const[a,v]=o.useState([]),[u,g]=o.useState([]),[x,M]=o.useState("/"),[S,E]=o.useState(!1),[n,N]=o.useState(""),[f,T]=o.useState(!1),[w,i]=o.useState(!1),h=o.useRef(null),C=o.useCallback(async m=>{if(c){E(!0),N("");try{const b=await ee.listFiles(c,m),R=b?.data||b;v(R.items||[]),g(R.breadcrumbs||[]),M(R.path||m)}catch(b){N(b?.message||"加载目录失败"),v([ Line truncated
`).replace(/\r/g,`
`).split(`
`).filter(a=>a.trim());if(p.length<2)return[];const c=mr(p[0]).map(a=>a.toLowerCase()),t=[];for(let a=1;a<p.length;a++){const v=mr(p[a]),u={};c.forEach((g,x)=>{u[g]=v[x]??""}),t.push(u)}return t}function _s(r){return/^(\d{1,3}\.){3}\d{1,3}$/.test(r)&&r.split(".").every(p=>Number(p)>=0&&Number(p)<=255)}function Ms(){const r=["hostname,ip,port","web-01,192.168.1.10,22","db-01,192.168.1.20,22","cache-01,192.168.1.30,2222"].join(`
`),p=new Blob(["\uFEFF"+r],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(p),t=document.createElement("a");t.href=c,t.download="servers-template.csv",t.click(),URL.revokeObjectURL(c)}function Ts({open:r,onClose:p}){const[c,t]=o.useState(1),[a,v]=o.useState(""),[,u]=o.useState("password"),[g,x]=o.useState(null),[M,S]=o.useState(!1),[E,n]=o.useState([]),[N,f]=o.useState([]),[T,w]=o.useState(!1),[i,h]=o.useState([]),[C,I]=o.useState(""),[D,z]=o.useState("22");o.useEffect(()=>{if(!r)return;let l=!1;return(async()=>{try{const[$,Q]=await Promise.all([ms.list(),Ze.list()]);if(l)return;const J=$?.list??[];f(J.map(B=>({id:String(B.id??""),name:B.name??"",code:B.code??""}))),h(Q?.list??[])}catch{l||(f([]),h([]))}})(),()=>{l=!0}},[r]);const y=async()=>{if(c===2&&g){S(!0);try{const l=await g.text(),$=Es(l);if($.length===0){G.error("文件无有效数据,请使用模板格式(首行为表头)"),S(!1);return}const Q=new Set,J=$.map((B,X)=>{const K=(B.hostname??"").trim(),P=(B.ip??"").trim(),me={row:X+2,hostname:K,ip:P,port:Number(B.port)||22,username:(B.username??"").trim()||"root",os:B.os??"",cpu:Number(B.cpu)||0,memory:Number(B.memory)||0,disk:Number(B.disk)||0,tags:B.tags??"",status:"valid",message:"有效"},se=[];K||se.push("主机名缺失"),P?_s(P)||se.push("IP格式错误"):se.push("IP缺失");const H=`${K}|${P}`;return K&&P&&Q.has(H)?se.push("重复行"):Q.add(H),se.length>0&&(me.status="error",me.message=se.join("、")),me});n(J),t(c+1)}catch{G.error("文件解析失败,请确认是 CSV 格式")}finally{S(!1)}}else t(c+1)},L=()=>{c>1&&t(c-1)},m=l=>{l.target.files&&l.target.files[0]&&x(l.target.files[0])},b=()=>{t(1),v(""),z("22"),I(""),x(null),n([])},R=async()=>{const l=E.filter($=>$.status==="valid");if(l.length!==0){w(!0);try{const $=l.map(P=>({hostname:P.hostname,ip:P.ip,port:P.port,username:P.username,os:P.os,cpu:P.cpu,memory:P.memory,disk:P.disk,tags:P.tags})),J=await ee.batchCreate({servers:$,region_id:a||void 0,credential_id:C?Number(C):void 0,default_port:Number(D)||22})??{},B=J.success??0,X=J.skipped??0,K=J.failed??0;G.success(`导入完成:成功 ${B},跳过 ${X},失败 ${K}`),b(),p()}catch($){G.error($?.message||"导入失败,请重试")}finally{w(!1)}}},F=()=>{p(),b()},A=E.filter(l=>l.status==="valid").length,Z=E.filter(l=>l.status==="warning").length,q=E.filter(l=>l.status==="error").length,re=[{id:1,title:"配置"},{id:2,title:"上传"},{id:3,title:"确认"}];return e.jsx(_e,{"code-path":"src/components/server/ExcelServerImport.tsx:278:5",open:r,onOpenChange:F,children:e.jsxs(Me,{"code-path":"src/components/server/ExcelServerImport.tsx:279:7",className:"max-w-3xl bg-[var(--dg-bg-primary)] border-[var(--dg-border)] text-[var(--dg-text-primary)]",children:[e.jsxs(Qe,{"code-path":"src/components/server/ExcelServerImport.tsx:280:9",children:[e.jsx(Te,{"code-path":"src/components/server/ExcelServerImport.tsx:281:11",className:"text-xl",children:"CSV 批量导入服务器"}),e.jsx(Re,{"code-path":"src/components/server/ExcelServerImport.tsx:282:11",className:"sr-only",children:"通过 CSV 文件批量导入服务器资产"})]}),e.jsx("div",{"code-path":"src/components/server/ExcelServerImport.tsx:286:9",className:"flex items-center justify-center mb-6",children:re.map((l,$)=>e.jsxs("div",{"code-path":"src/components/server/ExcelServerImport.tsx:288:13",className:"flex items-center",children:[e.jsx("div",{"code-path":"src/components/server/ExcelServerImport.tsx:289:15",className:`flex items-center justify-center w-8 h-8 rounded-full ${c===l.id?"bg-blue-600 text-white":c>l.id?"bg-emerald-600 text-white":"bg-[var(--dg-bg-secondary)] text-[var(--dg-text-muted)]"}`,children:c>l.id?e.jsx(he,{"code-path":"src/components/server/ExcelServerImport.tsx:296:32",className:"h-4 w-4"}):l.id}),e.jsx("span",{"code-path":"src/components/server/ExcelServerImport.tsx:298:15",className:`ml-2 text-sm ${c===l.id?"text-[var(--dg-text-primary)]":"text-[var(--dg-text-muted)]"}`,children:l.title}),$<re.length-1&&e.jsx("div",{"code-path":"src/components/server/ExcelServerImport.tsx:302:17",className:"w-12 h-0.5 bg-[var(--dg-border)] mx-3"})]},l.id))}),c===1&&e.jsxs("div",{"code-path":"src/components/server/ExcelServerImport.tsx:310:11",className:"space-y-6",children:[e.jsx(ke,{"code-path":"src/components/server/ExcelServerImport.tsx:312:13",className:"bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]",children:e.jsx(Ee,{"code-path":"src/components/server/ExcelServerImport.tsx:313:15",className:"p-4",children:e.jsxs("div",{"code-path":"src/components/server/ExcelServerImport.tsx:314:17",className:"flex items-center justify-between",children:[e.jsxs("div",{"code-path":"src/components/server/ExcelServerImport.tsx:315:19",className:"flex items-center gap-3",children:[e.jsx("div",{"code-path":"src/components/server/ExcelServerImport.tsx:316:21",className:"w-10 h-10 rounded-lg bg-emerald-500/20 flex items-center justify-center",children:e.jsx(Ge,{"code-path":"src/components/server/ExcelServerImport.tsx:317:2 Line truncated
`),le=new Blob(["\uFEFF"+Ae],{type:"text/csv;charset=utf-8;"}),ce=URL.createObjectURL(le),xe=document.createElement("a");xe.href=ce,xe.download=`servers_${new Date().toISOString().slice(0,10)}.csv`,xe.click(),URL.revokeObjectURL(ce),G.success(`已导出 ${H.length} 台服务器`)},cr=8;return e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:361:5",className:"space-y-6",children:[e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:363:7",className:"flex items-center justify-between",children:[e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:364:9",children:[e.jsx("h1",{"code-path":"src/components/server/ServerManager.tsx:365:11",className:"text-2xl font-bold text-[var(--dg-text-primary)]",children:"服务器管理"}),e.jsx("p",{"code-path":"src/components/server/ServerManager.tsx:366:11",className:"text-sm text-[var(--dg-text-muted)] mt-1",children:"管理云平台服务器资产"})]}),e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:368:9",className:"flex items-center gap-2",children:[e.jsxs(j,{"code-path":"src/components/server/ServerManager.tsx:369:11",variant:"outline",className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)] hover:text-[var(--dg-text-primary)] hover:bg-[var(--dg-bg-hover)]",onClick:()=>X(),children:[e.jsx(de,{"code-path":"src/components/server/ServerManager.tsx:374:13",className:ie("h-4 w-4 mr-2",B&&"animate-spin")}),"刷新"]}),e.jsxs(j,{"code-path":"src/components/server/ServerManager.tsx:377:11",variant:"outline",className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)] hover:text-[var(--dg-text-primary)] hover:bg-[var(--dg-bg-hover)]",onClick:$r,children:[e.jsx(er,{"code-path":"src/components/server/ServerManager.tsx:382:13",className:"h-4 w-4 mr-2"}),"导出"]}),c("server:create")&&e.jsxs(Sr,{"code-path":"src/components/server/ServerManager.tsx:386:11",children:[e.jsx(jr,{"code-path":"src/components/server/ServerManager.tsx:387:13",asChild:!0,children:e.jsxs(j,{"code-path":"src/components/server/ServerManager.tsx:388:15",variant:"outline",className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)] hover:text-[var(--dg-text-primary)] hover:bg-[var(--dg-bg-hover)]",children:[e.jsx(Ye,{"code-path":"src/components/server/ServerManager.tsx:389:17",className:"h-4 w-4 mr-2"}),"批量导入"]})}),e.jsxs(yr,{"code-path":"src/components/server/ServerManager.tsx:393:13",className:"bg-[var(--dg-bg-tertiary)] border-[var(--dg-border)] text-[var(--dg-text-primary)]",children:[e.jsx(Nr,{"code-path":"src/components/server/ServerManager.tsx:394:15",children:"选择导入方式"}),e.jsx(qe,{"code-path":"src/components/server/ServerManager.tsx:395:15",className:"bg-[var(--dg-border)]"}),e.jsxs(ge,{"code-path":"src/components/server/ServerManager.tsx:396:15",className:"hover:bg-[var(--dg-bg-hover)] cursor-pointer focus:bg-[var(--dg-bg-hover)] focus:text-[var(--dg-text-primary)]",onClick:()=>S(!0),children:[e.jsx(hr,{"code-path":"src/components/server/ServerManager.tsx:400:17",className:"h-4 w-4 mr-2 text-[var(--dg-blue)]"}),"云主机导入",e.jsx("span",{"code-path":"src/components/server/ServerManager.tsx:402:17",className:"ml-2 text-xs text-[var(--dg-text-muted)]",children:"从云平台同步"})]}),e.jsxs(ge,{"code-path":"src/components/server/ServerManager.tsx:404:15",className:"hover:bg-[var(--dg-bg-hover)] cursor-pointer focus:bg-[var(--dg-bg-hover)] focus:text-[var(--dg-text-primary)]",onClick:()=>n(!0),children:[e.jsx(Ge,{"code-path":"src/components/server/ServerManager.tsx:408:17",className:"h-4 w-4 mr-2 text-emerald-400"}),"CSV导入",e.jsx("span",{"code-path":"src/components/server/ServerManager.tsx:410:17",className:"ml-2 text-xs text-[var(--dg-text-muted)]",children:"hostname + IP 即可"})]})]})]}),c("server:create")&&e.jsxs(j,{"code-path":"src/components/server/ServerManager.tsx:416:13",className:"bg-[var(--dg-blue)] hover:opacity-90 text-white",onClick:Br,children:[e.jsx(gs,{"code-path":"src/components/server/ServerManager.tsx:420:15",className:"h-4 w-4 mr-2"}),"添加服务器"]})]})]}),e.jsx(fs,{"code-path":"src/components/server/ServerManager.tsx:428:7",servers:H}),e.jsx(ke,{"code-path":"src/components/server/ServerManager.tsx:431:7",className:"bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]",children:e.jsxs(Ee,{"code-path":"src/components/server/ServerManager.tsx:432:9",className:"p-0",children:[e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:434:11",className:"flex items-center justify-between flex-wrap gap-4 p-4",children:[e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:435:13",className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("div",{"code-path":"src/components/server/ServerManager.tsx:436:15",className:"relative w-64",children:[e.jsx(wr,{"code-path":"src/components/server/ServerManager.tsx:437:17",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-[var(--dg-text-muted)]"}),e.jsx(W,{"code-path":"src/components/ Line truncated