chore(build): 更新 embed 前端静态资源

同步 ./run.sh build 产出的 backend/static 哈希资源与 index.html。
This commit is contained in:
Logan.Li committed 2026-06-26 16:22:57 +08:00
1 parent 8df0acb338
commit 1fd9a631e5
108 files changed
+142 -139

No files matched your search

@@ -0,0 +1,8 @@
import{j as t,r as a,y as ye,E as H,a as ge,o as ve}from"./vendor-codemirror-B1SGo4xl.js";import{Y as je,ae as le,B as Y,D as Pe,a as Ee,m as ee,c as Ne,d as Se}from"./index-Bp-M7P_8.js";import{u as ie}from"./use-toast-DNZLibQY.js";import{k as O,d as Te}from"./index-BkulU9RM.js";import{c as de}from"./k8s-yaml-utils-4KZB_Bq_.js";import{w as Fe,aF as Be,v as ue,d as Ce,L as V,$ as Ye,X as I,r as Ae,ad as Re,aU as Me,an as De,ao as Oe,H as _e,m as $e,f as Le,ah as Ve,R as ze,aV as Ie,aW as Ue}from"./vendor-icons-BWk-DH7F.js";import{S as te,a as se,b as re,c as oe,d as ne}from"./select-DbhcBWnH.js";import{x as We,a as He}from"./vendor-xterm-20M9KZE1.js";import{B as Je}from"./badge-B00SZHvE.js";function Ke({onClose:e,children:s,zIndex:r=100}){return je.createPortal(t.jsx("div",{"code-path":"src/components/ui/modal-overlay.tsx:13:5",className:"fixed inset-0 overflow-y-auto bg-black/60",style:{zIndex:r},onClick:e,children:t.jsx("div",{"code-path":"src/components/ui/modal-overlay.tsx:18:7",className:"flex min-h-full items-center justify-center p-4",children:s})}),document.body)}const Ge=new Set(["kubectl.kubernetes.io/last-applied-configuration","kubectl.kubernetes.io/change-cause","kubectl.kubernetes.io/restartedAt","deployment.kubernetes.io/revision","deployment.kubernetes.io/desired-replicas","deployment.kubernetes.io/max-replicas","control-plane.alpha.kubernetes.io/leader","autoscaling.alpha.kubernetes.io/conditions","kubernetes.io/config.hash","kubeadm.kubernetes.io/etcd.advertise-client-urls","pv.kubernetes.io/bind-completed","pv.kubernetes.io/bound-by-controller"]),qe=["managedFields","resourceVersion","uid","creationTimestamp","generation","selfLink","deletionTimestamp","ownerReferences","finalizers","clusterName","generateName"],Xe=new Set(["pod-template-hash","controller-revision-hash"]),Qe=["kube-api-access-","default-token-","kube-root-ca.crt"],Ze=["/var/run/secrets/kubernetes.io/serviceaccount","/var/run/secrets/sa"],et={dnsPolicy:"ClusterFirst",restartPolicy:"Always",schedulerName:"default-scheduler",terminationGracePeriodSeconds:30,enableServiceLinks:!0,serviceAccountName:"default",automountServiceAccountToken:!0,priority:0,preemptionPolicy:"PreemptLowerPriority"},tt={progressDeadlineSeconds:600,revisionHistoryLimit:10},st={terminationMessagePath:"/dev/termination-log",terminationMessagePolicy:"File",stdin:!1,tty:!1,stdinOnce:!1},rt={sessionAffinity:"None",externalTrafficPolicy:"Cluster",internalTrafficPolicy:"Cluster",ipFamilyPolicy:"SingleStack",allocateLoadBalancerNodePorts:!0},ot=["clusterIP","clusterIPs","ipFamilies","healthCheckNodePort"];function U(e){return Array.isArray(e)?e.length===0:e&&typeof e=="object"?Object.keys(e).length===0:!1}function nt(e,s){return s===e||typeof s=="number"&&typeof e=="string"&&String(s)===e?!0:typeof s=="boolean"&&typeof e=="string"?s&&e==="true"||!s&&e==="false":!1}function J(e){if(!(!e||typeof e!="object")){for(const s of qe)delete e[s];if(e.annotations){for(const s of Object.keys(e.annotations))Ge.has(s)&&delete e.annotations[s];Object.keys(e.annotations).length===0&&delete e.annotations}if(e.labels){for(const s of Xe)delete e.labels[s];Object.keys(e.labels).length===0&&delete e.labels}}}function K(e){if(!e||typeof e!="object")return;if(Array.isArray(e)){for(let r=e.length-1;r>=0;r--)K(e[r]),U(e[r])&&e.splice(r,1);return}const s=e;for(const r of Object.keys(s)){const n=s[r];n&&typeof n=="object"&&K(n),U(n)&&delete s[r]}}function W(e,s){if(!(!e||typeof e!="object"))for(const[r,n]of Object.entries(s))r in e&&nt(e[r],n)&&delete e[r]}function ae(e){return Qe.some(s=>e.startsWith(s)||e===s)}function at(e){return Ze.some(s=>e===s||e.startsWith(`${s}/`))}function ct(e){if(!e||typeof e!="object")return;const s=e.volumes;if(Array.isArray(s)){const r=new Set(s.filter(c=>c?.name&&ae(c.name)).map(c=>c.name));e.volumes=s.filter(c=>!c?.name||!ae(c.name)),e.volumes.length===0&&delete e.volumes;const n=c=>{if(Array.isArray(c))for(const x of c)Array.isArray(x.volumeMounts)&&(x.volumeMounts=x.volumeMounts.filter(N=>!(N?.name&&r.has(N.name)||N?.mountPath&&at(String(N.mountPath)))),x.volumeMounts.length===0&&delete x.volumeMounts)};n(e.containers),n(e.initContainers),n(e.ephemeralContainers)}}function lt(e){if(!(!e||typeof e!="object")){if(W(e,st),e.imagePullPolicy){const s=String(e.image||"").split(":").pop()||"",n=!String(e.image||"").includes(":")||s==="latest"?"Always":"IfNotPresent";e.imagePullPolicy===n&&delete e.imagePullPolicy}e.resources&&U(e.resources)&&delete e.resources,e.securityContext&&U(e.securityContext)&&delete e.securityContext}}function me(e){if(!(!e||typeof e!="object")){W(e,et),"serviceAccount"in e&&delete e.serviceAccount,e.nodeName&&delete e.nodeName,ct(e);for(const s of["containers","initContainers","ephemeralContainers"]){const r=e[s];if(Array.isArray(r))for(const n of r)lt(n)}}}function it(e){if(!e?.strategy||e.strategy.type!=="RollingUpdate")return;const s=e.strategy.rollingUpdate;if(!s||typeof s!="object")return;const r=s.maxUnavailable,n=s.maxSurge;Line truncated
\x1B[33m⚠ bash 不可用,请切换 /bin/sh 后重连。\x1B[0m`),g.current=!0;return}d.write(o.includes("\x1B")?o:`\r
\x1B[31m${o}\x1B[0m\r
`)}}catch{typeof p.data=="string"&&d.write(p.data)}},E.onclose=p=>{S(u=>u==="error"?u:"closed"),g.current||d.write(`\r
\x1B[33m[连接已关闭]\x1B[0m\r
`)},E.onerror=p=>{console.error("[PodExec:connect] WS error event fired, readyState=",E.readyState,"type=",p.type),S("error"),d.write(`\r
\x1B[31m[连接发生错误]\x1B[0m\r
`)}},[r,n,c,k,C]);a.useEffect(()=>{if(!e)return;if(!r){console.error("[PodExec:initEffect] ABORT: clusterId is falsy:",r);return}if(!c){console.error("[PodExec:initEffect] ABORT: podName is falsy:",c);return}let d=!1,B=0;const E=performance.now(),p=()=>{if(d)return;const u=v.current;if(!u){B++,B<20?requestAnimationFrame(p):console.error("[PodExec:tryInit] FAILED: containerRef still null after 20 retries (",Math.round(performance.now()-E),"ms)");return}const o=new We.Terminal({cursorBlink:!0,fontSize:14,fontFamily:'Menlo, Monaco, "Courier New", monospace',allowProposedApi:!0,scrollback:5e3,theme:{background:"#0f172a",foreground:"#e2e8f0",cursor:"#38bdf8",selectionBackground:"#1e40af",black:"#1e293b",red:"#ef4444",green:"#10b981",yellow:"#f59e0b",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e2e8f0",brightBlack:"#475569",brightRed:"#f87171",brightGreen:"#34d399",brightYellow:"#fbbf24",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#f8fafc"}}),l=new He.FitAddon;o.loadAddon(l),i.current=o,F.current=l,o.onData(y=>{m.current&&m.current.readyState===WebSocket.OPEN?m.current.send(JSON.stringify({status:0,data:y})):console.warn("[PodExec:term] TX dropped — WS not open, readyState=",m.current?.readyState)}),o.open(u),requestAnimationFrame(()=>{try{l.fit()}catch{}}),j.current=!0,R()};return requestAnimationFrame(p),()=>{d=!0}},[e,r,c]),a.useEffect(()=>{if(!e){try{m.current?.close()}catch{}try{i.current?.dispose()}catch{}i.current=null,m.current=null,F.current=null,j.current=!1,S("idle")}},[e]),a.useEffect(()=>{e&&i.current&&j.current&&R()},[k,C]),a.useEffect(()=>{if(!e)return;const d=v.current;if(!d)return;let B;const E=new ResizeObserver(()=>{clearTimeout(B),B=setTimeout(()=>{if(F.current&&i.current)try{F.current.fit(),i.current.focus();const{cols:p,rows:u}=i.current;m.current?.readyState===WebSocket.OPEN&&m.current.send(JSON.stringify({status:1,cols:p,rows:u}))}catch{}},60)});return E.observe(d),()=>{clearTimeout(B),E.disconnect()}},[e,T]);const P=w==="connected"?"bg-emerald-400":w==="error"?"bg-red-400":w==="closed"?"bg-slate-500":"bg-amber-400",D=w==="connected"?"已连接":w==="connecting"?"连接中":w==="error"?"连接错误":w==="closed"?"已断开":"空闲",z=a.useCallback(()=>{try{i.current?.focus()}catch{}},[]);return t.jsx(Pe,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:279:5",open:e,onOpenChange:s,children:t.jsxs(Ee,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:280:7",showCloseButton:!1,className:ee("bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] p-0 gap-0","!duration-0 !transition-none",T?"!max-w-none !w-screen !h-screen !rounded-none !translate-x-0 !translate-y-0 !left-0 !top-0":""),style:T?{maxWidth:"100vw",width:"100vw",height:"100vh"}:{maxWidth:"960px",width:"92vw"},children:[t.jsxs(Ne,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:289:9",className:"sr-only",children:["exec — ",c]}),t.jsx(Se,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:290:9",className:"sr-only",children:"进入 Pod 容器执行命令"}),t.jsxs("div",{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:293:9",className:"flex items-center justify-between gap-2 px-4 py-2 border-b border-[var(--dg-border)] flex-wrap",children:[t.jsxs("div",{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:294:11",className:"flex items-center gap-2 text-sm min-w-0",children:[t.jsx("div",{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:295:13",className:ee("w-2 h-2 rounded-full shrink-0",P),title:D}),t.jsx(Ae,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:296:13",className:"h-4 w-4 text-blue-400 shrink-0"}),t.jsxs("span",{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:297:13",className:"text-[var(--dg-text-primary)] font-medium truncate",children:["exec — ",c]}),w==="connecting"&&t.jsx(V,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:298:44",className:"h-3 w-3 animate-spin text-[var(--dg-text-muted)]"}),t.jsx("span",{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:299:13",className:"text-xs text-[var(--dg-text-muted)]",children:D})]}),t.jsxs("div",{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:301:11",className:"flex items-center gap-2",children:[x.length>0&&t.jsxs(te,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:303:15",value:k,onValueChange:_,children:[t.jsxs(se,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:304:17",className:"h-8 w-[150px] text-xs bg-[var(--dg-bg-hover)] border-[var(--dg-border)]",children:[t.jsx(Re,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:305:19",className:"h-3 w-3 mr-1 text-[var(--dg-text-muted)]"}),t.jsx(re,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:306:19",placeholder:"容器"})]}),t.jsx(oe,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:308:17",children:x.map(d=>t.jsx(ne,{"code-path":"src/components/kubernetes/PodExecTerminal.tsx:308:55",value:d,children:d}, Line truncated