← Back
Editing: container-detail.js
import{ay as e,al as a,e as l}from"./utils-lib.js?v=VERSION_NUMBER";import{B as s}from"./index140.js?v=VERSION_NUMBER";import{c as t,r as i,p as o,q as n,v as r,e as d,A as c,y as v,z as u,x as m,F as f,a_ as p,J as b,M as w,P as h,bN as _,bM as y,aA as g}from"./base-lib.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./ace.js?v=VERSION_NUMBER";const k={class:"container-dialog docker-container-detail"},x={class:"Table pl-[2rem] w-full h-[50rem] overflow-auto"},j={class:"item"},E={class:"flex-1"},C={class:"item"},P={class:"flex-1"},N={class:"item"},I={class:"flex-1"},M={class:"item"},O={class:"flex-1"},S={class:"inline-block whitespace-pre-line w-[40rem]"},T={class:"h-[54rem] overflow-auto"},V=l(t({__name:"container-detail",setup(l){const{refs:{currentConDetail:t}}=e(),V={mode:"ace/mode/json",theme:"ace/theme/monokai",wrap:!0,showInvisibles:!1,showFoldWidgets:!1,useSoftTabs:!0,tabSize:2,showPrintMargin:!1,readOnly:!0,fontSize:"12px"},z=i([]),A=i([]),D=i("view");return o((()=>{var e;Object.entries((null==(e=t.value.NetworkSettings)?void 0:e.Ports)||{}).forEach((e=>{let a="";e[1]&&(a+="".concat(e[1][0].HostPort,"--\x3e").concat(e[0]," "),z.value.push(a))})),(()=>{var e;null==(e=t.value.Config)||e.Env.forEach((e=>{const a=e.split("=");A.value.push({key:a[0],value:a[1]})}))})()})),(e,l)=>{const i=_,o=y,F=g,H=s,q=a;return n(),r("div",k,[d(q,{type:"card",modelValue:m(D),"onUpdate:modelValue":l[0]||(l[0]=e=>h(D)?D.value=e:null)},{default:c((()=>[d(F,{label:"视图展示",name:"view"},{default:c((()=>{var e,a,s,h;return[v("div",x,[l[6]||(l[6]=v("div",{class:"title text-[2rem] mb-[1rem]"},"容器详情",-1)),v("div",j,[l[1]||(l[1]=v("div",{class:"w-[15%]"},"镜像",-1)),v("div",E,u(m(t).Image||""),1)]),v("div",C,[l[2]||(l[2]=v("div",{class:"w-[15%]"},"端口配置",-1)),v("div",P,[(n(!0),r(f,null,p(m(z),(e=>(n(),r("div",{key:e,class:"port"},u(e),1)))),128))])]),v("div",N,[l[3]||(l[3]=v("div",{class:"w-[15%]"},"CMD",-1)),v("div",I,u((null==(a=null==(e=m(t).Config)?void 0:e.Cmd)?void 0:a.join(""))||""),1)]),v("div",M,[l[4]||(l[4]=v("div",{class:"w-[15%]"},"ENTERYPOINT",-1)),v("div",O,u((null==(s=m(t).Config)?void 0:s.Entrypoint)?null==(h=m(t).Config)?void 0:h.Entrypoint[0]:""),1)]),v("div",{class:b(["item pt-[2rem]",m(A).length>8?"!items-start":""])},[l[5]||(l[5]=v("div",{class:"w-[10%] sticky left-0 top-0"},"ENV",-1)),d(o,{column:1,border:"",class:"w-full"},{default:c((()=>[(n(!0),r(f,null,p(m(A),(e=>(n(),w(i,{key:e.key,label:e.key},{default:c((()=>[v("span",S,u(e.value),1)])),_:2},1032,["label"])))),128))])),_:1})],2)])]})),_:1}),d(F,{label:"文件展示",name:"file"},{default:c((()=>[v("div",T,[d(H,{filePath:m(t).container_info,editorOption:V},null,8,["filePath"])])])),_:1})])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-7a3ba9ea"]]);export{V as default};
Save File
Cancel