import{i as _,c as p}from"./app-Ba7ZqSpq.js";import{e as f}from"./app-DUeSaIYz.js";import{_ as d}from"./app-CDCZqmkG.js";import{_ as x}from"./app-CS0baYsv.js";import{C as v}from"./app-BjiVQlSS.js";import{o as l,g as u,b as c,w as m,F as b,a as t,f as o,t as r,u as n,h}from"./app-SC54XQDl.js";function N(){const{utils:e}=_(this);e.setEcharts(f),this.$delay(function(){this.reloadTopDomainsChart()}),this.reloadTopDomainsChart=function(){let a=e.countAxis(this.topDomainStats,function(s){return s.countRequests});e.renderBarChart({id:"top-domains-chart",name:"域名",values:this.topDomainStats,x:function(s){return s.domainName},tooltip:function(s,i){return i[s.dataIndex].domainName+"<br/>请求数： "+e.formatNumber(i[s.dataIndex].countRequests)+"<br/>流量："+e.formatBytes(i[s.dataIndex].bytes)},value:function(s){return s.countRequests/a.divider},axis:a,click:function(s,i){window.location="/ns/domains/domain?domainId="+i[s.dataIndex].domainId}})}}const C={class:"ui column"},w={class:"value"},y={class:"ui column"},D={class:"value"},I={class:"ui column"},R={class:"value"},k={class:"ui column with-border"},B={class:"value"},V={key:0},g={key:1},q=t("span",{class:"text-base gray"},"（24小时）",-1),S=t("div",{class:"chart-box",id:"top-domains-chart"},null,-1),z={__name:"ns",setup(e){const a=p(new N);return(s,i)=>(l(),u(b,null,[c(x,null,{default:m(()=>[t("div",C,[t("h5",null,[o("域名 "),c(d,{href:"/ns/domains"})]),t("div",w,[t("span",null,r(n(a).board.countDomains),1),o("个")])]),t("div",y,[t("h5",null,[o("记录 "),c(d,{href:"/ns/domains"})]),t("div",D,[t("span",null,r(n(a).board.countRecords),1),o("个")])]),t("div",I,[t("h5",null,[o("线路 "),c(d,{href:"/ns/routes"})]),t("div",R,[t("span",null,r(n(a).board.countRoutes),1),o("个")])]),t("div",k,[t("h5",null,[o("套餐 "),c(d,{href:"/ns/plans"})]),t("div",B,[t("span",null,r(n(a).board.countNodes),1),n(a).board.planName.length>0?(l(),u("span",V,r(n(a).board.planName),1)):h("",!0),n(a).board.planName.length==0?(l(),u("span",g,"未购套餐")):h("",!0)])])]),_:1}),c(v,{cols:"1"},{header:m(()=>[o("域名访问排行 "),q]),default:m(()=>[S]),_:1})],64))}};export{z as default};
