import{_ as e}from"./index237.js?v=1753954525509";import{u as a,p as s,dB as t,dC as n,f as l,dD as o,e as u,dE as i,c as p,O as r}from"./page_layout.js?v=1753954525509";import{k as c,z as A,f as d,c as g,aj as m}from"./public.js?v=1753954525509";import{D as _,bY as x,ay as f}from"./naive.js?v=1753954525509";import{k as y,P as C,Q as v,F as k,u as b,r as h,w as j,b as w,ao as B,U as L,a1 as Q,a2 as M,W as D,V as E,O as R,X as z,a3 as I,j as F,l as O,al as U,$ as H,e as N,x as P,ah as S}from"./vue.js?v=1753954525509";import{_ as V}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import{_ as $}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import{_ as G}from"./index101.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";const J=y({name:"EmptyBox",setup(e,{slots:t}){const n=a(),{t:l}=C(),o=()=>{c()};return()=>{var e;let a;return v(k,null,[0===n.taskCount?v(_,{class:"pt-80px",size:"huge",description:l("Layout.MessageBox.index_1")},null):v(k,null,[v(x,{class:"justify-between! flex-nowrap!"},{default:()=>{return[v("span",null,[l("Layout.MessageBox.index_2")]),v(f,{text:!0,type:"primary",onClick:o},(e=a=l("Public.Status.Restart"),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!b(e)?a:{default:()=>[a]}))];var e}}),v(s,{class:"mt-12px! mb-16px!"},null),null==(e=t.default)?void 0:e.call(t)])])}}}),K={class:"h-460px overflow-auto"},T={class:"install"},W={key:0,class:"cmd"},X=u(y({__name:"index",setup(e,{expose:s}){const u=a(),i=t(),p=n(),r=h(""),{send:c,close:d}=A("/sock_shell",{onMessage:(e,a)=>{const s=a.data;l(s)&&(r.value+=s)}}),g=()=>{if(p.taskList.length){const{type:e,status:a}=p.taskList[0];"execshell"===e&&("-1"===a?(r.value="",c("tail -n 100 -f /tmp/panelExec.log")):setTimeout((async()=>{await p.getList(),g()}),2e3))}};j((()=>u.taskCount),(e=>{e&&g(),i.getMessageCount()})),w((()=>{d()}));const m=async()=>{await p.getList(),0!==u.taskCount&&(g(),p.onRepetion())};return m(),s({init:m}),(e,a)=>{const s=f,t=x,n=B("scroll-bottom");return L(),Q(z(J),null,{default:M((()=>[D("div",K,[(L(!0),E(k,null,R(z(p).taskList,(l=>(L(),E("div",{key:l.id},["execshell"===l.type?(L(),E(k,{key:0},[v(t,{class:"justify-between! mb-8px"},{default:M((()=>[D("span",T,I(l.name),1),D("div",null,[F(I("0"===l.status?"waiting":e.$t("Soft.index_40"))+" ",1),a[0]||(a[0]=D("img",{src:"data:image/gif;base64,R0lGODlhDgACAIAAAHNzcwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFDgABACwAAAAAAgACAAACAoRRACH5BAUOAAEALAQAAAACAAIAAAIChFEAIfkEBQ4AAQAsCAAAAAIAAgAAAgKEUQAh+QQJDgABACwAAAAADgACAAACBoyPBpu9BQA7"},null,-1)),a[1]||(a[1]=D("span",{class:"px-5px"},"|",-1)),v(s,{text:"",color:"#20a53a",onClick:e=>(async e=>{d(),await o({id:e}),await p.getList()})(l.id)},{default:M((()=>[F(I(e.$t("Public.Btn.Del")),1)])),_:2},1032,["onClick"])])])),_:2},1024),"-1"===l.status?O((L(),E("pre",W,[F(I(z(r)),1)])),[[n]]):U("",!0)],64)):U("",!0)])))),128))])])),_:1})}}}),[["__scopeId","data-v-7b9da2ab"]]),Y=y({__name:"index",setup(e,{expose:a}){const s=t(),{loading:n,table:l,columns:o,search:u}=H(s),i=()=>{s.getMessageCount()};return a({init:i}),(e,a)=>{const s=d,t=$,p=V;return L(),Q(p,null,{table:M((()=>[v(s,{loading:z(n),data:z(l).data,columns:z(o)},null,8,["loading","data","columns"])])),pageRight:M((()=>[v(t,{page:z(u).p,"onUpdate:page":a[0]||(a[0]=e=>z(u).p=e),"page-size":z(u).limit,"onUpdate:pageSize":a[1]||(a[1]=e=>z(u).limit=e),"item-count":z(l).total,"page-slot":5,"show-size-picker":!1,onRefresh:i},null,8,["page","page-size","item-count"])])),_:1})}}}),q=u(y({__name:"index",setup(e,{expose:a}){const s=h("None"),{loading:t,setLoading:n}=g(),o=async()=>{try{n(!0);const{message:e}=await i();p(e)&&(s.value=l(e.result)?e.result:"None")}finally{n(!1)}};return o(),a({init:o}),(e,a)=>{const n=G,l=r;return L(),Q(l,{class:"h-full",show:z(t)},{default:M((()=>[v(n,{log:z(s)},null,8,["log"])])),_:1},8,["show"])}}}),[["__scopeId","data-v-8405edde"]]),Z={class:"h-550px"},ee=y({__name:"index",setup(s,{expose:n}){const{t:l}=C(),o=a(),u=t(),i=h("task"),p=N([{key:"task",label:()=>v("span",null,[l("Layout.MessageBox.index_3"),F(" ("),o.taskCount,F(")")]),component:P(X)},{key:"message",label:()=>v("span",null,[l("Layout.MessageBox.index_4"),F(" ("),u.listConut,F(")")]),component:P(Y)},{key:"log",label:l("Layout.MessageBox.index_5"),component:P(q)}]);return u.getMessageCount(),n({onClose:()=>{m()}}),(a,s)=>{const t=e;return L(),E("div",Z,[v(t,{value:z(i),"onUpdate:value":s[0]||(s[0]=e=>S(i)?i.value=e:null),ref:"tabsRef",data:z(p)},null,8,["value","data"])])}}});export{ee as default};
