import{b as e,h as t,f as a}from"./public.js?v=1753954525509";import{cY as i,w as o}from"./page_layout.js?v=1753954525509";import{g as l}from"./index79.js?v=1753954525509";import{s}from"./tools2.js?v=1753954525509";import{_ as r}from"./index.vue_vue_type_script_setup_true_lang15.js?v=1753954525509";import{k as n,t as p,P as c,aD as d,U as u,V as m,Q as f,X as _,W as x}from"./vue.js?v=1753954525509";import"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./rules.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import"./index100.js?v=1753954525509";const v={class:"h-full"},h=n({__name:"details-count",props:{data:{default:()=>({})}},setup(e){const t=p(e,"data"),{t:a}=c(),i=d({backgroundColor:"#fff",title:l(),tooltip:{trigger:"item",confine:!0,formatter(e){const t=e;return"".concat(t.marker," ").concat(t.name,": ").concat(t.value," (").concat(t.percent,"%)")}},series:s()}),o=["#6ec71e","#4885FF","#fc8b40","#818af8","#31c9d7","#f35e7a","#ab7aee","#14d68b","#cde5ff"];function l(e=0){return{text:a("Waf.Report.index_17"),textStyle:{color:"#484848",fontSize:17},subtext:"".concat(e),subtextStyle:{color:"#717171",fontSize:15},itemGap:20,left:"center",top:"42%"}}function s(e=[]){return[{type:"pie",data:e,radius:["50%","60%"],center:["50%","50%"],clockwise:!0,avoidLabelOverlap:!0,label:{show:!0,position:"outside",color:"#999",lineHeight:18,formatter:e=>""!==e.name?0===e.percent?"":a("Waf.Overview.index_33",[e.name,e.value,e.percent]):""},labelLine:{length:30,length2:30,lineStyle:{width:1,color:"#CDCDCD"}},itemStyle:{labelLine:{length:30,length2:30,lineStyle:{width:1,color:"#CDCDCD"}},color:e=>o[e.dataIndex]},emphasis:{scaleSize:15}}]}return(()=>{let e=0;const a=[];Object.entries(t.value).forEach((([t,i])=>{e+=i,a.push({name:t,value:i})})),i.title=l(e),i.series=s(a)})(),(e,t)=>(u(),m("div",v,[f(r,{type:"pie",height:"100%",option:_(i)},null,8,["option"])]))}}),y={class:"h-full"},b=n({__name:"details-uri",props:{data:{default:()=>[]}},setup(e){const t=p(e,"data"),{t:a}=c(),o=d({backgroundColor:"#fff",tooltip:{trigger:"item",axisPointer:{type:"shadow",label:{color:"#fff",fontSize:"26"}},formatter(e){const t=e;return'<div style="max-width: 400px;">'.concat(t.marker," ").concat(i(t.seriesName||""),"</div>\n\t\t\t<div>").concat(a("Waf.Report.index_16",[t.data]),"</div>")}},legend:{top:"0%",data:t.value.slice(0,4).map((e=>e.name)),textStyle:{fontSize:12,color:"#808080"},icon:"rect"},grid:{top:60,left:60,right:0,bottom:50},xAxis:[{type:"category",axisLabel:{color:"#4D4D4D",fontSize:14,fontWeight:"bold"},data:[a("Waf.Report.index_15")]}],yAxis:[{type:"value",axisLine:{show:!1},axisTick:{show:!1},splitNumber:4,axisLabel:{color:"#8C8C8C"},splitLine:{lineStyle:{type:"dashed"}}}],color:["#4fa8f9","#6ec71e","#f56e6a","#fc8b40","#818af8","#31c9d7","#f35e7a","#ab7aee","#14d68b","#cde5ff"],series:t.value.slice(0,4).map((e=>({name:e.name,type:"bar",label:{show:!0,position:"top"},barMaxWidth:60,data:[e.value]})))});return(e,t)=>(u(),m("div",y,[f(r,{type:"bar",height:"100%",option:_(o)},null,8,["option"])]))}}),g={class:"p-20px"},w={class:"flex h-280px mb-16px"},j={class:"w-410px"},k={class:"w-500px"},S=n({__name:"details",props:{row:{}},setup(r){const n=p(r,"row"),{t:d}=c(),{table:v,columns:y}=e([{key:"time_localtime",title:d("Waf.Report.index_13"),width:140},{key:"server_name",title:d("Waf.Report.index_14"),ellipsis:{tooltip:!0}},{key:"ip_country",title:d("Waf.Report.index_8"),render:e=>e.ip_country||"--"},{key:"URI",title:"URI",ellipsis:{tooltip:!0},render:e=>i(e.uri)||"--"},{key:"filter_rule",title:d("Waf.Report.index_34"),width:140},t({width:80,options:e=>[{label:d("Public.Btn.Details"),onClick:async()=>{const{message:t}=await l({id:e.id});o(t)&&t.length>0&&s(t[0])}}]})]);v.data=n.value.data.list;const S=n.value.data.uri.map((e=>({name:e[0],value:e[1]})));return(e,t)=>{const i=a;return u(),m("div",g,[x("div",w,[x("div",j,[f(h,{data:_(n).data.type},null,8,["data"])]),x("div",k,[f(b,{data:_(S)},null,8,["data"])])]),f(i,{"max-height":300,data:_(v).data,columns:_(y)},null,8,["data","columns"])])}}});export{S as default};
