PageSourceSearch

https://www.knowmanity.ai/_next/static/chunks/pages/admin/user-activity-50046a4fc5b71bb6.js

js knowmanity.ai collected 2026-10-05 12:09:49 UTC 12,393 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5309],{3381:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]])},9498:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},19481:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("corner-down-left",[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]])},21355:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},29053:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},34287:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},36414:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},40892:(e,t,a)=>{"use strict";a.d(t,{n:()=>d});var s=a(14232),l=a(69367),r=a(33535);function d(){let e=(0,l.useSupabaseClient)(),t=(0,l.useUser)(),{impersonation:a}=(0,r.yG)(),[d,i]=(0,s.useState)(null),[n,c]=(0,s.useState)(null),[x,h]=(0,s.use
1State)(!0),o=a.tenantId||d,p=!!a.tenantId&&a.tenantId!==d;return(0,s.useEffect)(()=>{t&&(async()=>{let{data:s}=await e.from("users").select("tenant_id").eq("auth_id",t.id).single();(null==s?void 0:s.tenant_id)&&i(s.tenant_id);let l=a.tenantId||(null==s?void 0:s.tenant_id);if(l){let{data:t}=await e.from("tenants").select("name").eq("id",l).single();c((null==t?void 0:t.name)||null)}h(!1)})()},[t,e,a.tenantId]),{tenantId:o,tenantName:p?a.tenantName:n,isImpersonating:p,loading:x}}},46293:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},51532:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/user-activity",function(){return a(82793)}])},56056:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]])},58061:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(37876);function l(e){let{title:t,subtitle:a,icon:l,actions:r,className:d=""}=e;return(0,s.jsxs)("div",{className:"mb-8 rounded-2xl bg-gradient-to-r from-blue-900 via-blue-800 to-brandblue-700 text-white p-6 relative overflow-hidden shadow-lg ".concat(d),children:[(0,s.jsxs)("div",{className:"absolute inset-0 opacity-10 pointer-events-none",children:[(0,s.jsx)("div",{className:"absolute top-0 right-0 w-48 h-48 bg-orange-500 rounded-full blur-3xl"}),(0,s.jsx)("div",{className:"absolute bottom-0 left-1/2 w-40 h-40 bg-blue-300 rounded-full blur-3xl"})]}),(0,s.jsxs)("div",{className:"relative flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[l&&(0,s.jsx)("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl bg-white/10 flex items-center justify-center backdrop-blur-sm",children:(0,s.jsx)(l,{className:"w-5 h-5 text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:t}),a&&(0,s.jsx)("p",{className:"text-blue-200 text-sm mt-0.5 leading-relaxed",children:a})]})]}),r&&(0,s.jsx)("div",{className:"shrink-0",children:r})]})]})}a(14232)},59917:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]])},63906:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},66762:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},70175:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]])},74062:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});
1let s=(0,a(17963).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},82793:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>b});var s=a(37876),l=a(14232),r=a(89099),d=a(66762),i=a(46293),n=a(83981),c=a(3381),x=a(21355),h=a(29167),o=a(39771),p=a(58061),u=a(89260),m=a(40892);function y(){let e="en"===(0,r.useRouter)().locale,t=(t,a)=>e?a:t,{fetchAdmin:a}=(0,u.Z)(),{tenantId:o,loading:y}=(0,m.n)(),[b,v]=(0,l.useState)(!0),[k,j]=(0,l.useState)([]),[f,N]=(0,l.useState)({totalUsers:0,activeUsers:0,totalMessages:0,totalKnowledgeUpdates:0}),[w,A]=(0,l.useState)(null);(0,l.useEffect)(()=>{!y&&o&&M()},[y,o]);let M=async()=>{v(!0),A(null);try{let e=await a("/api/admin/user-activity");j(e.users||[]),N(e.summary||{totalUsers:0,activeUsers:0,totalMessages:0,totalKnowledgeUpdates:0})}catch(e){A(e.message||t("Netzwerkfehler","Network error"))}finally{v(!1)}},E=t=>t?new Date(t).toLocaleDateString(e?"en-GB":"de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"–";return(0,s.jsx)(h.default,{children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[(0,s.jsx)(p.A,{title:t("Explorer-Aktivit\xe4t","Explorer activity"),subtitle:t("\xdcbersicht \xfcber Explorer-Aktivit\xe4ten, Chat-Nutzung und Knowledge-Updates","Overview of explorer activity, chat usage, and knowledge updates"),icon:d.A}),(0,s.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[(0,s.jsx)(g,{label:t("Registrierte Explorer","Registered explorers"),value:f.totalUsers,icon:(0,s.jsx)(i.A,{className:"w-5 h-5"}),color:"bg-brandblue-50 text-brandblue-700"}),(0,s.jsx)(g,{label:t("Aktive Explorer","Active explorers"),value:f.activeUsers,icon:(0,s.jsx)(n.A,{className:"w-5 h-5"}),color:"bg-green-50 text-green-700"}),(0,s.jsx)(g,{label:t("Chat-Nachrichten","Chat messages"),value:f.totalMessages,icon:(0,s.jsx)(c.A,{className:"w-5 h-5"}),color:"bg-purple-50 text-purple-700"}),(0,s.jsx)(g,{label:"Knowledge Updates",value:f.totalKnowledgeUpdates,icon:(0,s.jsx)(x.A,{className:"w-5 h-5"}),color:"bg-orange-50 text-orange-700"})]}),w&&(0,s.jsx)("div",{className:"bg-red-50 border border-red-200 p-4 rounded-lg mb-6 text-red-700",children:w}),b?(0,s.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3].map(e=>(0,s.jsx)("div",{className:"h-16 bg-gray-100 rounded-lg"},e))}):0===k.length?(0,s.jsxs)("div",{className:"text-center py-16 text-gray-400",children:[(0,s.jsx)("p",{className:"text-4xl mb-3"}),(0,s.jsx)("p",{className:"text-lg font-medium",children:t("Keine Explorer gefunden","No explorers found")}),(0,s.jsx)("p",{className:"text-sm mt-1",children:t("Laden Sie Explorer \xfcber die Explorer-Verwaltung ein.","Invite explorers through explorer management.")})]}):(0,s.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:(0,s.jsxs)("table",{className:"w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50 border-b border-gray-200",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase",children:"Explorer"}),(0,s.jsx)("th",{className:"px-6 py-3 text-center text-xs font-semibold text-gray-500 uppercase",children:"Engagement"}),(0,s.jsx)("th",{className:"px-6 py-3 text-center text-xs font-semibold text-gray-500 uppercase",children:t("Nachrichten","Messages")}),(0,s.jsx)("th",{className:"px-6 py-3 text-center text-xs font-semibold text-gray-500 uppercase",children:t("Updates","Updates")}),(0,s.jsx)("th",{className:"px-6 py-3 text-right text-xs font-semibold text-gray-500 uppercase",children:t("Letzte Aktivit\xe4t","Last activity")})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-gray-100",children:k.map(e=>{var a;let l=0===(a=e.messageCount)?{label:t("Inaktiv","Inactive"),color:"bg-gray-100 text-gray-600"}:a<5?{label:t("Gering","Low"),color:"bg-yellow-100 text-yellow-800"}:a<20?{label:t("Mittel","Medium"),color:"bg-brandblue-100 text-brandblue"}:{label:t("Hoch","High"),color:"bg-green-100 text-green-800"};return(0,s.jsxs)("tr",{className:"hover:bg-gray-50 transition-colors",children:[(0,s.jsx)("td",{className:"px-6 py-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium text-gray-900",children:e.name}),(0,s.jsx)("div",{className:"text-xs text-gray-400",children:e.email}),(0,s.jsxs)("div",{className:"text-xs text-gray-300 mt-0.5",children:[t("Registriert","Registered"),": ",E(e.joinedAt)]})]})}),(0,s.jsx)("td",{className:"px-6 py-4 text-center",children:(0,s.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ".concat(l.color),children:l.label})}),(0,s.jsx)("td",{className:"px-6 py-4 text-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold text-gray-700",children:e.messageCount})}),(0,s.jsx)("td",{className:"px-6 py-4 text-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold text-gray-700",children:e.knowledgeUpdateCount})}),(0,s.jsx)("td",{className:"px-6 py-4 text-right text-gray-500 text-xs",children:e.lastMessageAt?E(e.lastMessageAt):t("Noch nie","Never")})]},e.id)})})]})})]})})}function g(e){let{label:t,value:a,icon:l,color:r}=e;return(0,s.jsxs)("div",{className:"rounded-xl p-4 ".concat(r),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsx)("div",{children:l}),(0,s.jsx)("span",{className:"text-2xl font-bold",children:a})]}),(0,s.jsx)("p",{className:"text-xs font-medium opacity-80",children:t})]})}function b(){return(0,s.jsx)(o.A,{children:(0,s.jsx)(y,{})})}},86846:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(17963).A)("message-square-text",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]])}},e=>{e.O(0,[4587,7966,4661,148,9167,636,6593,8792],()=>e(e.s=51532)),_N_E=e.O()}]);

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.