PageSourceSearch

https://app.bellagent.ai/assets/AdminDashboardPage-BXkUCAaM.js

js bellagent.ai collected 2026-10-04 16:28:15 UTC 4,930 bytes, 1 lines download raw bytes

1import{aN as f,ax as e,n as b}from"./LinkRenderer-D_IvQZDL.js";import{bd as N,$ as v,Y as w,a0 as y,a1 as t,_ as a,Z as k,M as h,l as r}from"./admin-BGiwwisA.js";import"./useAgentChatSession-BvNS4Os7.js";import"./Avatar-C9aXa9KZ.js";import"./zod-DXSpcb-8.js";import"./LinkPreview-7zwnaQ3s.js";const A=[{icon:e.jsx(r,{size:20}),label:"Trial User",value:"256"},{icon:e.jsx(r,{size:20}),label:"Starter User",value:"96"},{icon:e.jsx(r,{size:20}),label:"Team User",value:"78"},{icon:e.jsx(r,{size:20}),label:"Business User",value:"23"}],c=["Template Name","Total Agents","Last Used Date","Action"];function E(){const{data:g,isLoading:i,isError:n}=N({onlyUsed:!0,limit:10,order:"DESC"}),[o,m]=f.useState(null),d=!!o,u=s=>{m(s.currentTarget)},p=()=>m(null),x=(g??[]).map(s=>({templateName:s.name,uses:s.totalAgents,lastUsedDate:s.lastUsedAt?new Date(s.lastUsedAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"—"}));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-3 items-center pb-4",children:[e.jsx("h2",{className:"text-gray-900 dark:text-white text-[20px] md:text-[24px] leading-[26px] md:leading-[28px] font-semibold pr-4 inline-flex flex-col items-start",children:"Admin Dashboard"}),e.jsx("div",{className:"sm:ml-auto w-full sm:w-auto",children:e.jsxs("div",{className:"inline-flex justify-end sm:justify-start flex-wrap gap-2 w-full",children:[e.jsxs("div",{className:"relative w-full sm:max-w-[260px]",children:[e.jsx("input",{type:"text",className:"w-full h-9 px-4 py-2 pl-9 border border-gray-300 dark:border-[#BABABA] rounded-md bg-[var(--background)] text-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 shadow-xs",placeholder:"Search"}),e.jsx("button",{className:"absolute left-0 top-0 w-9 h-full flex items-center justify-center",children:e.jsx("img",{src:"/images/search-icon-thin.svg",alt:"",className:"w-5.5 h-5.5 filter dark:brightness-0 dark:invert"})})]}),e.jsxs("select",{name:"",id:"",className:"w-[110px] h-9 px-2 py-2 border border-gray-300 dark:border-[#BABABA] rounded-md bg-[var(--background)] text-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 shadow-xs",children:[e.jsx("option",{value:"",children:"Weekly"}),e.jsx("option",{value:"",children:"Monthly"}),e.jsx("option",{value:"",children:"Yearly"})]})]})})]}),e.jsx("div",{className:"hidden sm:block mt-2 first:m-0",children:e.jsx("div",{className:"flex flex-wrap -m-2",children:A.map(({icon:s,label:l,value:j})=>e.jsx("div",{className:"w-1/2 xl:w-1/4 p-2 flex flex-col",children:e.jsxs("div",{className:"card-box",children:[e.jsx("span",{className:"icon",children:s}),e.jsxs("div",{className:"flex flex-col w-full flex-1",children:[e.jsx("span",{className:"sub-nm",children:l}),e.jsx("h6",{children:j})]})]})},l))})}),e.jsxs("div",{className:"wh-box mt-4 first:m-0",children:[e.jsx("div",{className:"table-head",children:e.jsx("h3",{className:"text-gray-900 dark:text-white text-[18px] md:text-[20px] leading-[28px] md:leading-[30px] font-semibold self-center",children:"Total Revenue"})}),e.jsx("div",{className:"mt-4",children:e.jsx("img",{src:"/images/dummy/graph-2.jpg",alt:"",className:"w-full h-auto"})})]}),e.jsxs("div",{className:"wh-box mt-4 first:m-0",children:[e.jsx("div",{className:"table-head",children:e.jsx("h3",{className:"text-gray-900 dark:text-white text-[18px] md:text-[20px] leading-[28px] md:leading-[30px] font-semibold self-center",children:"Top-Used Agent Templates"})}),e.jsx(v,{children:e.jsxs(w,{children:[e.jsx(y,{children:e.jsx(t,{children:c.map((s,l)=>e.jsx(a,{align:l===5?"right":"left",children:s},s))})}),e.jsxs(k,{children:[i&&e.jsx(t,{children:e.jsx(a,{colSpan:c.length,className:"!align-middle",children:"Loading ..."})}),n&&e.jsx(t,{children:e.jsx(a,{colSpan:c.length,className:"!align-middle text-red-600",children:"Failed to load templates"})}),!i&&!n&&x.map((s,l)=>e.jsxs(t,{children:[e.jsx(a,{className:"!align-middle",children:s.templateName}),e.jsx(a,{className:"!align-middle",children:s.uses}),e.jsx(a,{className:"!align-middle",children:s.lastUsedDate}),e.jsxs(a,{className:"!align-middle",align:"right",children:[e.jsx("button",{className:"flex justify-center items-center ml-auto w-8 h-8 min-w-8 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer outline-none",onClick:u,"aria-controls":d?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":d?"true":void 0,children:e.jsx("img",{src:"/images/icons/edit-dots-dark-icon.svg",alt:"",className:"w-5 dark:brightness-1 dark:invert"})}
1),e.jsxs(b,{anchorEl:o,open:d,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},children:[e.jsx(h,{children:"Edit"}),e.jsx(h,{children:"View"})]})]})]},l)),!i&&!n&&x.length===0&&e.jsx(t,{children:e.jsx(a,{colSpan:5,className:"!align-middle",children:"No usage data found."})})]})]})})]})]})}export{E 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.