HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/index303.js
import{G as Q,dq as U,dr as G,c7 as H,d3 as J}from"./utils-lib.js?v=1777008528";import{c as M,r as l,H as Y,aF as i,o as z,j as p,k as _,q as D,e as m,v as g,F as K,B as W,p as a,C as h,Q as I,x as X,y as b,aY as Z,am as T,an as ee,al as te,aj as se}from"./base-lib.js?v=1777008528";import{createIpRules as ae,removeIpRules as ne,getIpFlowsAreasInfo as oe,getIpFlowTrend as re}from"./site.js?v=1777008528";import{e as le}from"./useController19.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index3.js?v=1777008528";import"./index119.js?v=1777008528";import"./index116.js?v=1777008528";import"./useStore2.js?v=1777008528";import"./useController13.js?v=1777008528";import"./useMethod12.js?v=1777008528";import"./index192.js?v=1777008528";const ie={class:"p-[2rem]"},pe={class:"flex items-center justify-between mb-[8px]"},ce={key:1},Ie=M({__name:"index",props:{compData:{default:()=>({})}},setup(w){var v,C;const d=w,{proxy:k}=Z(),V=l(((C=(v=d.compData)==null?void 0:v.project_config)==null?void 0:C.type)==="PHPMOD"),E=l(),n=l("today"),O=Y([{label:"IP地址",prop:"ip",render:e=>i("span",{class:e.deny_status?"line-through text-disabled cursor-pointer":"text-primary cursor-pointer",on:{click:async()=>{try{await k.$confirm({title:"IP地址",message:"确定要".concat(e.deny_status?"解封":"封禁","当前ip吗?"),icon:"warning"});let t=null;if(e.deny_status)t=await ne({data:JSON.stringify({address:e.ip})});else{let s={choose:"address",address:e.ip,domain:"",types:"drop",brief:"网站流量点击IP手动封禁"};t=await ae({data:JSON.stringify(s)})}k.$message.request(t),f()}catch(t){}}}},e.ip)},{label:"归属地",render:e=>i("div",{class:"flex",style:{gap:"4px"}},[i("span",e.country),i("span",e.province),i("span",e.city)])},{label:"造成流量",prop:"flow",render:e=>i("span",Q(e.flow))}]),P=l([{title:"今天",key:"today"},{title:"昨天",key:"yesterday"},{title:"近7天",key:"l7"},{title:"近30天",key:"l30"},{title:"近1小时",key:"h1"}]),x=l([]),o=l("流量趋势"),{BtECharts:B,getEChart:ue,setOption:me,setQuickOption:N}=U({options:{xAxis:{type:"category",data:[]},yAxis:{type:"value",name:"单位:字节",axisLabel:{margin:2,formatter:function(e,t){return e>=1e4&&e<1e7?e=e/1e4+"万":e>=1e7&&(e=e/1e7+"千万"),e}}},grid:{show:!1,bottom:"20%",right:"5%"},series:[{data:[],type:"line"}]}}),y=async()=>{let e=[],t=[0,0,0,0,0,0,0],s=!1;try{const c=await re({site_name:d.compData.name,query_date:n.value});c&&(t=[]),c.forEach(u=>{(n.value=="h1"||n.value=="today"||n.value=="yesterday")&&(s=!0),e.push(S(String(u.time),s)),t.push(u.flow)})}catch(c){}N(e,t)},f=async()=>{try{const e=await oe({site_name:d.compData.name,query_date:n.value});x.value=e}catch(e){}},R=e=>{o.value=e,e==="流量趋势"?y():f()},q=e=>{n.value=e,o.value==="流量趋势"?y():f()},F=()=>{le({...d.compData,tabName:"flowQuota"},"limit")},S=(e,t)=>{let s="";return t?(s=e.substring(8,10)+":"+(e.length===12?e.substring(10,12):"00"),s):(e.length===12||e.length===10?s=e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)+" "+e.substring(8,10)+":"+(e.length===12?e.substring(10,12):"00"):e.length===8&&(s=e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)),s)};return z(()=>{y()}),(e,t)=>{const s=T,c=ee,u=te,j=se,$=H,A=J;return p(),_("div",ie,[D("div",pe,[m(c,{modelValue:a(n),"onUpdate:modelValue":t[0]||(t[0]=r=>I(n)?n.value=r:null),onChange:q,class:"!w-[10rem]"},{default:g(()=>[(p(!0),_(K,null,W(a(P),(r,L)=>(p(),h(s,{key:L,label:r.title,value:r.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),m(j,{modelValue:a(o),"onUpdate:modelValue":t[1]||(t[1]=r=>I(o)?o.value=r:null),onChange:R},{default:g(()=>[m(u,{label:"流量趋势"}),m(u,{label:"IP TOP 10"})]),_:1},8,["modelValue"]),!a(G)&&!a(V)?(p(),h($,{key:0,onClick:F},{default:g(()=>[...t[2]||(t[2]=[X("流量限额>>",-1)])]),_:1})):b("",!0)]),D("div",null,[a(o)==="流量趋势"?(p(),h(a(B),{key:0,ref_key:"totalCharts",ref:E,class:"h-[32rem]"},null,512)):b("",!0),a(o)==="IP TOP 10"?(p(),_("div",ce,[m(A,{column:a(O),data:a(x)},null,8,["column","data"])])):b("",!0)])])}}});export{Ie as default};