File: /www/server/panel/BTPanel/static/js/index34.js
import{_ as U}from"./index118.js?v=1777008528";import{c as L,I as W,cm as G,c7 as O,f as K,L as z,dc as J,da as Z,cT as Q,cU as X,cZ as Y}from"./utils-lib.js?v=1777008528";import{u as ee}from"./index151.js?v=1777008528";import{c as V,r as E,H as te,o as A,aH as se,p as a,j as g,C as ne,v as i,k as N,q as u,e as s,x as y,y as ae,aI as oe,aF as _,ar as le,at as ie,as as re,a8 as ce,i as ue,z as pe}from"./base-lib.js?v=1777008528";import{p as me,e as fe,aI as de,E as ke,g as _e}from"./index3.js?v=1777008528";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1777008528";import{D as R,a as ge,b as ye,c as be,d as ve,e as he,f as xe,h as I,i as T,j as Ce,s as Se,k as Be,l as we,m as De}from"./useController20.js?v=1777008528";import{N as j}from"./useMethods.js?v=1777008528";import{a as Ee}from"./useController13.js?v=1777008528";import{i as Ie}from"./useController8.js?v=1777008528";import{B as Te}from"./index218.js?v=1777008528";import{_ as Ne}from"./index175.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index152.js?v=1777008528";import"./index119.js?v=1777008528";import"./index116.js?v=1777008528";import"./useController19.js?v=1777008528";import"./site.js?v=1777008528";import"./useStore2.js?v=1777008528";import"./useMethod12.js?v=1777008528";import"./index192.js?v=1777008528";import"./ssl.js?v=1777008528";import"./useStore3.js?v=1777008528";import"./useController18.js?v=1777008528";import"./useMethod3.js?v=1777008528";const Pe={key:0,class:"flex items-center"},Re={key:1,class:"flex items-center"},je=V({__name:"index",emits:["init"],setup(p,{expose:b,emit:v}){const h=K(),x=v,{plugin:C}=L(),S=E(C.value.webserver),c=E(!1),m=E(!1),f=te({title:"",name:"",status:!0,version:"",admin:!1,s_version:"",setup:!1}),o=async l=>{const{data:t}=await W({sName:l.name});if(t.task==="-1")return h.error("当前插件正在安装,不可重复安装");me({name:t==null?void 0:t.name,type:"i",pluginInfo:t}),r()};let d=!1;const r=async(l=!1)=>{try{if(d)return;const{data:t}=await G({name:"web"});!t.status&&!l&&setTimeout(()=>{r()},3e3),t.status&&!l&&x("init"),c.value=!t.status,Object.assign(f,t),t.name!=="nginx"&&(c.value=!0,m.value=t.status)}catch(t){l||setTimeout(()=>{r()},3e3)}};return A(()=>{r(!0)}),se(()=>{d=!0}),b({checkInstallStatus:r,pluginInfo:f,maskLayer:c,webServerType:S}),(l,t)=>{const B=O,w=Ne;return a(c)?(g(),ne(w,{key:0,width:"38rem"},{content:i(()=>[a(m)?(g(),N("div",Re,[...t[3]||(t[3]=[u("span",null,"Docker项目只支持nginx环境",-1)])])):(g(),N("div",Pe,[t[2]||(t[2]=u("span",null,"未安装运行环境,",-1)),s(B,{onClick:t[0]||(t[0]=P=>o({name:"nginx"})),class:"!font-bold !text-base"},{default:i(()=>[...t[1]||(t[1]=[y("安装Nginx",-1)])]),_:1})]))]),_:1})):ae("",!0)}}}),Le={class:""},Oe={class:"flex items-center ml-1rem"};function Ve(p){return typeof p=="function"||Object.prototype.toString.call(p)==="[object Object]"&&!ue(p)}const Ae=V({__name:"index",setup(p){const{mainHeight:b}=L(),{getDockerSiteList:v,setDockerSiteStatus:h,setDockerSiteRemark:x,delDockerSite:C,resetData:S}=R(),{refs:{isRefreshSiteList:c}}=z(),{pluginInfo:m,classList:f,statusFilterKey:o}=oe(R()),{BtOperation:d}=J({options:[{type:"button",label:"创建",active:!0,onClick:()=>Ce()},{type:"button",label:"运行环境",onClick:()=>Se()},{type:"button",label:"常用设置",onClick:()=>Be()},{type:"custom",render:()=>s(pe,{onClick:()=>Ee("all")},{default:()=>[y("网站统计总览")]})},{type:"custom",render:()=>s(Te,{style:"margin-left:1.2rem;",isRequest:!1,pluginInfo:m.value},null)}]}),r=X([we({callback:()=>{},classList:f}),{label:"删除项目",value:"delete",event:De}]),l=ee({key:"classify",name:"Docker分类",options:()=>[{label:"全部分类",value:"all"}],event:xe,ignore:["0","-2"],field:"name"}),{BtTable:t,BtPage:B,BtRefresh:w,BtSearch:P,BtColumn:F,BtBatch:H,BtTableCategory:$,refresh:D}=Z({request:e=>v({p:e.p||1,row:e.limit||20,query:e.search||"",...e.classify&&e.classify!=="all"?{classify:e.classify}:{},...o.value!=="all"?{type:o.value}:{}}),columns:[fe(),ge({onClick:I,openPlugin:T}),{label:"类型",prop:"type",minWidth:90,renderHeader(){const e=[{title:"全部",key:"all"},{title:"JAVA",key:"java"},{title:"Go",key:"go"},{title:"PHP",key:"php"},{title:"Python",key:"python"},{title:"Node",key:"nodejs"},{title:"反向代理",key:"proxy"},{title:"Docker应用",key:"app"}];return _("div",{class:"flex items-center flex-nowrap"},["",_(le,{onCommand:n=>{o.value=n,D()}},{default:()=>_("span",{class:"text-small flex items-center"},[[s("span",{class:"status-header-text leading-[1.5] whitespace-nowrap"},[y("类型"),o.value==="all"?"":"(".concat(e.find(n=>n.key===o.value).title,")")])],_("i",{class:"svgtofont-el-arrow-down "})]),dropdown:()=>{let n;return s(re,null,Ve(n=e.map(k=>s(ie,{command:k.key},{default:()=>[k.title]})))?n:{default:()=>[n]})}})])}},ye({prop:"status",onClick:e=>{const n=e.status==="1"?0:1;h({status:n,id:e.id,site_name:e.name,edate:e.edate})},onFilterEvent:e=>{o.value=e,D()}}),{label:"根目录",prop:"path",minWidth:200,isCustom:!0,render:e=>s("div",null,[s("span",{class:"w-full whitespace-pre-line inline-block bt-link leading-[16px]",onClick:()=>de(e,"path"),title:"点击打开目录"},[e.path])])},be(),ke({request:(e,n)=>{x({remark:n,id:e.id,site_name:e.name})},prop:"remark",width:200}),ve({onClick:e=>Ie(()=>I(e,"ssl"))}),_e([{onClick:e=>{T(e,"monitor-setting")},title:"统计"},{onClick:e=>{T(e,"bt_waf")},title:"WAF"},{title:"设置",onClick:I},{title:"删除",onClick:e=>{C(e)}}])],extension:[l,r,Q(c)]});return A(()=>{he()}),ce(()=>{S()}),(e,n)=>{const k=O,q=U;return g(),N("div",Le,[s(je,{ref:"envRef",onInit:a(D)},null,8,["onInit"]),s(q,null,{"header-left":i(()=>[s(a(d)),u("div",Oe,[u("div",{class:"flex items-center",onClick:n[0]||(n[0]=(...M)=>a(j)&&a(j)(...M))},[...n[1]||(n[1]=[u("i",{class:"svgtofont-desired text-medium"},null,-1),u("span",{class:"bt-link"},"需求反馈",-1)])]),s(k,{href:"https://www.bt.cn/bbs/thread-140664-1-1.html",class:"ml-10px"},{default:i(()=>[...n[2]||(n[2]=[y(">>使用帮助",-1)])]),_:1})])]),"header-right":i(()=>[s(a($),{class:"!w-[160px] mr-[10px]"}),s(a(P),{class:"mr-[10px] !w-[26rem]",placeholder:"请输入项目名称或备注"}),s(a(w),{class:"mr-[10px]"}),s(a(F))]),content:i(()=>[s(a(t),{"max-height":a(b)},null,8,["max-height"])]),"footer-left":i(()=>[s(a(H))]),"footer-right":i(()=>[s(a(B))]),_:1})])}}}),ut=Y(Ae,[["__scopeId","data-v-65507ecb"]]);export{ut as default};