PageSourceSearch

https://meetborderless.com/build/assets/system-CPnFstzQ.js

js meetborderless.com collected 2026-10-09 22:42:37 UTC 9,553 bytes, 1 lines download raw bytes

1import{j as e}from"./app-C1iegf7Q.js";import{H as b}from"./inertia-BpyZy4w-.js";import{A as o}from"./admin-badge-CnLlmTcA.js";import{A as r}from"./admin-card-CGRnBfIW.js";import{a as u}from"./admin-layout-BhXWbUlP.js";/* empty css            */import"./app-logo-Dz0wogSq.js";import"./logo-light-DU4bWymm.js";import"./flash-toast-C6O0iVL1.js";import"./createLucideIcon-wqc1LSWg.js";import"./info-D2ZN_yLm.js";import"./triangle-alert-C7AVwNi-.js";import"./circle-x-Bp6Mbpgt.js";import"./circle-check-BMWvzPMx.js";import"./x-DQSeRCcH.js";import"./arrow-left-DCX0fhKH.js";import"./menu-BR3Nc3Gr.js";import"./users-BCcupCXV.js";import"./folder-open-I72SPUVk.js";import"./pound-sterling-D16GLaAZ.js";import"./book-open-DVFlG_9t.js";function p(s){return`£${(s/100).toFixed(2)}`}function g(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(0)}k`:String(s)}function f(s){return{manual:"Manual",adzuna:"Adzuna",reed:"Reed",sponsorshipjobs:"SponsorshipJobs"}[s]??s}function h(s){return new Date(s).toLocaleDateString("en-GB",{weekday:"short",day:"numeric"}).replace(",","")}function n({label:s,right:i}){return e.jsxs("div",{className:"flex items-center border-b border-line-2 px-4 py-2.5 last:border-b-0",children:[e.jsx("span",{className:"flex-1 text-sm text-ink",children:s}),e.jsx("div",{className:"shrink-0",children:i})]})}function x({value:s}){return e.jsx("span",{className:"text-sm font-semibold text-ink",children:s})}function j({rate:s}){const i=s>=95?"bg-green":s>=80?"bg-amber":"bg-red";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-1.5 w-20 overflow-hidden rounded-full bg-bg-2",children:e.jsx("div",{className:`h-full ${i}`,style:{width:`${s}%`}})}),e.jsxs("span",{className:"text-sm font-semibold text-ink",children:[s,"%"]})]})}function N({history:s}){if(s.length===0)return e.jsx("p",{className:"px-4 py-4 text-sm text-ink-3",children:"No runs in the last 14 days."});const i=Math.max(...s.map(a=>a.total),1);return e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("div",{className:"flex h-20 items-end gap-1",children:s.map(a=>{const l=Math.max(a.total/i*100,4),c=a.total>0?a.failed/a.total*l:0,m=l-c;return e.jsxs("div",{className:"group relative flex flex-1 flex-col items-center justify-end",children:[e.jsxs("div",{className:"w-full overflow-hidden rounded-sm",style:{height:`${l}%`},children:[e.jsx("div",{className:"bg-ink/15 w-full",style:{height:`${m}%`}}),c>0&&e.jsx("div",{className:"bg-red/60 w-full",style:{height:`${c}%`}})]}),e.jsxs("div",{className:"pointer-events-none absolute bottom-full mb-1 hidden rounded bg-ink px-2 py-1 text-2xs text-white group-hover:block",children:[a.total," runs",a.failed>0?`, ${a.failed} failed`:""]})]},a.day)})}),e.jsxs("div",{className:"mt-1.5 flex justify-between",children:[e.jsx("span",{className:"text-2xs text-ink-3",children:h(s[0].day)}),e.jsx("span",{className:"text-2xs text-ink-3",children:h(s[s.length-1].day)})]})]})}function I({ai:s,jobs:i,queues:a}){const l=s.summary_7d,c=s.summary_30d,m=i.added_this_week-i.added_last_week;return e.jsxs(u,{children:[e.jsx(b,{title:"System — Admin"}),e.jsxs("div",{className:"px-4 py-5 sm:px-7 sm:py-6",children:[e.jsx("h1",{className:"mb-5 text-base font-semibold text-ink",children:"System performance"}),e.jsx("h2",{className:"mb-2.5 text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"AI agent"}),e.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-3.5 sm:grid-cols-2",children:[e.jsxs(r,{label:"Last 7 days",children:[e.jsx(n,{label:"Runs",right:e.jsxs("div",{className:"flex items-center gap-2",children:[l.failed>0&&e.jsxs("span",{className:"text-xs text-red",children:[l.failed," failed"]}),e.jsx(x,{value:l.total.toLocaleString()})]})}),l.success_rate!==null&&e.jsx(n,{label:"Success rate",right:e.jsx(j,{rate:l.success_rate})}),e.jsx(n,{label:"Total cost",right:e.jsxs("div",{className:"flex items-center gap-2",children:[l.cost_alert==="critical"&&e.jsx(o,{variant:"red",children:"Over budget"}),l.cost_alert==="warning"&&e.jsx(o,{variant:"amber",children:"High spend"}),e.jsx(x,{value:p(l.cost_pence)})]})}),e.jsx(n,{label:"Tokens used",right:e.jsx(x,{value:g(l.tokens)})}),l.avg_duration!==null&&e.jsx(n,{label:"Avg duration",right:e.jsx(x,{value:l.avg_duration>=60?`${Math.round(l.avg_duration/60)}m`:`${l.avg_duration}s`})})]}),e.jsxs(r,{label:"Last 30 days",children:[e.jsx(n,{label:"Runs",right:e.jsx(x,{value:c.total.toLocaleStr
1ing()})}),e.jsx(n,{label:"Success rate",right:c.total>0?e.jsx(j,{rate:Math.round(c.succeeded/c.total*100)}):e.jsx("span",{className:"text-xs text-ink-3",children:"No data"})}),e.jsx(n,{label:"Total cost",right:e.jsx(x,{value:p(c.cost_pence)})})]}),e.jsx(r,{label:"Runs — last 14 days",className:"sm:col-span-2",children:e.jsx(N,{history:s.daily_history})}),e.jsx(r,{label:"Top triggers (7d)",children:Object.keys(s.top_triggers).length===0?e.jsx("p",{className:"px-4 py-4 text-sm text-ink-3",children:"No runs"}):Object.entries(s.top_triggers).map(([t,d])=>e.jsxs("div",{className:"flex items-center border-b border-line-2 px-4 py-2 last:border-b-0",children:[e.jsx("span",{className:"flex-1 font-mono text-xs text-ink",children:t}),e.jsx("span",{className:"text-xs font-semibold text-ink",children:d})]},t))}),e.jsx(r,{label:"Models (7d)",children:s.top_models.length===0?e.jsx("p",{className:"px-4 py-4 text-sm text-ink-3",children:"No data"}):s.top_models.map(t=>e.jsxs("div",{className:"flex items-center border-b border-line-2 px-4 py-2 last:border-b-0",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-ink",children:t.model}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-ink-3",children:p(t.cost)}),e.jsxs("span",{className:"text-xs font-semibold text-ink",children:[t.count," runs"]})]})]},t.model))}),e.jsx(r,{label:"Recent AI failures",className:"sm:col-span-2",children:s.recent_failures.length===0?e.jsx("p",{className:"px-4 py-3 text-sm text-ink-3",children:"No failures."}):s.recent_failures.map((t,d)=>e.jsxs("div",{className:"border-b border-line-2 px-4 py-2.5 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{variant:"red",children:t.trigger}),e.jsx("span",{className:"text-xs text-ink-2",children:t.agent}),e.jsx("span",{className:"ml-auto text-xs text-ink-3",children:t.time_ago})]}),t.error&&e.jsx("p",{className:"mt-1 font-mono text-xs text-ink-3",children:t.error})]},d))})]}),e.jsx("h2",{className:"mb-2.5 text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Job ingestion"}),e.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-3.5 sm:grid-cols-2",children:[e.jsxs(r,{label:"Overview",children:[e.jsx(n,{label:"Total jobs",right:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-ink-3",children:[i.published.toLocaleString()," published"]}),e.jsx(x,{value:i.total.toLocaleString()})]})}),e.jsx(n,{label:"Added this week",right:e.jsxs("div",{className:"flex items-center gap-2",children:[m!==0&&e.jsxs("span",{className:`text-xs ${m>0?"text-green":"text-red"}`,children:[m>0?"+":"",m," vs last"]}),e.jsx(x,{value:i.added_this_week.toLocaleString()})]})}),e.jsx(n,{label:"Expiring in 7 days",right:e.jsx(x,{value:i.expiring_7d})})]}),e.jsx(r,{label:"By source",children:i.by_source.length===0?e.jsx("p",{className:"px-4 py-4 text-sm text-ink-3",children:"No jobs"}):i.by_source.map(t=>e.jsxs("div",{className:"flex items-center border-b border-line-2 px-4 py-2.5 last:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-ink",children:f(t.source)}),e.jsxs("div",{className:"text-2xs text-ink-3",children:["Last: ",t.last_ingest_ago]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-ink-3",children:[t.published," pub"]}),e.jsx("span",{className:"text-sm font-semibold text-ink",children:t.total.toLocaleString()})]})]},t.source))})]}),e.jsx("h2",{className:"mb-2.5 text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Queue health"}),e.jsxs("div",{className:"grid grid-cols-1 gap-3.5 sm:grid-cols-2",children:[e.jsxs(r,{label:"Pending by queue",children:[a.available?Object.entries(a.sizes).map(([t,d])=>e.jsx(n,{label:t,right:d===null?e.jsx("span",{className:"text-xs text-ink-3",children:"N/A"}):e.jsxs("div",{className:"flex items-center gap-2",children:[d>50&&e.jsx(o,{variant:"amber",children:"Backlogged"}),e.jsx(x,{value:d.toLocaleString()})]})},t)):e.jsx("p",{className:"px-4 py-3 text-sm text-ink-3",children:"Queue sizes unavailable (sync driver in use)."}),e.jsx(n,{label:"Failed jobs (total)",right:e.jsxs("div",{className:"flex items-center gap-2",children:[a.failed_total>0&&e.jsx(o,{variant:"red",children:a.failed_total}),a.failed_total===0&&e.jsx(o,{variant:"green",children:"Clean"})]})})]}),e.jsx(r,{label:"Recent failed jobs",children:a.failed_recent.length===0?e.jsx("p",{className:"px-4 py-3 text-sm text-ink-3",children:"No failed jobs."}):a.failed_recent.map(t=>e.jsxs("div",{className:"border-b border-line-2 px-4 py-2.5 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-xs font-semibold text-ink",children:t.job}),e.jsx(o,{variant:"neutral",children:t.queue}),e.jsx("span",{className:"ml-auto text-xs text-ink-3",children:t.failed_ago})]}),t.error&&e.jsx("p",{className:"mt-1 font-mono text-xs text-ink-3",children:t.error})]},t.id))})]})]})]})}export{I 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.