import{r as e}from"./rolldown-runtime-BM3Ffeng.js";import{a as t,at as n,ot as r}from"./element-plus-vendor-BF9PNysW.js";import{A as i,D as a,E as o,I as s,N as c,P as l,Pt as u,Tt as d,Xt as f,Z as p,et as m,gt as h,ht as g,k as _,qt as v,r as y}from"./vue-vendor-DMUmTARL.js";import{Ko as b,U as x,Zn as S,za as C}from"./icons-vendor-Buq6V-Ga.js";import{Tt as w}from"./index-y6crcKNt.js";import{t as T}from"./runtime-env-DCz0ScEX.js";import{t as E}from"./docker-meta-DKZF5-Dc.js";import{t as D}from"./RuntimeMountTable-CZXzC9hk.js";import{t as O}from"./AdminSettingCard-BHC1YPYF.js";import{t as k}from"./RuntimeDockerMeta-CUDCL5wl.js";var A={key:0,id:`runtime-env`,class:`mt-8`},j={class:`mb-4 grid grid-cols-1 gap-4 sm:grid-cols-3`},M={class:`docker-stat-card group`},N={class:`flex items-start justify-between`},P={class:`mt-2`},F={class:`flex h-10 w-10 items-center justify-center rounded-zf-md bg-zp/10 text-zp`},I={class:`docker-stat-card group`},L={class:`flex items-start justify-between`},R={class:`mt-2 text-xl font-semibold text-primary`},z={class:`flex h-10 w-10 items-center justify-center rounded-zf-md bg-success-soft text-success`},B={class:`docker-stat-card group`},V={class:`flex items-start justify-between`},H=s({__name:`RuntimeEnvSection`,setup(e){let s=T(),{env:w,loading:H}=y(s),U=E(),{meta:W,loading:G}=y(U),K=d(!1),q=o(()=>!!w.value?.inContainer),J=o(()=>{let e=w.value?.runtime||`unknown`;return{docker:`Docker`,podman:`Podman`,kubernetes:`Kubernetes`,containerd:`containerd`,lxc:`LXC`,unknown:`未知容器`}[e]||e}),Y=o(()=>(w.value?.criticalPaths??[]).filter(e=>(e.severity===`HIGH`||e.severity===`MEDIUM`)&&(e.status===`UNMOUNTED`||e.status===`READ_ONLY`||e.status===`ANON_VOLUME`)).length),X=async()=>{K.value=!0;try{s.loaded=!1,await Promise.all([s.ensureLoaded(),U.fetch()])}finally{K.value=!1}};return p(()=>{s.ensureLoaded(),U.ensureLoaded()}),(e,o)=>{let s=b,d=r,p=n,y=O,T=t;return q.value?(m(),i(`div`,A,[l(y,{title:`运行环境`,icon:u(x),"icon-class":`bg-blue-50 text-blue-600 dark:bg-blue-500/20 dark:text-blue-300`,description:`容器运行时类型、Docker 元数据与关键路径映射检测`},{action:g(()=>[l(d,{size:`small`,link:``,type:`primary`,loading:K.value,onClick:X},{default:g(()=>[l(s,{class:`mr-1 h-4 w-4`}),o[0]||=c(` 刷新 `,-1)]),_:1},8,[`loading`])]),default:g(()=>[h((m(),i(`div`,j,[a(`div`,M,[a(`div`,N,[a(`div`,null,[o[1]||=a(`p`,{class:`text-xs font-medium text-secondary`},`容器运行时`,-1),a(`div`,P,[l(p,{size:`small`,type:`info`},{default:g(()=>[c(f(J.value),1)]),_:1})])]),a(`div`,F,[l(u(x),{class:`h-5 w-5`})])])]),a(`div`,I,[a(`div`,L,[a(`div`,null,[o[2]||=a(`p`,{class:`text-xs font-medium text-secondary`},`挂载点数`,-1),a(`p`,R,f(u(w)?.bindMounts.length??0),1)]),a(`div`,z,[l(u(C),{class:`h-5 w-5`})])])]),a(`div`,B,[a(`div`,V,[a(`div`,null,[o[3]||=a(`p`,{class:`text-xs font-medium text-secondary`},`关键路径异常`,-1),a(`p`,{class:v([`mt-2 text-xl font-semibold`,Y.value>0?`text-danger`:`text-primary`])},f(Y.value),3)]),a(`div`,{class:v([`flex h-10 w-10 items-center justify-center rounded-zf-md`,Y.value>0?`bg-danger-soft text-danger`:`bg-zp/10 text-zp`])},[l(u(S),{class:`h-5 w-5`})],2)])])])),[[T,u(H)]]),l(k,{"docker-meta":u(W),loading:u(G)},null,8,[`docker-meta`,`loading`]),l(D,{env:u(w),"docker-meta":u(W),loading:u(H)||u(G)},null,8,[`env`,`docker-meta`,`loading`])]),_:1},8,[`icon`])])):_(``,!0)}}}),U=e({default:()=>W}),W=w(H,[[`__scopeId`,`data-v-a36fd54c`]]);export{U as n,W as t};