PageSourceSearch

https://piehost.com/build/assets/UsageDashboard-Cc2X_w7m.js

js piehost.com collected 2026-09-25 14:07:19 UTC 3,168 bytes, 1 lines download raw bytes

1import{r as s,a as D,j as e}from"./app-DNe5vFRE.js";import u from"./TopPieSocketUsers-DjdK9UkO.js";import p from"./TopPieSocketConnectionUsers-B4wnEDFj.js";import j from"./TopPieSocketOverusers-BI2o8SeR.js";import{MessageUsageChart as w}from"./MessageUsageChart-DFIYFh1V.js";import{ConnectionUsageChart as y}from"./ConnectionUsageChart-Bool-WZs.js";import{D as b}from"./DateRangeSelector-BmJAU4rh.js";import{h as C}from"./moment-B-YVwB4U.js";import{t as l}from"./Utilities-D6wiwRoK.js";import"./index-BS1du2zo.js";import"./index-Chjiymov.js";import"./index-B4HTqFrb.js";import"./ChevronDownIcon-Bldz-nWn.js";import"./menu-D3orKPBK.js";import"./transition-BCwysbg9.js";import"./use-resolve-button-type-CWYT3wNy.js";import"./calculate-active-index-B4Ujw_fi.js";const S=C(),v={endDate:new Date,startDate:S.subtract(30,"days").toDate(),key:"selection"};function J(){const[k,n]=s.useState(!1),[N,R]=s.useState({leads:0,posts:0,tools:0}),[i,c]=s.useState([]),[d,g]=s.useState([]),[m,f]=s.useState("Last 30 days"),[t,h]=s.useState(v),o=s.useRef(t),x=a=>{console.log(a),h(a)};s.useEffect(()=>{o.current=t;var a;t.startDate.toLocaleDateString("en-CA")==t.endDate.toLocaleDateString("en-CA")?a=`${t.startDate.toLocaleDateString("en-CA")}`:a=`${t.startDate.toLocaleDateString("en-CA")} - ${t.endDate.toLocaleDateString("en-CA")}`,f(a),r()},[t]),s.useEffect(()=>{const a=setInterval(r,6e4);return r(),()=>{clearInterval(a)}},[]);const r=()=>{n(!0),D.get(`/admin/api/usage?from=${l(o.current.startDate)}&to=${l(o.current.endDate)}`).then(a=>{a&&a.data&&(g(a.data.connection_graph),c(a.data.message_graph))}).finally(()=>{n(!1)})};return e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(b,{title:m,handleSelect:x,selectionRange:t})}),e.jsxs("div",{className:"flex gap-3 my-3",children:[e.jsx("div",{className:"overflow-hidden flex justify-center w-full rounded-lg bg-white dark:bg-gray-800 shadow p-4",children:e.jsx(y,{name:"Connections",chartData:d})}),e.jsx("div",{className:"overflow-hidden flex justify-center w-full rounded-lg bg-white dark:bg-gray-800 shadow p-4",children:e.jsx(w,{name:"Messages",chartData:i})})]}),e.jsx("div",{className:"flex gap-3 my-3",children:e.jsxs("div",{className:"overflow-hidden flex gap-3 w-full pb-12 ",children:[e.jsxs("div",{className:"w-full px-12 rounded-lg bg-white dark:bg-gray-800 shadow p-4 ",children:[e.jsx("h2",{className:"text-lg text-center font-bold my-6 text-gray-900 dark:text-gray-50",children:"Peak Connections"}),e.jsx(p,{fromDate:t.startDate,toDate:t.endDate,onRowClicked:()=>{}})]}),e.jsxs("div",{className:"w-full px-12 rounded-lg bg-white dark:bg-gray-800 shadow p-4 ",children:[e.jsx("h2",{className:"text-lg text-center font-bold my-6 text-gray-900 dark:text-gray-50",children:"Total Messages"}),e.jsx(u,{fromDate:t.startDate,toDate:t.endDate,onRowClicked:()=>{}})]}),e.jsxs("div",{className:"w-full px-12 rounded-lg bg-white dark:bg-gray-800 shadow p-4",children:[e.jsx("h2",{className:"text-lg text-center font-bold my-6 text-gray-900 dark:text-gray-50",children:"Total Overusage"}),e.jsx(j,{fromDate:t.startDate,toDate:t.endDate,onRowClicked:()=>{}})]})]})})]})}export{J as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.