chore: 重新编译前端产物(补装CodeMirror依赖)

This commit is contained in:
attacker committed 2026-06-26 23:29:08 +08:00
1 parent 23e9e3da62
commit 4e384ca401
115 files changed
+147 -147

No files matched your search

@@ -0,0 +1,27 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PodFileBrowser-B-U8iHmY.js","assets/vendor-codemirror-B1SGo4xl.js","assets/index-Dungj95X.js","assets/vendor-icons-DmqcWdzX.js","assets/index-GY9Szy-F.css","assets/use-toast-DNZLibQY.js","assets/index-drGq01ok.js","assets/k8s-yaml-utils-4KZB_Bq_.js","assets/select-CiTqGGhE.js","assets/index-5FEebgvX.js","assets/vendor-xterm-20M9KZE1.js","assets/vendor-xterm-DXOU9pbP.css","assets/badge-CGJlVD3L.js"])))=>i.map(i=>d[i]);
import{j as e,r as d}from"./vendor-codemirror-B1SGo4xl.js";import{B as v,ab as Os,ac as $s,ad as _s,ag as bt,f as dt,r as Ls,u as zs,L as yt,s as Ws,o as is,i as ps,ah as Gs,g as Vs}from"./index-Dungj95X.js";import{C as U,a as Y,b as he,c as ue}from"./card-BIfzBCEy.js";import{B as ae}from"./badge-CGJlVD3L.js";import{k as K}from"./index-drGq01ok.js";import{u as Me}from"./use-toast-DNZLibQY.js";import{c as vt,m as Fs,h as Us,p as ms,i as Gt,Y as kt,P as Ys,a as qs}from"./PodFileBrowser-B-U8iHmY.js";import{I as f}from"./input-CXoUQQLm.js";import{e as Vt,a as Ft,f as Pt,S as Ce,s as Ks}from"./k8s-yaml-utils-4KZB_Bq_.js";import{E as Js,n as Xs}from"./EventTable-BaH7H8dT.js";import{Q as xs,f as hs,r as us,H as bs,bb as Qs,F as At,o as Zs,T as be,L as ve,N as Ae,E as en,A as ys,b as vs,n as tn,k as Ue,P as te,aw as sn,s as Tt,bc as nn,aO as ks,bd as gt,$ as it,g as on,be as an,a4 as gs,j as js,as as rn,am as fs,aj as cn,z as Ns,R as Ye,D as tt,b4 as ln,h as Mt,aY as dn,aX as pn,G as mn,M as xn,p as wt,y as Ct,d as Ut,J as jt,X as Ss,ae as Yt,l as ws,a as hn,m as qt,aI as Kt,bf as un,ao as bn}from"./vendor-icons-DmqcWdzX.js";import{T as Ge,a as Ve,b as Ee,c as ce,d as Fe,e as le}from"./table-B2F10oba.js";import{L as H}from"./label-CMpUoC87.js";import{T as st}from"./textarea-BxfjmLq5.js";import{S as nt,a as ot,b as at,c as rt,d as fe}from"./select-CiTqGGhE.js";import{S as Ht}from"./switch-Bxiq4EHp.js";import{R as Cs,c as yn}from"./ResourceVisualEditor-BN2gGuH7.js";import{C as Jt}from"./code-snippet-block-E9P2jHS4.js";import"./vendor-xterm-20M9KZE1.js";import"./index-5FEebgvX.js";const vn=t=>Array.isArray(t)?t:t?.list||t?.items||t?.data||[];function kn(t,s){return Object.keys(s).length===0?!1:Object.entries(s).every(([a,o])=>t[a]===o)}function gn(t,s,a){const o=new Set;for(const n of a){const c=n.name||n.metadata?.name||"";if(!c)continue;const r=n.spec?.selector||n.selector||{};(c===t||kn(s,r))&&o.add(c)}return[...o].sort()}async function jn(t,s,a){const o=await K.getResourceYaml(t,s,"deployments",a),{manifest:n}=await vt(o),c=n?.spec?.selector?.matchLabels||n?.spec?.template?.metadata?.labels||{},r=await K.getNamespaceServices(t,s).catch(()=>[]),i=gn(a,c,vn(r)),k=[];if(n)k.push(await Fs(n));else{const{yaml:l}=await vt(o);l.trim()&&k.push(l)}for(const l of i)try{const x=await K.getResourceYaml(t,s,"services",l),{yaml:S}=await vt(x);S.trim()&&k.push(S)}catch{}return k.join(`
---
`)}async function fn(t,s,a){const{manifests:o}=await Us(a);if(o.length===0)throw new Error("YAML 内容为空或解析失败");for(const n of o){const c=String(n.kind||"").toLowerCase(),r=String(n.metadata?.name||"").trim();if(!c||!r)throw new Error("每个 YAML 文档必须包含 kind 和 metadata.name");const i=await ms(n);if(c==="deployment"){await K.updateResourceYaml(t,s,"deployments",r,i);continue}if(c==="service"){await K.applyYAML(t,i);continue}throw new Error(`不支持的资源类型: ${n.kind}(仅支持 Deployment / Service)`)}}function Nn(t){const s=t.conditions||t.pod_conditions||[],a=n=>s.find(c=>(c.type||c.Type)===n),o=n=>n?.lastTransitionTime||n?.LastTransitionTime||n?.last_transition_time;return{scheduled:o(a("PodScheduled")||{}),initialized:o(a("Initialized")||{}),containersReady:o(a("ContainersReady")||{}),ready:o(a("Ready")||{}),startTime:t.start_time||t.startTime}}function Sn(t){const s=Nn(t);return[{label:"已调度",ts:s.scheduled,color:Ce.blue},{label:"已初始化",ts:s.initialized,color:Ce.orange},{label:"容器已就绪",ts:s.containersReady,color:Ce.green},{label:"容器组已就绪",ts:s.ready,color:Ce.green}]}function Re({label:t,value:s}){return e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:43:5",children:[e.jsx("p",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:44:7",className:"text-xs text-[var(--dg-text-muted)] mb-1",children:t}),e.jsx("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:45:7",className:"text-sm text-[var(--dg-text-primary)]",children:s})]})}function Es({pod:t}){const s=Sn(t),a=Vt(s[0]?.ts,s[s.length-1]?.ts);return e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:92:5",className:"rounded-lg bg-[var(--dg-bg-tertiary)]/60 px-4 py-3",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:93:7",className:"flex items-center justify-between mb-3",children:[e.jsx("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:94:9",className:"text-xs text-[var(--dg-text-muted)]",children:"启动时间线"}),a!=null&&e.jsxs("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:96:11",className:"text-[11px] text-[var(--dg-text-muted)]",children:["总耗时 ",e.jsx("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:97:17",className:"font-mono text-[var(--dg-text-secondary)]",children:Ft(a)})]})]}),e.jsx("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:101:7",className:"flex items-start gap-0 overflow-x-auto",children:s.map((o,n)=>{const c=s[n-1],r=Vt(c?.ts,o.ts),i=!!o.ts;return e.jsxs(d.Fragment,{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:107:13",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:108:15",className:"flex flex-col min-w-[108px]",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:109:17",className:"flex items-center gap-2",children:[e.jsx("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:110:19",className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold",style:{background:i?`${o.color}22`:"var(--dg-bg-secondary)",color:i?o.color:"var(--dg-text-muted)",border:`1px solid ${i?`${o.color}55`:"var(--dg-border)"}`},children:n+1}),e.jsx("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:120:19",className:"text-xs font-medium",style:{color:i?o.color:"var(--dg-text-muted)"},children:o.label})]}),e.jsx("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:124:17",className:"mt-1.5 pl-7 text-[11px] font-mono text-[var(--dg-text-muted)]",children:o.ts?Pt(o.ts):"—"})]}),n<s.length-1&&e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:129:17",className:"flex flex-col items-center justify-center px-1 pt-2.5 min-w-[48px]",children:[e.jsx("div",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:130:19",className:"h-px w-full",style:{background:i&&s[n+1]?.ts?o.color:"var(--dg-border)"}}),e.jsx("span",{"code-path":"src/components/kubernetes/deployment-view/helpers.tsx:134:19",className:"mt-1 text-[10px] text-[var(--dg-text-muted)]",children:r!=null?Ft(r):""})]})]},o.label)})})]})}function wn({clusterCode:t,pods:s,onShowPodLogs:a,onShowPodTerminal:o,onShowPodYaml:n,onShowPodFileBrowser:c,onDeletePod:r,expandedPod:i,setExpandedPod:k}){return s.length===0?e.jsx("div",{"code-path":"src/components/kubernetes/deployment-view/PodsTab.tsx:24:12",className:"text-center text-[var(--dg-text-muted)] py-12",children:"暂无容器组"}):e.jsx(U,{"code-path":"src/components/kubernetes/deployment-view/PodsTab.tsx:28:5",className:"dg-card overflow-hidden",children:e.jsxs(Y,{"code-path":"src/components/kubernetes/deployment-view/PodsTab.tsx:29:7",className:"p-0 overflow-x-auto",children:[e.jsxs("div",{"c Line truncated
`):n.exec?.command||"",initialDelaySeconds:n.initialDelaySeconds,periodSeconds:n.periodSeconds,timeoutSeconds:n.timeoutSeconds,successThreshold:n.successThreshold,failureThreshold:n.failureThreshold}},a=n=>{if(!n)return{type:"none"};let c="none";return n.exec?c="exec":n.httpGet?c="httpGet":n.tcpSocket&&(c="tcpSocket"),{type:c,execCommand:Array.isArray(n.exec?.command)?n.exec.command.join(`
`):"",httpPath:n.httpGet?.path||"",httpPort:n.httpGet?.port??"",tcpPort:n.tcpSocket?.port??""}},o=t.securityContext;return{name:t.name||"",image:t.image||"",imagePullPolicy:t.imagePullPolicy||"",command:Array.isArray(t.command)?t.command:[],args:Array.isArray(t.args)?t.args:[],workingDir:t.workingDir||"",env:(Array.isArray(t.env)?t.env:[]).map(n=>({name:n.name||"",value:n.value??""})),ports:(Array.isArray(t.ports)?t.ports:[]).map(n=>({name:n.name||"",containerPort:n.containerPort??"",protocol:n.protocol||"TCP"})),resources:{requests:t.resources?.requests||{},limits:t.resources?.limits||{}},livenessProbe:s(t.livenessProbe),readinessProbe:s(t.readinessProbe),startupProbe:s(t.startupProbe),lifecycle:t.lifecycle?{postStart:t.lifecycle.postStart?a(t.lifecycle.postStart):void 0,preStop:t.lifecycle.preStop?a(t.lifecycle.preStop):void 0}:null,securityContext:o?{runAsUser:o.runAsUser,runAsGroup:o.runAsGroup,runAsNonRoot:o.runAsNonRoot,privileged:o.privileged,readOnlyRootFilesystem:o.readOnlyRootFilesystem,allowPrivilegeEscalation:o.allowPrivilegeEscalation,capabilitiesAdd:o.capabilities?.add||[],capabilitiesDrop:o.capabilities?.drop||[]}:null,volumeMounts:(Array.isArray(t.volumeMounts)?t.volumeMounts:[]).map(n=>({name:n.name||"",mountPath:n.mountPath||"",subPath:n.subPath||"",readOnly:n.readOnly||!1}))}}function Qt(t=""){return{name:t,image:"",imagePullPolicy:"IfNotPresent",command:[],args:[],workingDir:"",env:[],ports:[],resources:{},livenessProbe:null,readinessProbe:null,startupProbe:null,lifecycle:null,securityContext:null,volumeMounts:[]}}function ft(t){if(!t||t.type==="none"||!t.type)return;const s={};if(t.type==="httpGet")s.httpGet={},t.httpPath&&(s.httpGet.path=t.httpPath),t.httpPort!==""&&t.httpPort!=null&&(s.httpGet.port=typeof t.httpPort=="number"?t.httpPort:Number(t.httpPort)),t.httpHost&&(s.httpGet.host=t.httpHost);else if(t.type==="tcpSocket")s.tcpSocket={},t.tcpPort!==""&&t.tcpPort!=null&&(s.tcpSocket.port=typeof t.tcpPort=="number"?t.tcpPort:Number(t.tcpPort));else if(t.type==="exec"){const a=(t.execCommand||"").split(`
`).map(o=>o.trim()).filter(Boolean);a.length&&(s.exec={command:a})}return t.initialDelaySeconds!=null&&(s.initialDelaySeconds=t.initialDelaySeconds),t.periodSeconds!=null&&(s.periodSeconds=t.periodSeconds),t.timeoutSeconds!=null&&(s.timeoutSeconds=t.timeoutSeconds),t.successThreshold!=null&&(s.successThreshold=t.successThreshold),t.failureThreshold!=null&&(s.failureThreshold=t.failureThreshold),Object.keys(s).length>0?s:void 0}function Zt(t){if(!(!t||t.type==="none"||!t.type)){if(t.type==="exec"){const s=(t.execCommand||"").split(`
`).map(a=>a.trim()).filter(Boolean);return s.length?{exec:{command:s}}:void 0}if(t.type==="httpGet"){const s={httpGet:{}};return t.httpPath&&(s.httpGet.path=t.httpPath),t.httpPort!==""&&t.httpPort!=null&&(s.httpGet.port=Number(t.httpPort)),s}if(t.type==="tcpSocket"){const s={tcpSocket:{}};return t.tcpPort!==""&&t.tcpPort!=null&&(s.tcpSocket.port=Number(t.tcpPort)),s}}}function es(t){const s={name:t.name};t.image&&(s.image=t.image),t.imagePullPolicy&&(s.imagePullPolicy=t.imagePullPolicy),t.workingDir&&(s.workingDir=t.workingDir),t.command.length>0&&(s.command=t.command),t.args.length>0&&(s.args=t.args),t.env.length>0&&(s.env=t.env.filter(l=>l.name.trim()).map(l=>{const x={name:l.name};return l.value!=null&&(x.value=l.value),x})),t.ports.length>0&&(s.ports=t.ports.filter(l=>l.containerPort!=="").map(l=>{const x={containerPort:typeof l.containerPort=="number"?l.containerPort:Number(l.containerPort)};return l.name&&(x.name=l.name),l.protocol&&(x.protocol=l.protocol),x}));const a=t.resources.requests,o=t.resources.limits,n=a&&Object.values(a).some(l=>l&&l.trim()),c=o&&Object.values(o).some(l=>l&&l.trim());(n||c)&&(s.resources={},n&&(s.resources.requests={},a.cpu?.trim()&&(s.resources.requests.cpu=a.cpu),a.memory?.trim()&&(s.resources.requests.memory=a.memory)),c&&(s.resources.limits={},o.cpu?.trim()&&(s.resources.limits.cpu=o.cpu),o.memory?.trim()&&(s.resources.limits.memory=o.memory)));const r=ft(t.livenessProbe);r&&(s.livenessProbe=r);const i=ft(t.readinessProbe);i&&(s.readinessProbe=i);const k=ft(t.startupProbe);if(k&&(s.startupProbe=k),t.lifecycle){const l={},x=Zt(t.lifecycle.postStart);x&&(l.postStart=x);const S=Zt(t.lifecycle.preStop);S&&(l.preStop=S),Object.keys(l).length>0&&(s.lifecycle=l)}if(t.securityContext){const l=t.securityContext,x={};l.runAsUser!==""&&l.runAsUser!=null&&(x.runAsUser=Number(l.runAsUser)),l.runAsGroup!==""&&l.runAsGroup!=null&&(x.runAsGroup=Number(l.runAsGroup)),l.runAsNonRoot!=null&&(x.runAsNonRoot=l.runAsNonRoot),l.privileged!=null&&(x.privileged=l.privileged),l.readOnlyRootFilesystem!=null&&(x.readOnlyRootFilesystem=l.readOnlyRootFilesystem),l.allowPrivilegeEscalation!=null&&(x.allowPrivilegeEscalation=l.allowPrivilegeEscalation);const S=(l.capabilitiesAdd||[]).filter(Boolean),C=(l.capabilitiesDrop||[]).filter(Boolean);(S.length||C.length)&&(x.capabilities={},S.length&&(x.capabilities.add=S),C.length&&(x.capabilities.drop=C)),Object.keys(x).length>0&&(s.securityContext=x)}return t.volumeMounts.length>0&&(s.volumeMounts=t.volumeMounts.filter(l=>l.name.trim()&&l.mountPath.trim()).map(l=>{const x={name:l.name,mountPath:l.mountPath};return l.subPath&&(x.subPath=l.subPath),l.readOnly&&(x.readOnly=!0),x})),s}function ts(t){return t.join(`
`)}function ss(t){return t.split(`
`).map(s=>s.trim()).filter(Boolean)}function Mn({container:t,onUpdate:s}){const a=t,o="flex items-center gap-1.5 text-xs font-semibold text-slate-300 mb-2";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:36:7",className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:37:9",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:38:11",className:"text-slate-400 text-xs",children:"容器名称"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:39:11",value:a.name,onChange:n=>s({name:n.target.value}),placeholder:"my-app",className:"mt-1 bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:43:9",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:44:11",className:"text-slate-400 text-xs",children:"容器镜像"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:45:11",value:a.image,onChange:n=>s({image:n.target.value}),placeholder:"nginx:1.25",className:"mt-1 bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:49:9",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:50:11",className:"text-slate-400 text-xs",children:"镜像拉取策略"}),e.jsxs(nt,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:51:11",value:a.imagePullPolicy||"__none",onValueChange:n=>s({imagePullPolicy:n==="__none"?"":n}),children:[e.jsx(ot,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:52:13",className:"mt-1 bg-slate-800 border-slate-700 text-slate-200 text-xs h-8",children:e.jsx(at,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:53:15"})}),e.jsxs(rt,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:55:13",className:"bg-slate-900 border-slate-700",children:[e.jsx(fe,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:56:15",value:"__none",className:"text-slate-400",children:"不设置(默认 IfNotPresent)"}),e.jsx(fe,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:57:15",value:"Always",className:"text-slate-200",children:"Always"}),e.jsx(fe,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:58:15",value:"IfNotPresent",className:"text-slate-200",children:"IfNotPresent"}),e.jsx(fe,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:59:15",value:"Never",className:"text-slate-200",children:"Never"})]})]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:63:9",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:64:11",className:"text-slate-400 text-xs",children:"工作目录 (workingDir)"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:65:11",value:a.workingDir||"",onChange:n=>s({workingDir:n.target.value}),placeholder:"/app",className:"mt-1 bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"})]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:72:7",className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:73:9",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:74:11",className:"text-slate-400 text-xs",children:"启动命令 (command) — 每行一个"}),e.jsx(st,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:75:11",value:ts(a.command),placeholder:`/bin/sh
-c`,onChange:n=>s({command:ss(n.target.value)}),className:"mt-1 bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs min-h-[60px]"})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:79:9",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:80:11",className:"text-slate-400 text-xs",children:"启动参数 (args) — 每行一个"}),e.jsx(st,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:81:11",value:ts(a.args),placeholder:`--config=/etc/app.yaml
--debug`,onChange:n=>s({args:ss(n.target.value)}),className:"mt-1 bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs min-h-[60px]"})]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:88:7",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:89:9",className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:90:11",className:o,children:[e.jsx(us,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:90:39",className:"h-3.5 w-3.5 text-cyan-400"})," 环境变量"]}),e.jsxs(v,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:91:11",size:"sm",variant:"outline",className:"h-6 border-slate-700 text-slate-300 text-[11px]",onClick:()=>s({env:[...a.env,{name:"",value:""}]}),children:[e.jsx(te,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:93:13",className:"h-3 w-3 mr-1"}),"新增"]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:96:9",className:"space-y-1.5",children:[a.env.map((n,c)=>e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:98:13",className:"grid grid-cols-[1fr_1.4fr_auto] gap-2",children:[e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:99:15",value:n.name,placeholder:"KEY",onChange:r=>{const i=[...a.env];i[c]={...n,name:r.target.value},s({env:i})},className:"bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:102:15",value:n.value||"",placeholder:"value",onChange:r=>{const i=[...a.env];i[c]={...n,value:r.target.value},s({env:i})},className:"bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"}),e.jsx(v,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:105:15",variant:"ghost",size:"icon",className:"h-8 w-8 text-red-400",onClick:()=>s({env:a.env.filter((r,i)=>i!==c)}),children:e.jsx(be,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:107:17",className:"h-3.5 w-3.5"})})]},c)),a.env.length===0&&e.jsx("p",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:111:34",className:"text-[11px] text-slate-600",children:"无环境变量"})]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:116:7",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:117:9",className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:118:11",className:o,children:[e.jsx(Ae,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:118:39",className:"h-3.5 w-3.5 text-indigo-400"})," 端口"]}),e.jsxs(v,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:119:11",size:"sm",variant:"outline",className:"h-6 border-slate-700 text-slate-300 text-[11px]",onClick:()=>s({ports:[...a.ports,{name:"",containerPort:"",protocol:"TCP"}]}),children:[e.jsx(te,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:121:13",className:"h-3 w-3 mr-1"}),"新增"]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:124:9",className:"space-y-1.5",children:[a.ports.map((n,c)=>e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:126:13",className:"grid grid-cols-[1fr_1fr_100px_auto] gap-2",children:[e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:127:15",value:n.name||"",placeholder:"http",onChange:r=>{const i=[...a.ports];i[c]={...n,name:r.target.value},s({ports:i})},className:"bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:130:15",type:"number",value:n.containerPort,placeholder:"8080",onChange:r=>{const i=[...a.ports];i[c]={...n,containerPort:r.target.value},s({ports:i})},className:"bg-slate-800 border-slate-700 text-slate-200 font-mono text-xs h-8"}),e.jsxs(nt,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:133:15",value:n.protocol||"TCP",onValueChange:r=>{const i=[...a.ports];i[c]={...n,protocol:r},s({ports:i})},children:[e.jsx(ot,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:134:17",className:"bg-slate-800 border-slate-700 text-slate-200 text-xs h-8",children:e.jsx(at,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:135:19"})}),e.jsxs(rt,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.tsx:137:17",className:"bg-slate-900 border-slate-700",children:[e.jsx(fe,{"code-path":"src/components/kubernetes/deployment-edit/ContainerEditor.ts Line truncated
114.114.114.114`,rows:3,className:"w-full mt-1 bg-slate-800 border border-slate-700 rounded text-xs text-slate-300 font-mono p-2 resize-y"})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:74:13",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:75:15",className:"text-slate-500 text-xs",children:"searches(搜索域,每行一个)"}),e.jsx("textarea",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:76:15",value:a,onChange:b=>o(b.target.value),placeholder:`svc.cluster.local
cluster.local`,rows:3,className:"w-full mt-1 bg-slate-800 border border-slate-700 rounded text-xs text-slate-300 font-mono p-2 resize-y"})]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:85:11",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:86:13",className:"flex items-center justify-between mb-1",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:87:15",className:"text-slate-400 text-xs",children:"options(DNS 选项)"}),e.jsxs(v,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:88:15",size:"sm",variant:"ghost",className:"h-6 text-xs text-slate-400",onClick:k,children:[e.jsx(te,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:89:17",className:"h-3 w-3 mr-1"}),"添加"]})]}),n.length===0?e.jsx("p",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:93:15",className:"text-xs text-slate-600 italic",children:"未配置"}):n.map((b,w)=>e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:96:17",className:"flex items-center gap-2 mb-1.5",children:[e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:97:19",value:b.name,onChange:P=>l(w,{name:P.target.value}),placeholder:"ndots",className:"flex-1 h-7 bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsx("span",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:103:19",className:"text-slate-600",children:":"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:104:19",value:b.value,onChange:P=>l(w,{value:P.target.value}),placeholder:"5(可留空)",className:"flex-1 h-7 bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsx(v,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:110:19",size:"icon",variant:"ghost",className:"h-6 w-6 text-red-400",onClick:()=>x(w),children:e.jsx(be,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:111:21",className:"h-3 w-3"})})]},w))]})]})]}),e.jsxs(U,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:120:7",className:"bg-slate-900 border-slate-800",children:[e.jsx(he,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:121:9",className:"pb-3",children:e.jsxs(ue,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:122:11",className:"text-sm text-slate-200 flex items-center gap-2",children:[e.jsx(xn,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:123:13",className:"h-4 w-4 text-amber-400"}),"主机别名 (hostAliases)"]})}),e.jsxs(Y,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:126:9",className:"pt-0 space-y-2",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:127:11",className:"flex items-center justify-between mb-1",children:[e.jsx(H,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:128:13",className:"text-slate-400 text-xs",children:"IP → 主机名映射(注入 Pod 的 /etc/hosts)"}),e.jsxs(v,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:129:13",size:"sm",variant:"ghost",className:"h-6 text-xs text-slate-400",onClick:S,children:[e.jsx(te,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:130:15",className:"h-3 w-3 mr-1"}),"添加"]})]}),r.length===0?e.jsx("p",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:134:13",className:"text-xs text-slate-600 italic",children:"未配置"}):r.map((b,w)=>e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:137:15",className:"flex items-center gap-2",children:[e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:138:17",value:b.ip,onChange:P=>C(w,{ip:P.target.value}),placeholder:"10.10.10.72",className:"w-40 h-7 bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsx("span",{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:144:17",className:"text-slate-600",children:"→"}),e.jsx(f,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:145:17",value:b.hostnames,onChange:P=>C(w,{hostnames:P.target.value}),placeholder:"gitlab.local, registry.local",className:"flex-1 h-7 bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsx(v,{"code-path":"src/components/kubernetes/deployment-edit-advanced/DnsHostSection.tsx:151:17",size:"icon",variant:"ghost",className:"h-6 w-6 text-red-400",onClick:()=>y(w),children:e.jsx(be,{"code-path":"src/compone Line truncated
`):""),$t(Array.isArray(oe.searches)?oe.searches.join(`
`):"");const ht=Array.isArray(oe.options)?oe.options:[];Lt(ht.map(pe=>({name:pe.name||"",value:pe.value||""}))),x(!1)},[o]);const Ts=()=>ye(D=>[...D,{key:"",value:""}]),Ms=D=>ye(T=>T.filter((G,ne)=>ne!==D)),Hs=(D,T)=>ye(G=>G.map((ne,re)=>re===D?{...ne,...T}:ne)),Is=async()=>{k(!0);try{const D=JSON.parse(JSON.stringify(S));D.spec=D.spec||{},D.spec.template=D.spec.template||{},D.spec.template.spec=D.spec.template.spec||{};const T=D.spec.template.spec;if(D.spec.strategy={type:y},y==="RollingUpdate"&&(D.spec.strategy.rollingUpdate={maxSurge:w,maxUnavailable:I}),F&&(D.spec.revisionHistoryLimit=Number(F)),X&&(D.spec.progressDeadlineSeconds=Number(X)),W==="nodeName"&&$.trim())T.nodeName=$.trim(),delete T.nodeSelector,T.affinity&&delete T.affinity.nodeAffinity;else if(W==="nodeSelector"){const z={};for(const{key:oe,value:ht}of me){const pe=oe.trim();pe&&(z[pe]=ht)}Object.keys(z).length>0?T.nodeSelector=z:delete T.nodeSelector,T.nodeName&&delete T.nodeName,T.affinity&&delete T.affinity.nodeAffinity}else if(W==="nodeAffinity"){const z=me.filter(oe=>oe.key.trim()).map(oe=>({key:oe.key.trim(),operator:"In",values:[oe.value]}));z.length>0?(T.affinity=T.affinity||{},T.affinity.nodeAffinity={requiredDuringSchedulingIgnoredDuringExecution:{nodeSelectorTerms:[{matchExpressions:z}]}}):T.affinity&&delete T.affinity.nodeAffinity,delete T.nodeSelector,T.nodeName&&delete T.nodeName}const G=p.filter(z=>z.key||z.operator==="Exists").map(z=>{const oe={};return z.key&&(oe.key=z.key),z.operator&&(oe.operator=z.operator),z.value&&z.operator!=="Exists"&&(oe.value=z.value),z.effect&&(oe.effect=z.effect),z.tolerationSeconds&&z.effect==="NoExecute"&&(oe.tolerationSeconds=Number(z.tolerationSeconds)),oe});G.length>0?T.tolerations=G:delete T.tolerations,u&&(T.dnsPolicy=u),L&&(T.restartPolicy=L),g&&(T.schedulerName=g),O&&(T.terminationGracePeriodSeconds=Number(O)),se&&(T.serviceAccountName=se);const ne={};de&&(ne.fsGroup=Number(de)),Se&&(ne.runAsUser=Number(Se)),$e&&(ne.runAsGroup=Number($e)),Be&&(ne.runAsNonRoot=!0),Object.keys(ne).length>0?T.securityContext=ne:delete T.securityContext,E?T.hostNetwork=!0:delete T.hostNetwork,je?T.hostIPC=!0:delete T.hostIPC,Te?T.hostPID=!0:delete T.hostPID,qe?T.shareProcessNamespace=!0:delete T.shareProcessNamespace;const re=Ke.filter(z=>z.ip.trim()).map(z=>({ip:z.ip.trim(),hostnames:z.hostnames.split(/[,\s]+/).map(oe=>oe.trim()).filter(Boolean)})).filter(z=>z.hostnames.length>0);re.length>0?T.hostAliases=re:delete T.hostAliases;const ke={},ze=Bt.split(`
`).map(z=>z.trim()).filter(Boolean);ze.length>0&&(ke.nameservers=ze);const Je=Ot.split(`
`).map(z=>z.trim()).filter(Boolean);Je.length>0&&(ke.searches=Je);const we=_t.filter(z=>z.name.trim()).map(z=>{const oe={name:z.name.trim()};return z.value.trim()&&(oe.value=z.value.trim()),oe});we.length>0&&(ke.options=we),Object.keys(ke).length>0?T.dnsConfig=ke:delete T.dnsConfig,await pt(t,s,a,D),r({title:"高级设置已保存",description:`${a} 更新已提交`}),n(D)}catch(D){r({title:"保存失败",description:D?.message||String(D),variant:"destructive"})}finally{k(!1)}};return l?e.jsx(U,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:323:7",className:"bg-slate-900 border-slate-800",children:e.jsxs(Y,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:324:9",className:"p-12 text-center",children:[e.jsx(ve,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:325:11",className:"h-6 w-6 animate-spin mx-auto text-slate-500"}),e.jsx("p",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:326:11",className:"text-slate-500 mt-3 text-sm",children:"加载中..."})]})}):o?e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:343:5",className:"space-y-4",children:[e.jsxs(U,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:345:7",className:"bg-slate-900 border-slate-800",children:[e.jsx(he,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:346:9",className:"pb-3",children:e.jsxs(ue,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:347:11",className:"text-sm text-slate-200 flex items-center gap-2",children:[e.jsx(Ye,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:348:13",className:"h-4 w-4 text-blue-400"}),"更新策略 (Strategy)"]})}),e.jsxs(Y,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:351:9",className:"pt-0 space-y-3",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:352:11",className:"flex items-center gap-4",children:[e.jsxs("label",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:353:13",className:"flex items-center gap-1.5 text-xs text-slate-300 cursor-pointer",children:[e.jsx("input",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:354:15",type:"radio",checked:y==="RollingUpdate",onChange:()=>b("RollingUpdate"),className:"accent-blue-500"}),"RollingUpdate(滚动更新)"]}),e.jsxs("label",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:358:13",className:"flex items-center gap-1.5 text-xs text-slate-300 cursor-pointer",children:[e.jsx("input",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:359:15",type:"radio",checked:y==="Recreate",onChange:()=>b("Recreate"),className:"accent-blue-500"}),"Recreate(重建)"]})]}),y==="RollingUpdate"&&e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:365:13",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:366:15",children:[e.jsx(H,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:367:17",className:"text-slate-500 text-xs",children:"maxSurge(整数或百分比,超出期望副本数)"}),e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:368:17",value:w,onChange:D=>P(D.target.value),placeholder:"25%",className:"h-8 mt-1 bg-slate-800 border-slate-700 text-slate-200 text-sm font-mono"})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:371:15",children:[e.jsx(H,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:372:17",className:"text-slate-500 text-xs",children:"maxUnavailable(整数或百分比,不可用上限)"}),e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:373:17",value:I,onChange:D=>M(D.target.value),placeholder:"25%",className:"h-8 mt-1 bg-slate-800 border-slate-700 text-slate-200 text-sm font-mono"})]})]})]})]}),e.jsxs(U,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:382:7",className:"bg-slate-900 border-slate-800",children:[e.jsx(he,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:383:9",className:"pb-3",children:e.jsxs(ue,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:384:11",className:"text-sm text-slate-200 flex items-center gap-2",children:[e.jsx(vs,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:385:13",className:"h-4 w-4 text-amber-400"}),"历史版本 & 进度"]})}),e.jsxs(Y,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:388:9",className:"pt-0 grid grid-cols-2 gap-3",children:[e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:389:11",children:[e.jsx(H,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:390:13",className:"text-slate-500 text-xs",children:"revisionHistoryLimit(保留 RS 历史)"}),e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditAdvanced.tsx:391:13",type:"numbe Line truncated
bg-slate-800 border border-slate-700 text-slate-300 hover:border-blue-500/50 hover:text-blue-300 transition-colors`,children:[e.jsx(gs,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:424:23",className:"h-2.5 w-2.5"}),p.label,e.jsxs("span",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:426:23",className:"text-slate-500 text-[9px]",children:[p.protocol," ",p.port,":",p.targetPort]})]},p.name))})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:433:15",className:"space-y-2",children:[e.jsxs(H,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:434:17",className:"text-slate-500 text-[11px]",children:["端口配置 ",e.jsxs("span",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:435:24",className:"text-slate-600",children:["(",V.ports.length," 个端口)"]})]}),V.ports.map((p,h)=>e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:438:19",className:"flex items-center gap-1.5 p-2 rounded bg-slate-800/50 border border-slate-700/50",children:[e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:440:21",value:p.name,onChange:u=>$(h,"name",u.target.value),placeholder:"http",className:"h-7 w-[72px] bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsxs("select",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:444:21",value:p.protocol,onChange:u=>$(h,"protocol",u.target.value),className:"h-7 bg-slate-800 border border-slate-700 rounded text-xs text-slate-300 px-1.5 w-16",children:[e.jsx("option",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:446:23",value:"TCP",children:"TCP"}),e.jsx("option",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:447:23",value:"UDP",children:"UDP"})]}),e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:450:21",value:p.port,onChange:u=>$(h,"port",u.target.value),type:"number",placeholder:"port",className:"h-7 w-[72px] bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsx("span",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:453:21",className:"text-slate-600 text-[10px]",children:"→"}),e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:454:21",value:p.targetPort,onChange:u=>$(h,"targetPort",u.target.value),type:"number",placeholder:"targetPort",className:"h-7 w-[72px] bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),V.type==="NodePort"&&e.jsx(f,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:459:23",value:p.nodePort,onChange:u=>$(h,"nodePort",u.target.value),type:"number",placeholder:"30000-32767",className:"h-7 w-[80px] bg-slate-800 border-slate-700 text-slate-300 text-xs font-mono"}),e.jsx(v,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:464:21",size:"icon",variant:"ghost",className:"h-6 w-6 text-slate-500 hover:text-red-400",onClick:()=>Z(h),disabled:V.ports.length<=1,children:e.jsx(Tt,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:466:23",className:"h-3 w-3"})})]},h)),e.jsxs(v,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:471:17",size:"sm",variant:"outline",className:"h-7 w-full border-dashed border-slate-700 text-slate-400 text-xs",onClick:()=>Q(),children:[e.jsx(te,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:473:19",className:"h-3 w-3 mr-1"}),"添加自定义端口"]})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:478:15",className:"text-[10px] text-slate-500 border-t border-slate-700/50 pt-2",children:[e.jsx("span",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:479:17",className:"text-slate-600",children:"selector (自动检测): "}),Object.keys(b).length>0?Object.entries(b).map(([p,h])=>e.jsxs("code",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:482:21",className:"bg-slate-800 px-1 py-0.5 rounded text-slate-400 ml-1",children:[p,"=",h]},p)):e.jsx("span",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:485:19",className:"text-slate-600 italic",children:"未检测到"})]}),e.jsxs("div",{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:489:15",className:"flex justify-end gap-2 pt-1",children:[e.jsx(v,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:490:17",size:"sm",variant:"ghost",className:"h-7 text-xs text-slate-400",onClick:()=>F(null),children:"取消"}),e.jsx(v,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:491:17",size:"sm",className:"h-7 bg-blue-600 hover:bg-blue-700 text-xs",onClick:ye,children:"创建"})]})]})]})]}),e.jsxs(U,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:499:7",className:"bg-slate-900 border-slate-800",children:[e.jsxs(he,{"code-path":"src/components/kubernetes/DeploymentEditService.tsx:500:9",className:"pb-3",children:[e.jsxs("div",{"code-path":"src/components/kube Line truncated
-H 'X-AIOps-Access-Key: ${C}' \\
-H 'Content-Type: application/json' \\
-d '${P}'`:`curl -X POST '${b}' \\
-H 'X-AIOps-Access-Key: <个人中心生成的访问密钥>' \\
-H 'Content-Type: application/json' \\
-d '${P}'`,M=C?`curl -X POST '${w}' \\
-H 'X-AIOps-Access-Key: ${C}'`:`curl -X POST '${w}' \\
-H 'X-AIOps-Access-Key: <个人中心生成的访问密钥>'`,F=!!C&&!x;return e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:82:5",className:"space-y-4",children:[e.jsx("div",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:83:7",className:"rounded-md bg-[var(--dg-bg-tertiary)]/50 px-3 py-2 text-xs text-[var(--dg-text-muted)] leading-relaxed",children:r?e.jsxs("span",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:85:11",className:"inline-flex items-center gap-1.5",children:[e.jsx(ve,{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:86:13",className:"h-3 w-3 animate-spin"}),"正在读取 API 密钥…"]}):x?e.jsxs(e.Fragment,{children:["访问凭证已过期,请前往",e.jsx(yt,{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:91:13",to:"/profile",className:"text-[var(--dg-blue)] hover:underline mx-1",children:"个人中心"}),"调整有效期或轮换凭证后再复制 curl。"]}):C?e.jsx(e.Fragment,{children:"已填入本机保存的访问凭证,复制 curl 后可直接在终端执行触发更新。"}):k?e.jsxs(e.Fragment,{children:["已检测到访问凭证,但本机未缓存明文。请前往",e.jsx(yt,{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:99:13",to:"/profile",className:"text-[var(--dg-blue)] hover:underline mx-1",children:"个人中心"}),"轮换凭证一次,之后 curl 将自动填入。"]}):e.jsxs(e.Fragment,{children:["请先在",e.jsx(yt,{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:105:13",to:"/profile",className:"text-[var(--dg-blue)] hover:underline mx-1",children:"个人中心"}),"签发 CI/CD 访问凭证,curl 将自动填入。"]})}),e.jsx(Jt,{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:111:7",label:"更新镜像",code:I,copyLabel:"curl 已复制,可直接粘贴到终端执行",copyDisabled:!F,copyDisabledTitle:"请先在个人中心签发访问凭证"}),e.jsx(Jt,{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:118:7",label:"滚动重启",code:M,copyLabel:"curl 已复制,可直接粘贴到终端执行",copyDisabled:!F,copyDisabledTitle:"请先在个人中心签发访问凭证"}),e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:126:7",className:"text-xs text-[var(--dg-text-muted)] space-y-1",children:[e.jsxs("p",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:127:9",children:["• 示例镜像:",e.jsx("code",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:127:19",className:"text-[var(--dg-text-secondary)]",children:o||"—"}),n?e.jsxs(e.Fragment,{children:[" · 容器 ",e.jsx("code",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:128:36",className:"text-[var(--dg-text-secondary)]",children:n})]}):null]}),e.jsx("p",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:130:9",children:"• 使用长期 API 密钥,不会随登录 JWT 过期"}),e.jsxs("p",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:131:9",children:["• 修改 ",e.jsx("code",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:131:17",className:"text-[var(--dg-text-secondary)]",children:"image"})," 字段后执行 curl 即可触发滚动更新"]}),e.jsxs("p",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:132:9",children:["• 也可用 ",e.jsx("code",{"code-path":"src/components/kubernetes/deployment-workload/CICDWebhookContent.tsx:132:18",className:"text-[var(--dg-text-secondary)]",children:"Authorization: Bearer <密钥>"})]})]})]})}function lt({title:t,children:s,onClose:a,size:o="default"}){const n=o==="xl"?"w-[780px]":o==="lg"?"w-[680px]":"w-[460px]";return e.jsx("div",{"code-path":"src/components/kubernetes/deployment-workload/ModalShell.tsx:18:5",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",onClick:a,children:e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-workload/ModalShell.tsx:19:7",className:`bg-slate-900 border border-slate-700 rounded-xl ${n} max-w-[92vw] max-h-[85vh] flex flex-col shadow-2xl`,onClick:c=>c.stopPropagation(),children:[e.jsxs("div",{"code-path":"src/components/kubernetes/deployment-workload/ModalShell.tsx:23:9",className:"flex items-center justify-between gap-3 px-6 pt-6 pb-4 shrink-0",children:[e.jsx("h2",{"code-path":"src/components/kubernetes/deployment-workload/ModalShell.tsx:24:11",className:"text-base font-bold text-slate-100 truncate min-w-0",title:t,children:t}),e.jsx(v,{"code-path":"src/components/kubernetes/deployment-workload/ModalShell.tsx:25:11",variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 text-s Line truncated