PageSourceSearch

https://app.tracelog.io/chunk-ULR5EM6W.js

js tracelog.io collected 2026-09-25 22:13:01 UTC 7,171 bytes, 1 lines download raw bytes

1import{a as J}from"./chunk-KZDMZO4N.js";import{b as z}from"./chunk-4E4VTYIW.js";import{a as G}from"./chunk-ZNJYTE34.js";import"./chunk-H44T43YT.js";import{a as q}from"./chunk-S7T7242O.js";import{a as B}from"./chunk-A5KEZNYF.js";import{a as L,b as O,c as U}from"./chunk-53IM6ZZD.js";import{a as $}from"./chunk-LS3OIO2Z.js";import{a as H}from"./chunk-YQ7DYZI6.js";import"./chunk-DMT2HPWQ.js";import{c as V}from"./chunk-6MN5GHNC.js";import"./chunk-AGBZD5KP.js";import{a as h}from"./chunk-JMFWN52Y.js";import"./chunk-LDKR5M2M.js";import"./chunk-BYEUO3JE.js";import{b as R}from"./chunk-5RAZKGOK.js";import{a as F}from"./chunk-5MZGB6BC.js";import"./chunk-VZLSSRUN.js";import"./chunk-WLX3VRN2.js";import{na as j,oa as N}from"./chunk-EWQE2ILW.js";import"./chunk-YPIC2JXO.js";import"./chunk-OY4V5JEA.js";import"./chunk-OJLFRCCQ.js";import{Da as E,Dc as I,Ic as P,Jc as D,Kb as _,Lb as b,Ob as C,Pb as A,Qb as d,Rb as o,Sb as r,Sc as p,Tb as m,_b as x,ab as a,ac as v,cc as c,ha as y,ma as g,na as f,nc as w,qc as l,rc as u,sb as S,sc as k,wb as M,xa as T}from"./chunk-YVUFFV5V.js";import"./chunk-4CLCTAJ7.js";var Q=(i,e)=>e.executedAt,W=(i,e)=>e.plan;function X(i,e){i&1&&m(0,"tl-loading-state",2)}function Y(i,e){if(i&1){let t=x();o(0,"tl-error-state",3),v("retry",function(){g(t);let s=c();return f(s.load())}),r()}}function Z(i,e){i&1&&m(0,"tl-empty-state",18)}function ee(i,e){if(i&1){let t=x();o(0,"button",23),v("click",function(){g(t);let s=c(3);return f(s.navigate(["/admin/system"]))}),o(1,"mat-icon",24),l(2,"error"),r(),o(3,"div",25)(4,"div",26)(5,"span",27),l(6),r(),o(7,"span",28),l(8),P(9,"timeAgo"),r()(),o(10,"p",29),l(11),r()()()}if(i&2){let t=e.$implicit,n=c(3);a(6),u(t.scheduler),a(2),u(D(9,3,t.executedAt)),a(3),k(" ",n.truncate(t.error)," ")}}function te(i,e){if(i&1&&(o(0,"div",19),C(1,ee,12,5,"button",22,Q),r()),i&2){let t=c();a(),A(t.schedulers.recentFailures)}}function ie(i,e){i&1&&m(0,"tl-empty-state",21)}function ne(i,e){if(i&1&&(o(0,"div")(1,"div",30)(2,"span",31),l(3),r(),o(4,"span",32),l(5),P(6,"tlNumber"),r()(),o(7,"div",33),m(8,"div",34),r()()),i&2){let t=e.$implicit;a(3),u(t.plan),a(2),u(D(6,4,t.count)),a(3),w("width",t.percentage,"%")}}function ae(i,e){if(i&1&&(o(0,"div",19),C(1,ne,9,6,"div",null,W),r()),i&2){let t=c(2);a(),A(t.planEntries())}}function re(i,e){if(i&1){let t=x();o(0,"div",4),m(1,"tl-metric-card",5)(2,"tl-metric-card",6)(3,"tl-metric-card",7)(4,"tl-metric-card",8),r(),o(5,"div",9),m(6,"tl-metric-card",10)(7,"tl-metric-card",11)(8,"tl-metric-card",12),r(),o(9,"div",13)(10,"mat-card",14)(11,"mat-card-content")(12,"div",15)(13,"h2",16),l(14,"Recent scheduler failures"),r(),o(15,"button",17),v("click",function(){g(t);let s=c();return f(s.navigate(["/admin/system"]))}),l(16,"View all"),r()(),_(17,Z,1,0,"tl-empty-state",18)(18,te,3,0,"div",19),r()(),o(19,"mat-card",14)(20,"mat-card-content")(21,"h2",20),l(22,"Users by plan"),r(),_(23,ie,1,0,"tl-empty-state",21)(24,ae,3,0,"div",19),r()()()}if(i&2){let t=e,n=c();a(),d("value",t.users.total),a(),d("value",t.projects.total),a(),d("value",t.events.thisMonth)("compact",!0),a(),d("value",n.aiCostCents())("tooltip",n.aiTokensTooltip()),a(2),d("value",t.users.verified)("hint",n.verifiedUsersHint()),a(),d("value",t.users.admins),a(),d("value",t.projects.active)("hint",n.activeProjectsHint()),a(9),b(t.schedulers.recentFailures.length===0?17:18),a(6),b(n.planEntries().length===0?23:24)}}var K=class i extends V{adminApi=y(J);numberPipe=y(h);statsResponse=T(z());stats=p(()=>this.statsResponse().data);aiCostCents=p(()=>{let e=this.stats()?.aiBudget?.estimatedCost;return e==null?null:Math.round(e*100)});verifiedUsersHint=p(()=>{let e=this.stats()?.users.total;return e!=null?`of ${this.numberPipe.transform(e)}`:void 0});activeProjectsHint=p(()=>{let e=this.stats()?.events.today;return e!=null?`${this.numberPipe.transform(e)} events today`:void 0});aiTokensTooltip=p(()=>{let e=this.stats()?.aiBudget;if(e)return`Prompt: ${e.promptTokens.toLocaleString()} \xB7 Completion: ${e.completionTokens.toLocaleString()} \xB7 Embedding: ${e.embeddingTokens.toLocaleString()}`});planEntries=p(()=>{let e=this.stats()?.users?.byPlan;
1if(!e)return[];let t=Object.values(e).reduce((n,s)=>n+s,0);return Object.entries(e).map(([n,s])=>({plan:n,count:s,percentage:t>0?s/t*100:0})).sort((n,s)=>s.count-n.count)});ngOnInit(){this.load()}load(){this.loadApiData(this.adminApi.getStats(),this.statsResponse)}truncate(e,t=80){return e?e.length>t?`${e.slice(0,t)}\u2026`:e:""}static \u0275fac=(()=>{let e;return function(n){return(e||(e=E(i)))(n||i)}})();static \u0275cmp=S({type:i,selectors:[["app-admin-dashboard-page"]],features:[I([h]),M],decls:5,vars:1,consts:[[1,"p-6","flex","flex-col","gap-6"],["title","Admin dashboard","subtitle","Platform-wide signal"],["variant","spinner","label","Loading stats\u2026"],[3,"retry"],[1,"grid","grid-cols-1","sm:grid-cols-2","xl:grid-cols-4","gap-4"],["label","Total users",3,"value"],["label","Total projects",3,"value"],["label","Events this month",3,"value","compact"],["label","AI cost (month)","currency","EUR",3,"value","tooltip"],[1,"grid","grid-cols-1","sm:grid-cols-3","gap-4"],["label","Verified users","size","sm",3,"value","hint"],["label","Admins","size","sm",3,"value"],["label","Active projects (7d)","size","sm",3,"value","hint"],[1,"grid","grid-cols-1","lg:grid-cols-2","gap-6"],["appearance","outlined"],[1,"flex","items-center","justify-between","gap-2","mb-4"],[1,"text-sm","font-semibold","text-text-primary"],["mat-button","","type","button",1,"text-xs!",3,"click"],["icon","check_circle","title","All schedulers healthy","description","No failures recorded in the last 24 hours.","variant","success"],[1,"flex","flex-col","gap-3"],[1,"text-sm","font-semibold","text-text-primary","mb-4"],["icon","bar_chart","title","No data","description","Plan distribution unavailable."],["type","button",1,"flex","items-start","gap-3","rounded-md","border","border-status-critical-bg","bg-status-critical-bg","px-3","py-2","text-left","hover:border-status-critical","transition-colors"],["type","button",1,"flex","items-start","gap-3","rounded-md","border","border-status-critical-bg","bg-status-critical-bg","px-3","py-2","text-left","hover:border-status-critical","transition-colors",3,"click"],[1,"material-symbols-outlined","icon-sm","text-status-critical","mt-0.5"],[1,"flex-1","min-w-0"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-sm","font-medium","text-text-primary","truncate"],[1,"text-xs","text-text-tertiary","shrink-0"],[1,"text-xs","text-text-secondary","mt-1","truncate"],[1,"flex","items-center","justify-between","mb-1"],[1,"text-sm","font-medium","text-text-primary"],[1,"text-sm","text-text-secondary","tabular-nums"],[1,"h-2","bg-bg-tertiary","rounded-full","overflow-hidden"],[1,"h-full","bg-primary-500","rounded-full","transition-all"]],template:function(t,n){if(t&1&&(o(0,"section",0),m(1,"tl-page-header",1),_(2,X,1,0,"tl-loading-state",2)(3,Y,1,0,"tl-error-state")(4,re,25,13),r()),t&2){let s;a(2),b(n.statsResponse().loading?2:n.statsResponse().error?3:(s=n.stats())?4:-1,s)}},dependencies:[U,L,O,N,j,R,B,G,F,H,$,q,h],encapsulation:2,changeDetection:0})};export{K as AdminDashboardPage};

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.