2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-B9P08_gB.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785"],(function(e,t){"use strict";var l,a,n,i,u,o,s,r,c,d,p,h,m,g,y,b,v,k,f,x,w,_,C,S,W,j,P,V,B,q,$,L,T,M,N,z,A,Q,R,U,I,D,F,H,K,J,O,X,Z,E,G,Y,ee,te,le,ae,ne,ie;return{setters:[e=>{l=e.C,a=e._,n=e.p,i=e.P,u=e.N,o=e.c,s=e.l,r=e.a3,c=e.I,d=e.aJ,p=e.h,h=e.ao,m=e.t,g=e.aK,y=e.af,b=e.aL,v=e.aM},e=>{k=e.k,f=e.R,x=e.c,w=e.S,_=e.$,C=e.a8,S=e.a9,W=e.j,j=e.aa,P=e.Z,V=e.a0,B=e._,q=e.a3,$=e.l,L=e.as,T=e.ai,M=e.H,N=e.X,z=e.L,A=e.r,Q=e.v,R=e.am,U=e.a6},e=>{I=e.g,D=e.a5,F=e.ab,H=e.f,K=e.k,J=e.ay,O=e.a8,X=e.e,Z=e.n,E=e.u,G=e.ai,Y=e.B,ee=e.s},e=>{te=e._},e=>{le=e.c},e=>{ae=e._},e=>{ne=e._},e=>{ie=e.u}],execute:function(){e({a:function(e){const{key:t="status"}=e;return{key:t,title:e.title||r.global.t("Public.Table.Status"),width:e.width||"8%",minWidth:e.minWidth||80,render:l=>{const a=e.status(l);return V(ce,{value:l[t],"checked-label":a.checkedLabel,"checked-value":a.checkedValue,"unchecked-label":a.uncheckedLabel,"unchecked-value":a.uncheckedValue,onClick:e=>{a.onClick?.(e)}},null)}}},b:function(e={}){const t=R(),l=e.key||"path";return{key:l,title:e.title||r.global.t("Public.Table.Path"),width:e.width,minWidth:e.minWidth||120,ellipsis:{tooltip:!0},render:e=>V("a",{class:"bt-link",href:"javascript:;",onClick:()=>{d("Path",e[l]),t.push("/files")}},[e[l]])}},d:function(e={}){return{key:e.key||"quota",title:e.title||r.global.t("Component.Quota.index_1"),width:e.width||"8%",minWidth:e.minWidth||100,maxWidth:e.maxWidth||120,render:t=>V(oe,{type:e.type||"",data:t,callback:e.callback},null)}},e:function(e){const{key:t="ps"}=e;return{key:t,title:e.title||r.global.t("Public.Table.Note"),width:e.width,minWidth:e.minWidth||120,render:l=>V(se,{value:l[t],onBlur:async(a,n)=>{const i=l[t];if(i!==a)try{await e.onBlur(a,l),l[t]=a}catch(u){n.target.value=i,console.error(u)}}},null)}},f:function(e){const{key:t="status"}=e;return{key:e.key||"status",title:e.title||r.global.t("Public.Table.Status"),width:e.width,minWidth:70,render:l=>V(ce,{value:l[t],"checked-title":e.checkedLabel||r.global.t("Public.Status.Running"),"unchecked-title":e.uncheckedLabel||r.global.t("Public.Status.Stop"),checkedValue:e.checkedValue,uncheckedValue:e.uncheckedValue,onClick:t=>{e.confirm&&p(e.confirm(t,l))}},null)}},g:function(e={}){const t=e.key||"progress",l=e.placement||"inside";return e.loading,{key:t,title:e.title||r.global.t("Mail.Unsubscribe.index_26"),width:e.width||"10%",minWidth:100,maxWidth:e.maxWidth,render:a=>V(F,{type:"line","indicator-placement":l,percentage:a[t],processing:100!==a[t],height:e.height,status:e.status,color:e.color},null)}},h:function(e={}){const t=e.key||"password";return{key:t,title:e.title||r.global.t("Public.Table.Password"),width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth,render:e=>{const l=e[t];return V(be,{value:h(l)?l:""},null)}}},i:function(e){const{key:t="status"}=e;return{key:e.key||"Caching(nginx)",title:e.title||"Caching(nginx)",width:e.width,minWidth:70,render:l=>V(de,{disabled:!!e.disabled&&e.disabled(l),tips:e.tips,value:l[t],onClick:t=>{e.onClick(t,l)}},null)}},l:function(e){const{t:t}=r.global;return{key:"requests",sorter:!0,sortOrder:!1,className:"sort-center",title:e=>e?"Requests":V(K,{class:"items-center justify-center!",size:3},{default:()=>[V("span",null,[W("Requests")]),V(D,{trigger:"hover"},{trigger:()=>V("i",{class:"i-uiw:question-circle-o text-16px text-#9DA1A6 cursor-pointer"},null),default:()=>V(ae,null,{default:()=>[V("li",null,[W("The monitoring report data will be updated as the website list is refreshed")]),V("li",null,[W("The monitoring report plugin will use the plugin's data; if it is not installed, free monitoring report data will be used.")])]})})]}),align:"center",width:e.width||"12%",render:l=>{const{isFree:a,siteMonitorStatus:n}=U(m()),{webserver:i,monitor:u,isMonitorInstall:o}=U(ie()),{monitorMap:s}=e;if("nginx"!==i.value&&"apache"!==i.value)return"--";if(!n.value&&a.value)return V(Y,{type:"primary",text:!0,onClick:()=>{g({source:142})}},{default:()=>[W("Active")]});if(!o.value&&!n.value)return V(Y,{type:"primary",text:!0,onClick:()=>{y("monitor",(async()=>{e.getMonitorData()}))}},{default:()=>[1===u.value.is_install?t("Public.Btn.Update"):t("Public.Btn.Install")]});const r=s.value[l.name];if(!ee(r)){const e=b(r),t=v(r);return V(xe,{name:l.name,total:e,value:t},null)}return"--"}}},u:function(e){return{key:e.key||"action",title:e.title||r.global.t("Public.Table.Action"),align:e.align||"right",width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth,render:(t,l)=>{const a=e.options?.(t,l)||[],n=e.dropdown?.(t,l);return n?V(K,{size:2,class:"justify-end! items-center"},{default:()=>[V(te,{options:a},null),V(G,{trigger:"click",options:n.options,onSelect:e=>n.onSelect(e,t)},{default:()=>[V("i",{class:"i-famicons:ellipsis-vertical text-18px cursor-pointer"},null)]})]}):V(te,{options:a},null)}}}});const ue={class:"leading-20px"},oe=k({__name:"index",props:{type:{default:"site"},data:{},callback:{}},setup(e){const{t:u}=f(),o=e,s=x((()=>{const{data:e}=o,{quota:t}=e;return!t.size})),r=x((()=>{if(s.value)return 0;const{data:e}=o,t=I(e,"quota.used",0);let l=I(e,"quota.size",0);return l=1024*l*1024,0===l?0:t/l*100})),c=x((()=>{const{data:e}=o,t=I(e,"quota.used",0);return l(t)})),d=x((()=>{const{data:e}=o;return`${I(e,"quota.size",0).toFixed(2)} MB`})),p=x((()=>r.value<90?"success":"error")),h=new Map([["site","Site"],["ftp","FTP"],["database","Database"]]),m=()=>{n({title:`${u("Component.Quota.index_5",[o.data.name,h.get(o.type)||"--"])}`,width:480,minHeight:222,footer:!0,data:{type:o.type,info:o.data,callback:o.callback},component:q((()=>i((()=>t.import("./quota-config-legacy-DHuV9b66.js?v=1773287522785")),void 0)))})};return(e,t)=>{const l=a,n=F,i=D;return w(s)?(_(),C(l,{key:0,onClick:m},{default:S((()=>[W(j(e.$t("Component.Quota.index_2")),1)])),_:1})):(_(),P("div",{key:1,class:"cursor-pointer",onClick:m},[V(i,{placement:"bottom-start","arrow-point-to-center":!0},{trigger:S((()=>[V(n,{type:"line",status:w(p),percentage:w(r),height:12,"border-radius":2,"show-indicator":!1},null,8,["status","percentage"])])),default:S((()=>[B("div",ue,[B("p",null,j(e.$t("Component.Quota.index_3",[w(c)])),1),B("p",null,j(e.$t("Component.Quota.index_12",[w(d)])),1),B("p",null,j(e.$t("Component.Quota.index_4")),1)])])),_:1})]))}}}),se=e("k",o(k({__name:"index",props:{value:{default:""},height:{default:22},onUpdateValue:{},onBlur:{}},setup(e){const t=e,l=u(t,"value"),a=e=>{const l=e.target;t?.onBlur?.(l.value||"",e)},n=e=>{e.target.blur()};return(e,t)=>$((_(),P("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>N(l)?l.value=e:null),class:"bt-table-input",style:M({height:w(H)(e.height)}),onBlur:a,onKeyup:T(n,["enter"])},null,36)),[[L,w(l)]])}}),[["__scopeId","data-v-e66e069a"]])),re={class:"leading-[1]"},ce=e("_",k({__name:"index",props:{value:{type:[Number,String,Boolean,null],default:"1"},checkedValue:{type:[Number,String,Boolean],default:"1"},uncheckedValue:{type:[Number,String,Boolean],default:"0"},checkedLabel:{default:""},uncheckedLabel:{default:""},onClick:{default:void 0}},setup(e){const t=e,l=()=>{const{value:e,checkedValue:l,uncheckedValue:a,onClick:n}=t;n&&J(n,e===l?a:l)};return(e,t)=>{const a=K;return _(),C(a,{class:z(["items-center cursor-pointer",e.value===e.checkedValue?"text-primary":"text-error"]),size:2,inline:!0,onClick:l},{default:S((()=>[B("span",re,j(e.value===e.checkedValue?e.checkedLabel||e.$t("Public.Status.Running"):e.uncheckedLabel||e.$t("Public.Status.Stopped")),1),B("i",{class:z(["text-14px",e.value===e.checkedValue?"i-mage:play-fill":"i-mage:pause-fill"])},null,2)])),_:1},8,["class"])}}})),de=e("j",k({__name:"index",props:{disabled:{type:Boolean,default:!1},tips:{},value:{type:[Boolean,String,Number],default:!1},onClick:{}},setup(e){let t=A(!0);const l=e;"string"==typeof l.value||"number"==typeof l.value?t.value=!!l.value:t.value=l.value;const a=()=>{const{onClick:e}=l;e&&J(e,t.value)};return(e,l)=>{const n=O,i=X;return _(),C(i,{trigger:"hover",disabled:!(e.disabled&&w(t))},{trigger:S((()=>[V(n,{size:"small",value:w(t),"onUpdate:value":[l[0]||(l[0]=e=>N(t)?t.value=e:t=e),a],disabled:e.disabled&&w(t)},null,8,["value","disabled"])])),default:S((()=>[W(" "+j(e.tips),1)])),_:1},8,["disabled"])}}})),pe={class:"flex"},he={class:"w-0 flex-1 flex items-center"},me={class:"min-w-0"},ge={class:"i-majesticons:eye-line"},ye={class:"i-majesticons:eye-off-line"},be=e("c",k({__name:"index",props:{value:{default:""}},setup(e){const t=e,l=A(!1),a=x((()=>l.value?t.value:"**********")),n=()=>{l.value=!l.value},i=async()=>{le(`${t.value}`)};return(e,t)=>{const u=Z,o=s;return _(),P("div",pe,[B("div",he,[B("div",me,[V(u,{class:"max-w-full",tooltip:{contentStyle:{maxWidth:"200px"}}},{default:S((()=>[W(j(w(a)),1)])),_:1})]),B("div",{class:"ml-6px flex items-center text-15px cursor-pointer",title:"Show",onClick:n},[$(B("i",ge,null,512),[[Q,!w(l)]]),$(B("i",ye,null,512),[[Q,w(l)]])]),B("button",{class:"reset ml-6px text-15px cursor-pointer",title:"Copy",onClick:i},[V(o,{name:"common-copy"})])])])}}})),ve=e("o",((e=!1,l)=>{const{t:a}=r.global;n({title:l?`[${l}] ${a("Website statistics")}`:a("Website statistics"),width:900,minHeight:450,data:{name:l,showTops5:e},component:q((()=>i((()=>t.import("./index-legacy-BPtxUb68.js?v=1773287522785")),void 0)))})})),ke={class:"text-left"},fe={class:"cursor-pointer"},xe=k({__name:"Requests",props:{name:{type:String,default:""},total:{type:[Number,String],default:0},value:{type:Array,default:()=>[]}},setup(e){const t=x((()=>e.total.toLocaleString("en-US"))),l=E(),a=x((()=>({xAxis:{type:"category",data:e.value.map((e=>e.date))},yAxis:{type:"value",show:!1},series:[{name:"Page views",data:e.value.map((e=>e.value)),type:"line",lineStyle:{color:l.value.primaryColor,width:2},areaStyle:{color:c(l.value.primaryColor,.1)},symbol:"none"}],grid:{left:0,right:0,top:0,bottom:0}})));return(l,n)=>(_(),P("div",{class:"flex flex-col gap-3px cursor-pointer",onClick:n[0]||(n[0]=t=>w(ve)(!1,e.name))},[B("div",ke,j(w(t)),1),B("div",fe,[V(ne,{type:"line",option:w(a),height:"15px"},null,8,["option"])])]))}})}}}));
|