@ai-development-environment/server 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/build-manifest.json +3 -3
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/analytics-events/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/console-logs/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/devices/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/devices/enroll/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/devices/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/provisioning-profiles/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/push-notifications/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/unified-events/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_global-error.html +1 -1
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v12ijp._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_012q7w6._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_07qmjrj._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_0dquba3._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_0t2jwg3._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1bzibio._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1h1k5ja._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1kle1nm._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1m50niy._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1pja493._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1y98hs-._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1z02bsk._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_build-data_build-data-page_tsx_1t2rrh0._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_builds_coverage-report-page_tsx_1nhwba1._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_devices_device-detail-page_tsx_1mut_l4._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_devices_devices-page_tsx_1y45lv2._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_github_pull-request-detail-page_tsx_1etlamp._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_jira_cache-page_tsx_1znt1yl._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_jira_ticket-detail-page_tsx_0vmf8nk._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_jira_tickets-page_tsx_0_ocldp._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_push-notifications_push-notifications-page_tsx_1c_b-t4._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_signing-assets_provisioning-profiles-page_tsx_1zr20o7._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_skills_skill-sync-page_tsx_15sidhb._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_skills_skills-page_tsx_0o1nlbg._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +1 -1
- package/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +1 -1
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{0rrwapb85e3vs.js → 0a8bo5bqge171.js} +1 -1
- package/standalone/.next/static/chunks/0bx-vj8k3jlsz.js +35 -0
- package/standalone/.next/static/chunks/{1z2n-kfxw0xxf.js → 0s_vkk_t0i4mg.js} +1 -1
- package/standalone/.next/static/chunks/12msdp4rhv6ti.js +7 -0
- package/standalone/.next/static/chunks/{1rvz2z_cov6ug.js → 15rske_fphtgw.js} +2 -2
- package/standalone/.next/static/chunks/19l74y4_uc81t.js +33 -0
- package/standalone/.next/static/chunks/{0elijgx6pfo7w.js → 1a5_4cpwnx9uu.js} +1 -1
- package/standalone/.next/static/chunks/1a9j-qydwrg8m.js +7 -0
- package/standalone/.next/static/chunks/1e-vykrs41myl.js +41 -0
- package/standalone/.next/static/chunks/1jwc4nasae27c.js +1 -0
- package/standalone/.next/static/chunks/1llwo8aslhpdp.js +1 -0
- package/standalone/.next/static/chunks/{2-k0gnjfr6ayw.js → 1nkkb5gu3-rhf.js} +1 -1
- package/standalone/.next/static/chunks/1oh9kzyxfy5ih.js +1 -0
- package/standalone/.next/static/chunks/1q87ulu5dp43f.js +1 -0
- package/standalone/.next/static/chunks/{2i8eu37_ggvr8.js → 1smbfkd1cb015.js} +10 -10
- package/standalone/.next/static/chunks/1ynnv9u7cfr4c.js +1 -0
- package/standalone/.next/static/chunks/1yx2no0f8qqs5.js +7 -0
- package/standalone/.next/static/chunks/{3kswwcsm5y95r.js → 1zw6r-idmbfgl.js} +1 -1
- package/standalone/.next/static/chunks/224rpxiffot1u.js +9 -0
- package/standalone/.next/static/chunks/24tqnzr1nzhom.js +1 -0
- package/standalone/.next/static/chunks/292r4qzwbnzg7.js +45 -0
- package/standalone/.next/static/chunks/{3zmi_6t6n2zhl.js → 29bdsmo8ketwt.js} +2 -2
- package/standalone/.next/static/chunks/{08n97leuqvfec.js → 29pirjk9q8gfx.js} +1 -1
- package/standalone/.next/static/chunks/{0gduhhe5i5fyj.js → 2bdfoatg4qo7w.js} +1 -1
- package/standalone/.next/static/chunks/{1mdi8gmbt3v4y.js → 2mzx47_wqfqf6.js} +1 -1
- package/standalone/.next/static/chunks/2rplo_7t3zrb9.js +1 -0
- package/standalone/.next/static/chunks/{0txd8z6bbq8sd.js → 2rv5r0dwu0nv6.js} +1 -1
- package/standalone/.next/static/chunks/2u51t_6-1w566.js +1 -0
- package/standalone/.next/static/chunks/{3fdxq7wzqx26o.js → 2xgehciyxxmdl.js} +1 -1
- package/standalone/.next/static/chunks/34pq01spesbci.js +1 -0
- package/standalone/.next/static/chunks/34pqiakzvfxgg.js +1 -0
- package/standalone/.next/static/chunks/{3g004cn7om3tw.js → 35hg231a8ig1t.js} +1 -1
- package/standalone/.next/static/chunks/36r84wnfwt4kn.css +1 -0
- package/standalone/.next/static/chunks/{11x96hq8bk827.js → 37dd1jthysw7j.js} +1 -1
- package/standalone/.next/static/chunks/{2cohukhgw3x39.js → 384f6qhpff4pn.js} +3 -3
- package/standalone/.next/static/chunks/3_xim7hqyyfr0.js +1 -0
- package/standalone/.next/static/chunks/3eumqpi7f1fek.js +30 -0
- package/standalone/.next/static/chunks/{1209uyjs06prv.js → 3hq055db_1oe4.js} +1 -1
- package/standalone/.next/static/chunks/3ns362pjxzs4s.js +3 -0
- package/standalone/.next/static/chunks/3ojl4tmmy52v4.js +29 -0
- package/standalone/.next/static/chunks/3sxc882-vifa-.js +10 -0
- package/standalone/.next/static/chunks/40k5mbsz_tzvi.js +1 -0
- package/standalone/.next/static/chunks/43pkxbd7uiq6-.js +33 -0
- package/standalone/.next/static/chunks/00vmfj3b0p_9v.js +0 -1
- package/standalone/.next/static/chunks/05qk7dn22ctyw.js +0 -33
- package/standalone/.next/static/chunks/08b5rziqjcmmv.js +0 -9
- package/standalone/.next/static/chunks/0hcrlyp4czqm4.js +0 -33
- package/standalone/.next/static/chunks/0kkylz4dfb-6-.css +0 -1
- package/standalone/.next/static/chunks/0ouxq2tjuuo5p.js +0 -1
- package/standalone/.next/static/chunks/0qslkhjg4g4wo.js +0 -1
- package/standalone/.next/static/chunks/0sgv58x3pi1lt.js +0 -1
- package/standalone/.next/static/chunks/1-uwntvgs-8hy.js +0 -7
- package/standalone/.next/static/chunks/175wjcrz57-r8.js +0 -3
- package/standalone/.next/static/chunks/1aymjnttvjkz8.js +0 -35
- package/standalone/.next/static/chunks/1p0jamt--jvn2.js +0 -1
- package/standalone/.next/static/chunks/1wm2l6ainzpua.js +0 -30
- package/standalone/.next/static/chunks/2aaudeflwvhrw.js +0 -1
- package/standalone/.next/static/chunks/2jj9hlwqhy5pr.js +0 -41
- package/standalone/.next/static/chunks/2ldet81o6fvx9.js +0 -7
- package/standalone/.next/static/chunks/2nnls3_0a15ot.js +0 -1
- package/standalone/.next/static/chunks/32ynps2o_ve-q.js +0 -10
- package/standalone/.next/static/chunks/3812zpxehpne1.js +0 -1
- package/standalone/.next/static/chunks/398-3q0cwr6rj.js +0 -29
- package/standalone/.next/static/chunks/3f0s63l_3ts3k.js +0 -1
- package/standalone/.next/static/chunks/3ognjxt-gne6-.js +0 -1
- package/standalone/.next/static/chunks/3q82abj2-3h1-.js +0 -1
- package/standalone/.next/static/chunks/3zux6x75u6-5-.js +0 -1
- package/standalone/.next/static/chunks/4260c5fq33ytz.js +0 -7
- package/standalone/.next/static/chunks/448r-ornlfrsf.js +0 -45
- /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_clientMiddlewareManifest.js +0 -0
- /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_ssgManifest.js +0 -0
|
@@ -8,7 +8,7 @@ module.exports=[106862,a=>{"use strict";var b=a.i(187924);let c=(0,a.i(164831).d
|
|
|
8
8
|
id name kind status workspacePath worktreeId worktreePath sizeBytes operation error
|
|
9
9
|
agent { ${k.AGENT_FIELDS} }
|
|
10
10
|
}
|
|
11
|
-
`;function z(a,b){let c=["B","KiB","MiB","GiB","TiB"],d=Math.min(Math.floor(Math.log(Math.max(a,1))/Math.log(1024)),c.length-1);return`${new Intl.NumberFormat(b,{maximumFractionDigits:1}).format(a/1024**d)} ${c[d]}`}function A({entries:a,selected:c,activeOperation:d,locale:e,onSelectionChange:f,onDelete:h,onDeleteMany:j}){let k=(0,i.useTranslations)("buildData"),m=(0,i.useTranslations)("common"),n=a.filter(a=>c.has(a.id)),r=a.length>0&&n.length===a.length;return(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(p.CardHeader,{className:"
|
|
11
|
+
`;function z(a,b){let c=["B","KiB","MiB","GiB","TiB"],d=Math.min(Math.floor(Math.log(Math.max(a,1))/Math.log(1024)),c.length-1);return`${new Intl.NumberFormat(b,{maximumFractionDigits:1}).format(a/1024**d)} ${c[d]}`}function A({entries:a,selected:c,activeOperation:d,locale:e,onSelectionChange:f,onDelete:h,onDeleteMany:j}){let k=(0,i.useTranslations)("buildData"),m=(0,i.useTranslations)("common"),n=a.filter(a=>c.has(a.id)),r=a.length>0&&n.length===a.length;return(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(p.CardHeader,{className:"max-sm:has-data-[slot=card-action]:grid-cols-1",children:[(0,b.jsx)(p.CardTitle,{children:k("deviceSupportTitle")}),(0,b.jsx)(p.CardDescription,{children:k("deviceSupportDescription")}),n.length>0&&(0,b.jsx)(p.CardAction,{className:"max-sm:col-start-1 max-sm:row-start-3 max-sm:row-span-1 max-sm:mt-3 max-sm:justify-self-stretch",children:(0,b.jsx)(l.ConfirmationDialog,{actionLabel:k("deleteSelected"),cancelLabel:m("cancel"),description:k("deleteDeviceSupportDescription",{count:n.length}),onConfirm:()=>j(n.map(a=>a.id)),title:k("deleteDeviceSupportTitle"),trigger:(0,b.jsxs)(o.Button,{disabled:d,size:"sm",variant:"outline",children:[(0,b.jsx)(g.Trash2,{})," ",k("deleteSelected")]})})})]}),0===a.length?(0,b.jsx)(s.Empty,{className:"py-8",children:(0,b.jsx)(s.EmptyHeader,{children:(0,b.jsx)(s.EmptyDescription,{children:k("noDeviceSupport")})})}):(0,b.jsxs)(u.Table,{children:[(0,b.jsx)(u.TableHeader,{children:(0,b.jsxs)(u.TableRow,{children:[(0,b.jsx)(u.TableHead,{className:"w-12",children:(0,b.jsx)(q.Checkbox,{"aria-label":k("selectAllDeviceSupport"),checked:!!r||!!n.length&&"indeterminate",onCheckedChange:b=>{for(let c of a)f(c.id,!0===b)}})}),(0,b.jsx)(u.TableHead,{children:k("deviceSupportVersion")}),(0,b.jsx)(u.TableHead,{children:k("size")}),(0,b.jsx)(u.TableHead,{children:k("agent")}),(0,b.jsx)(u.TableHead,{className:"w-12",children:(0,b.jsx)("span",{className:"sr-only",children:k("actions")})})]})}),(0,b.jsx)(u.TableBody,{children:a.map(a=>(0,b.jsxs)(u.TableRow,{children:[(0,b.jsx)(u.TableCell,{children:(0,b.jsx)(q.Checkbox,{"aria-label":k("selectEntry",{name:a.name}),checked:c.has(a.id),onCheckedChange:b=>f(a.id,!0===b)})}),(0,b.jsxs)(u.TableCell,{children:[(0,b.jsx)("span",{className:"font-mono text-xs",children:a.name}),"IDLE"!==a.operation&&(0,b.jsx)(t.Spinner,{className:"ml-2"}),a.error&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:a.error})]}),(0,b.jsx)(u.TableCell,{className:"tabular-nums",children:null===a.sizeBytes?"—":z(a.sizeBytes,e)}),(0,b.jsx)(u.TableCell,{children:(0,b.jsx)(v.Link,{href:`/agents/${a.agent.id}`,children:a.agent.name})}),(0,b.jsx)(u.TableCell,{children:(0,b.jsx)(l.ConfirmationDialog,{actionLabel:k("delete"),cancelLabel:m("cancel"),description:k("deleteDeviceSupportDescription",{count:1}),onConfirm:()=>h(a.id),title:k("deleteDeviceSupportTitle"),trigger:(0,b.jsx)(o.Button,{"aria-label":k("entryActions",{name:a.name}),disabled:d,size:"icon-sm",variant:"ghost",children:(0,b.jsx)(g.Trash2,{})})})})]},a.id))})]})]})}function B({collection:a}){let c=(0,i.useTranslations)("buildData"),d=a.progress.agents.filter(a=>"SUCCEEDED"!==a.status||a.warnings.length>0);return"COMPLETED"===a.status&&0===d.length?null:(0,b.jsx)(m.Alert,{children:(0,b.jsxs)(m.AlertDescription,{className:"space-y-1",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2 font-medium",children:["COLLECTING"===a.status&&(0,b.jsx)(t.Spinner,{}),c("progress",{complete:a.progress.finishedCount,total:a.progress.eligibleCount})]}),d.map(a=>(0,b.jsxs)("p",{children:[a.agent.name,": ",c(`agentStatus.${a.status}`),a.error?` — ${a.error}`:"",a.warnings.length?` — ${a.warnings.join("; ")}`:""]},a.agent.id))]})})}a.s(["BuildDataPage",0,function(){let a=(0,i.useTranslations)("buildData"),k=(0,i.useTranslations)("common"),C=(0,h.useLocale)(),[D,E]=(0,j.useState)(w.createClientId),[F,G]=(0,j.useState)(null),[H,I]=(0,j.useState)(!0),[J,K]=(0,j.useState)(null),[L,M]=(0,j.useState)(new Set),[N,O]=(0,j.useState)(null),P=(0,j.useRef)(null),[Q,R]=(0,j.useState)(!1),[S,T]=(0,j.useState)([]),[U,V]=(0,j.useState)(null),[W,X]=(0,j.useState)(!0),[Y,Z]=(0,j.useState)(0),[$,_]=(0,j.useState)(null),aa=(0,j.useCallback)(a=>{G(a),I(!1),K(null)},[]);(0,j.useEffect)(()=>{let a=!1,b=(0,x.controlPlaneSubscriptions)().subscribe({query:`subscription DerivedDataCollectionChanged($id: ID!) {
|
|
12
12
|
derivedDataCollectionChanged(id: $id) { ${y} }
|
|
13
13
|
}`,variables:{id:D}},{next:a=>{a.data?.derivedDataCollectionChanged&&aa(a.data.derivedDataCollectionChanged)},error:()=>void 0,complete:()=>void 0}),c=async()=>{try{let b=await (0,x.controlPlaneRequest)(`query DerivedDataCollection($id: ID!) {
|
|
14
14
|
derivedDataCollection(id: $id) { ${y} }
|
|
@@ -23,6 +23,6 @@ module.exports=[106862,a=>{"use strict";var b=a.i(187924);let c=(0,a.i(164831).d
|
|
|
23
23
|
${a}(collectionId: $collectionId, entryIds: $entryIds, requestId: $requestId) {
|
|
24
24
|
${y}
|
|
25
25
|
}
|
|
26
|
-
}`,{collectionId:F.id,entryIds:b,requestId:(0,w.createClientId)()});aa(c[a]),"deleteDerivedDataEntries"===a&&(M(new Set),O(null))}catch(a){K(a instanceof Error?a.message:String(a))}finally{R(!1)}}},ak=(0,j.useMemo)(()=>ac.length,[ac.length]);(0,j.useEffect)(()=>{let a=window.setTimeout(()=>{af||H||Z(a=>a+1)},0);return()=>window.clearTimeout(a)},[af,H,ak]);let al=(a,b)=>{if(N!==a){O(a),P.current&&window.clearTimeout(P.current),P.current=window.setTimeout(()=>O(null),5e3);return}P.current&&(window.clearTimeout(P.current),P.current=null),O(null),aj("deleteDerivedDataEntries",b)},am=(0,j.useMemo)(()=>{let a=new Map,b=new Intl.DateTimeFormat(C,{dateStyle:"full"});for(let c of S){let d=new Date(c.deletedAt),e=`${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`,f=a.get(e)??{label:b.format(d),items:[]};f.items.push(c),a.set(e,f)}return[...a.values()]},[S,C]),an=`bulk:${ag.map(a=>a.id).sort().join(":")}`,ao=N===an;return(0,b.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:a("title")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("description")})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(o.Button,{disabled:!ac.length||H||af||Q,onClick:()=>void aj("calculateDerivedDataSizes",ac.map(a=>a.id)),variant:"outline",children:[(0,b.jsx)(c,{})," ",a("calculateSizes")]}),(0,b.jsxs)(o.Button,{disabled:H||af,onClick:()=>{I(!0),K(null),M(new Set),O(null),E((0,w.createClientId)())},variant:"outline",children:[(0,b.jsx)(f.RefreshCw,{className:H?"animate-spin":void 0}),a("refresh")]})]})]}),J&&(0,b.jsx)(m.Alert,{variant:"destructive",children:(0,b.jsx)(m.AlertDescription,{children:J})}),F&&(0,b.jsx)(B,{collection:F}),H&&!F?(0,b.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(t.Spinner,{})," ",a("loading")]}):0===ac.length?(0,b.jsx)(s.Empty,{children:(0,b.jsxs)(s.EmptyHeader,{children:[(0,b.jsx)(s.EmptyTitle,{children:a("emptyTitle")}),(0,b.jsx)(s.EmptyDescription,{children:a("emptyDescription")})]})}):(0,b.jsxs)(b.Fragment,{children:[ad.length>0&&(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(p.CardHeader,{
|
|
26
|
+
}`,{collectionId:F.id,entryIds:b,requestId:(0,w.createClientId)()});aa(c[a]),"deleteDerivedDataEntries"===a&&(M(new Set),O(null))}catch(a){K(a instanceof Error?a.message:String(a))}finally{R(!1)}}},ak=(0,j.useMemo)(()=>ac.length,[ac.length]);(0,j.useEffect)(()=>{let a=window.setTimeout(()=>{af||H||Z(a=>a+1)},0);return()=>window.clearTimeout(a)},[af,H,ak]);let al=(a,b)=>{if(N!==a){O(a),P.current&&window.clearTimeout(P.current),P.current=window.setTimeout(()=>O(null),5e3);return}P.current&&(window.clearTimeout(P.current),P.current=null),O(null),aj("deleteDerivedDataEntries",b)},am=(0,j.useMemo)(()=>{let a=new Map,b=new Intl.DateTimeFormat(C,{dateStyle:"full"});for(let c of S){let d=new Date(c.deletedAt),e=`${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`,f=a.get(e)??{label:b.format(d),items:[]};f.items.push(c),a.set(e,f)}return[...a.values()]},[S,C]),an=`bulk:${ag.map(a=>a.id).sort().join(":")}`,ao=N===an;return(0,b.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:a("title")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("description")})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(o.Button,{disabled:!ac.length||H||af||Q,onClick:()=>void aj("calculateDerivedDataSizes",ac.map(a=>a.id)),variant:"outline",children:[(0,b.jsx)(c,{})," ",a("calculateSizes")]}),(0,b.jsxs)(o.Button,{disabled:H||af,onClick:()=>{I(!0),K(null),M(new Set),O(null),E((0,w.createClientId)())},variant:"outline",children:[(0,b.jsx)(f.RefreshCw,{className:H?"animate-spin":void 0}),a("refresh")]})]})]}),J&&(0,b.jsx)(m.Alert,{variant:"destructive",children:(0,b.jsx)(m.AlertDescription,{children:J})}),F&&(0,b.jsx)(B,{collection:F}),H&&!F?(0,b.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(t.Spinner,{})," ",a("loading")]}):0===ac.length?(0,b.jsx)(s.Empty,{children:(0,b.jsxs)(s.EmptyHeader,{children:[(0,b.jsx)(s.EmptyTitle,{children:a("emptyTitle")}),(0,b.jsx)(s.EmptyDescription,{children:a("emptyDescription")})]})}):(0,b.jsxs)(b.Fragment,{children:[ad.length>0&&(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(p.CardHeader,{children:[(0,b.jsx)(p.CardTitle,{children:a("derivedDataTitle")}),(0,b.jsx)(p.CardDescription,{children:a("derivedDataDescription")})]}),ag.length>0&&(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b p-3",children:[(0,b.jsx)("p",{className:"text-sm",children:a("selected",{count:ag.length})}),(0,b.jsxs)(o.Button,{className:"w-40",disabled:af||Q,onClick:()=>al(an,ag.map(a=>a.id)),size:"sm",variant:ao?"destructive":"outline",children:[ao?(0,b.jsx)(d.Check,{}):(0,b.jsx)(g.Trash2,{}),ao?a("confirmDelete"):a("deleteSelected")]})]}),(0,b.jsxs)(u.Table,{children:[(0,b.jsx)(u.TableHeader,{children:(0,b.jsxs)(u.TableRow,{children:[(0,b.jsx)(u.TableHead,{className:"w-12",children:(0,b.jsx)(q.Checkbox,{"aria-label":a("selectAll"),checked:!!ah||!!ai&&"indeterminate",onCheckedChange:a=>{O(null),M(!0===a?new Set(ac.map(a=>a.id)):new Set)}})}),(0,b.jsx)(u.TableHead,{children:a("folder")}),(0,b.jsx)(u.TableHead,{children:a("worktree")}),(0,b.jsx)(u.TableHead,{children:a("size")}),(0,b.jsx)(u.TableHead,{children:a("agent")}),(0,b.jsx)(u.TableHead,{className:"w-12 text-right",children:(0,b.jsx)("span",{className:"sr-only",children:a("actions")})})]})}),(0,b.jsx)(u.TableBody,{children:ad.map(c=>(0,b.jsxs)(u.TableRow,{children:[(0,b.jsx)(u.TableCell,{children:(0,b.jsx)(q.Checkbox,{"aria-label":a("selectEntry",{name:c.name}),checked:L.has(c.id),onCheckedChange:a=>{O(null),M(b=>{let d=new Set(b);return!0===a?d.add(c.id):d.delete(c.id),d})}})}),(0,b.jsxs)(u.TableCell,{children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"break-all font-mono text-xs",children:c.name}),"READY"!==c.status&&(0,b.jsx)(n.Badge,{variant:"secondary",children:a(`status.${c.status}`)}),"IDLE"!==c.operation&&(0,b.jsx)(t.Spinner,{})]}),c.error&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:c.error})]}),(0,b.jsx)(u.TableCell,{className:"font-mono text-xs",children:c.worktreeId&&c.worktreePath?(0,b.jsx)(v.Link,{className:"underline-offset-4 hover:underline",href:`/worktrees/${c.worktreeId}`,children:c.worktreePath}):"—"}),(0,b.jsx)(u.TableCell,{className:"tabular-nums",children:null===c.sizeBytes?"—":z(c.sizeBytes,C)}),(0,b.jsx)(u.TableCell,{children:(0,b.jsx)(v.Link,{className:"underline-offset-4 hover:underline",href:`/agents/${c.agent.id}`,children:c.agent.name})}),(0,b.jsx)(u.TableCell,{className:"w-12 text-right",children:(0,b.jsxs)(r.DropdownMenu,{onOpenChange:a=>{a||N!==`row:${c.id}`||(P.current&&(window.clearTimeout(P.current),P.current=null),O(null))},children:[(0,b.jsx)(r.DropdownMenuTrigger,{asChild:!0,children:(0,b.jsx)(o.Button,{"aria-label":a("entryActions",{name:c.name}),className:"ml-auto",disabled:af||Q,size:"icon-sm",variant:"ghost",children:(0,b.jsx)(e.MoreHorizontal,{})})}),(0,b.jsx)(r.DropdownMenuContent,{align:"end",className:"w-40",children:(0,b.jsxs)(r.DropdownMenuItem,{onSelect:a=>{N!==`row:${c.id}`&&a.preventDefault(),al(`row:${c.id}`,[c.id])},variant:N===`row:${c.id}`?"destructive":"default",children:[N===`row:${c.id}`?(0,b.jsx)(d.Check,{}):(0,b.jsx)(g.Trash2,{}),N===`row:${c.id}`?a("confirmDelete"):a("delete")]})})]})})]},c.id))})]})]}),(0,b.jsx)(A,{activeOperation:af||Q,entries:ae,locale:C,onDelete:a=>void aj("deleteDerivedDataEntries",[a]),onDeleteMany:a=>void aj("deleteDerivedDataEntries",a),onSelectionChange:(a,b)=>{O(null),M(c=>{let d=new Set(c);return b?d.add(a):d.delete(a),d})},selected:L})]}),(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(p.CardHeader,{className:"max-sm:has-data-[slot=card-action]:grid-cols-1",children:[(0,b.jsx)(p.CardTitle,{children:a("history")}),(0,b.jsx)(p.CardDescription,{children:a("historyDescription")}),S.length>0&&(0,b.jsx)(p.CardAction,{className:"max-sm:col-start-1 max-sm:row-start-3 max-sm:row-span-1 max-sm:mt-3 max-sm:justify-self-stretch",children:(0,b.jsx)(l.ConfirmationDialog,{actionLabel:a("clearHistory"),cancelLabel:k("cancel"),description:a("clearHistoryDescription"),onConfirm:async()=>{await (0,x.controlPlaneRequest)("mutation { clearDerivedDataDeletionHistory }"),Z(a=>a+1)},title:a("clearHistoryTitle"),trigger:(0,b.jsxs)(o.Button,{size:"sm",variant:"outline",children:[(0,b.jsx)(g.Trash2,{})," ",a("clearHistory")]})})})]}),W&&0===S.length?(0,b.jsxs)("p",{className:"flex items-center gap-2 p-6 text-sm text-muted-foreground",children:[(0,b.jsx)(t.Spinner,{})," ",a("loadingHistory")]}):0===S.length?(0,b.jsx)(s.Empty,{className:"py-8",children:(0,b.jsx)(s.EmptyHeader,{children:(0,b.jsx)(s.EmptyDescription,{children:a("noHistory")})})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(u.Table,{children:[(0,b.jsx)(u.TableHeader,{children:(0,b.jsxs)(u.TableRow,{children:[(0,b.jsx)(u.TableHead,{children:a("folder")}),(0,b.jsx)(u.TableHead,{children:a("worktree")}),(0,b.jsx)(u.TableHead,{children:a("agent")}),(0,b.jsx)(u.TableHead,{children:a("deleted")}),(0,b.jsx)(u.TableHead,{children:a("sourceLabel")})]})}),(0,b.jsx)(u.TableBody,{children:am.map(c=>(0,b.jsxs)(j.Fragment,{children:[(0,b.jsx)(u.TableRow,{className:"bg-muted/20 hover:bg-muted/20",children:(0,b.jsx)(u.TableCell,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:5,children:c.label})}),c.items.map(c=>(0,b.jsxs)(u.TableRow,{children:[(0,b.jsx)(u.TableCell,{className:"font-mono text-xs",children:c.folderName}),(0,b.jsx)(u.TableCell,{className:"font-mono text-xs",children:c.worktreePath??"—"}),(0,b.jsx)(u.TableCell,{children:c.agentName}),(0,b.jsx)(u.TableCell,{title:new Date(c.deletedAt).toLocaleString(C),children:function(a,b,c){let d=Math.round((Date.parse(a)-c)/1e3),e=new Intl.RelativeTimeFormat(b,{numeric:"auto"});for(let[a,b]of[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]])if(Math.abs(d)>=b)return e.format(Math.round(d/b),a);return e.format(d,"second")}(c.deletedAt,C,$??Date.parse(c.deletedAt))}),(0,b.jsx)(u.TableCell,{children:(0,b.jsx)(n.Badge,{variant:"secondary",children:a(`source.${c.source}`)})})]},c.id))]},c.label))})]}),U&&(0,b.jsx)("div",{className:"border-t p-3 text-center",children:(0,b.jsxs)(o.Button,{disabled:W,onClick:()=>void ab(U),variant:"outline",children:[W&&(0,b.jsx)(t.Spinner,{})," ",a("loadMore")]})})]})]})]})}],106862)}];
|
|
27
27
|
|
|
28
28
|
//# sourceMappingURL=src_components_build-data_build-data-page_tsx_1t2rrh0._.js.map
|
package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js
CHANGED
|
@@ -32,6 +32,6 @@ module.exports=[345962,a=>{"use strict";var b=a.i(187924),c=a.i(979762),d=a.i(21
|
|
|
32
32
|
buildLogAdded(buildId: $buildId) { ${W} }
|
|
33
33
|
}`,variables:{buildId:a}},{next:a=>{let b=a.data?.buildLogAdded;b&&K(a=>a.some(a=>a.id===b.id)?a:[...a,b])},error:()=>void 0,complete:()=>void 0});return()=>{b(),c()}},[a,ak]);let al=null!==H&&(["QUEUED","PREPARING","RUNNING"].includes(H.status)||H.deployments.some(a=>["QUEUED","RUNNING"].includes(a.status))||H.exports.some(a=>["QUEUED","RUNNING"].includes(a.status)));(0,s.useEffect)(()=>{if(!al)return;let a=window.setInterval(()=>void ak(),2e3);return()=>window.clearInterval(a)},[al,ak]),(0,s.useEffect)(()=>{al&&aj.current&&(aj.current.scrollTop=aj.current.scrollHeight)},[al,J]),(0,s.useEffect)(()=>{if(!ae)return;let a=window.setTimeout(()=>af(!1),2e3);return()=>window.clearTimeout(a)},[ae]);let am=async()=>{R(!0);try{await (0,E.controlPlaneRequest)("mutation CancelBuild($id: ID!) { cancelBuild(id: $id) { id status } }",{id:a}),await ak()}catch(a){P(a instanceof Error?a.message:String(a))}finally{R(!1)}},an=async()=>{R(!0),P(null);try{await (0,E.controlPlaneRequest)("mutation DeleteBuild($ids: [ID!]!) { deleteBuilds(ids: $ids) }",{ids:[a]}),G.replace("/builds")}catch(a){P(a instanceof Error?a.message:String(a)),ac(!1)}finally{R(!1)}},ao=H?.artifacts.some(a=>"RUNNABLE_APP"===a.kind),ap=H?.artifacts.some(a=>"ARCHIVE"===a.kind),aq=H?.reports?.find(a=>"TEST_RESULTS"===a.kind),ar=H?.reports?.find(a=>"CODE_COVERAGE"===a.kind),as=H?.artifacts.find(a=>"RESULT_BUNDLE"===a.kind),at=!!H&&["TEST","TEST_WITHOUT_BUILDING"].includes(H.action),au=H?.snapshot??{},av=au.repository,aw=au.worktree,ax=au.configuration,ay=as?.metadata.coverageAvailable===!0||ax?.advancedSettings?.codeCoverage===!0,az=a=>a?new Date(a).toLocaleString(B):"—",aA=async a=>{try{await (0,D.copyText)(a),af(!0)}catch{P(A("copyFailed"))}},aB=async b=>{Z(b),P(null);try{let c="TEST_RESULTS"===b?"parseBuildTestResults":"generateBuildCoverageReport";await (0,E.controlPlaneRequest)(`mutation GenerateBuildReport($buildId: ID!, $requestId: ID!) {
|
|
34
34
|
${c}(buildId: $buildId, requestId: $requestId) { id status error }
|
|
35
|
-
}`,{buildId:a,requestId:(0,D.createClientId)()}),await ak()}catch(a){P(a instanceof Error?a.message:String(a))}finally{Z(null)}},aC=a=>{let b=aj.current;b&&b.scrollTo({behavior:"smooth",top:"top"===a?0:b.scrollHeight})};return L?(0,b.jsxs)("p",{className:"mx-auto flex w-full max-w-[1500px] items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(z.Spinner,{})," ",A("loading")]}):H?(0,b.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-[1500px] flex-col gap-5",children:[(0,b.jsx)("div",{children:(0,b.jsx)(w.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,b.jsxs)(C.Link,{href:"/builds",children:[(0,b.jsx)(d.ArrowLeft,{})," ",A("backToBuilds")]})})}),O&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsx)(u.AlertDescription,{children:O})}),H.error&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsxs)(u.AlertDescription,{children:[H.errorCode?`${H.errorCode}: `:"",H.error]})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:av?.name??"—"}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold",children:ax?.name??H.id}),(0,b.jsx)(v.Badge,{variant:(0,F.buildStatusVariant)(H.status),children:A(`statuses.${H.status}`)}),(0,b.jsx)(v.Badge,{variant:"outline",children:A(`actions.${H.action}`)}),H.outOfDate&&(0,b.jsx)(v.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:A("outOfDate")})]}),(0,b.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[aw?.branch??aw?.folder??"—"," ·"," ",H.destination.name]}),(0,b.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[A("buildId"),": ",H.id]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(T.RebuildButton,{buildId:H.id,onCompleted:a=>G.push(`/builds/${a.id}`),onError:P}),["QUEUED","PREPARING","RUNNING"].includes(H.status)&&(0,b.jsxs)(w.Button,{disabled:Q,onClick:()=>void am(),variant:"destructive",children:[Q?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(o.Square,{})," ",A("cancelBuild")]}),"SUCCEEDED"===H.status&&ao&&(0,b.jsx)(U.RunBuildControls,{buildId:H.id,destinationType:H.destinationType,onCompleted:ak,onError:P,preferredDestination:H.destination}),"SUCCEEDED"===H.status&&ap&&(0,b.jsxs)(w.Button,{onClick:()=>aa(!0),variant:"outline",children:[(0,b.jsx)(c.Archive,{})," ",A("exportArchive")]}),!al&&at&&as&&aq?.status!=="READY"&&(0,b.jsxs)(w.Button,{disabled:null!==X,onClick:()=>void aB("TEST_RESULTS"),variant:"outline",children:["TEST_RESULTS"===X?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(k,{}),aq?.status==="FAILED"?A("retryParseTestResults"):A("parseTestResultsAction")]}),!al&&as&&ay&&ar?.status!=="READY"&&(0,b.jsxs)(w.Button,{disabled:null!==X,onClick:()=>void aB("CODE_COVERAGE"),variant:"outline",children:["CODE_COVERAGE"===X?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(l,{}),ar?.status==="FAILED"?A("retryCoverageReport"):A("generateCoverageReport")]}),ar?.status==="READY"&&(0,b.jsx)(w.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(C.Link,{href:`/builds/${H.id}/coverage`,children:[(0,b.jsx)(l,{})," ",A("viewCoverageReport")]})}),(0,b.jsxs)(w.Button,{disabled:Q||["QUEUED","PREPARING","RUNNING"].includes(H.status),onClick:()=>ac(!0),variant:"destructive",children:[(0,b.jsx)(p.Trash2,{})," ",A("deleteBuild")]})]})]}),aq&&(0,b.jsx)(ad,{report:aq}),(0,b.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]",children:[(0,b.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,b.jsxs)(x.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(x.CardHeader,{className:ag?"border-b bg-muted/40 py-3":"bg-muted/40 py-3",children:(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)(w.Button,{"aria-expanded":ag,className:"-m-2 h-auto min-w-0 flex-1 justify-start p-2 text-left aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:bg-transparent dark:aria-expanded:hover:bg-muted/50",onClick:()=>ai(a=>!a),type:"button",variant:"ghost",children:(0,b.jsx)("span",{className:"truncate font-medium",children:A("logs")})}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[ag&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.Button,{"aria-label":A("scrollLogsToTop"),onClick:()=>aC("top"),size:"icon-xs",type:"button",variant:"outline",children:(0,b.jsx)(g,{})}),(0,b.jsx)(w.Button,{"aria-label":A("scrollLogsToBottom"),onClick:()=>aC("bottom"),size:"icon-xs",type:"button",variant:"outline",children:(0,b.jsx)(e.ArrowDownToLine,{})})]}),(0,b.jsx)(w.Button,{"aria-expanded":ag,"aria-label":A(ag?"collapseLogs":"expandLogs"),onClick:()=>ai(a=>!a),size:"icon-sm",title:A(ag?"collapseLogs":"expandLogs"),type:"button",variant:"ghost",children:ag?(0,b.jsx)(m.ChevronDown,{className:"size-5"}):(0,b.jsx)(n.ChevronRight,{className:"size-5"})})]})]})}),ag&&(0,b.jsx)(x.CardContent,{className:"py-4",children:(0,b.jsx)("pre",{className:"max-h-[calc(100svh-8rem)] w-full min-w-0 max-w-full overflow-auto rounded-lg bg-neutral-950 p-3 text-xs whitespace-pre-wrap text-neutral-100 [overflow-wrap:anywhere] sm:max-h-[48rem]",ref:aj,children:J.length?J.map(a=>`[${a.phase}] ${a.message}`).join("\n"):A("noLogs")})})]}),(0,b.jsxs)(x.Card,{children:[(0,b.jsxs)(x.CardHeader,{children:[(0,b.jsx)(x.CardTitle,{children:A("commandSummary")}),(0,b.jsx)(x.CardAction,{children:(0,b.jsx)(w.Button,{"aria-label":ae?A("commandCopied"):A("copyCommand"),onClick:()=>void aA(H.commandSummary),size:"icon-sm",type:"button",variant:"ghost",children:ae?(0,b.jsx)(h.Check,{}):(0,b.jsx)(i.Copy,{})})})]}),(0,b.jsx)(x.CardContent,{children:(0,b.jsx)("pre",{className:"w-full min-w-0 max-w-full overflow-x-auto rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap [overflow-wrap:anywhere]",children:H.commandSummary})})]}),(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("scripts")})}),(0,b.jsx)(x.CardContent,{className:"space-y-2",children:H.scriptExecutions.length?H.scriptExecutions.map(a=>(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border p-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("p",{className:"text-sm font-medium",children:[a.nameSnapshot," ·"," ",Y(a.phase)]}),a.error&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:a.error})]}),(0,b.jsx)(v.Badge,{variant:"FAILED"===a.status?"destructive":"outline",children:Y(a.status)})]},a.id)):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:A("noScriptExecutions")})})]})]}),(0,b.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("overview")})}),(0,b.jsx)(x.CardContent,{children:(0,b.jsxs)("dl",{className:"space-y-3 text-sm",children:[(0,b.jsx)(ah,{label:A("buildId"),value:H.id,mono:!0}),(0,b.jsx)(ah,{label:A("scheme"),value:ax?.scheme??"—",mono:!0}),(0,b.jsx)(ah,{label:A("configuration"),value:ax?.buildConfiguration??"—",mono:!0}),(0,b.jsx)(ah,{label:A("head"),value:aw?.headSha??"—",mono:!0}),(0,b.jsx)(ah,{label:A("startedAt"),value:az(H.startedAt)}),(0,b.jsx)(ah,{label:A("finishedAt"),value:az(H.finishedAt)}),(0,b.jsx)(ah,{label:A("artifactDirectory"),value:H.artifactDirectory,mono:!0})]})})]}),(0,b.jsx)(_,{settings:ax?.advancedSettings}),(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("artifacts")})}),(0,b.jsx)(x.CardContent,{className:"space-y-2",children:H.artifacts.length?H.artifacts.map(a=>{let c="IPA"===a.kind,d=a.metadata??{};return(0,b.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(v.Badge,{variant:"outline",children:Y(a.kind)}),(0,b.jsx)(w.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,b.jsxs)("a",{download:!0,href:`/api/builds/${encodeURIComponent(H.id)}/artifacts/${encodeURIComponent(a.id)}`,children:[(0,b.jsx)(j.Download,{})," ",c?A("downloadIpa"):A("downloadArtifact")]})})]}),(0,b.jsx)("p",{className:"mt-1 break-all font-mono text-xs text-muted-foreground",children:a.relativePath}),c&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("dl",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:["string"==typeof d.bundleIdentifier&&(0,b.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,b.jsx)("dt",{children:A("ipaBundleIdentifier")}),(0,b.jsx)("dd",{className:"break-all font-mono",children:d.bundleIdentifier})]}),"string"==typeof d.bundleShortVersion&&(0,b.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,b.jsx)("dt",{children:A("ipaBundleVersion")}),(0,b.jsx)("dd",{className:"font-mono",children:d.bundleShortVersion})]})]}),(0,b.jsx)("div",{className:"mt-2 flex justify-end",children:(0,b.jsx)(S,{artifactId:a.id,buildId:H.id,metadata:d,publicOrigin:f})})]})]},a.id)}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:A("noArtifacts")})})]}),(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("runsAndExports")})}),(0,b.jsxs)(x.CardContent,{className:"space-y-2",children:[H.deployments.map(a=>(0,b.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a.destination.name}),(0,b.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,b.jsx)(v.Badge,{variant:"FAILED"===a.status?"destructive":"outline",children:Y(a.status)}),(0,b.jsx)("time",{className:"text-xs text-muted-foreground",children:az(a.finishedAt??a.startedAt??a.createdAt)})]})]}),a.error&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:a.error})]},a.id)),H.exports.map(a=>(0,b.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:A("archiveExport")}),(0,b.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,b.jsx)(v.Badge,{variant:"FAILED"===a.status?"destructive":"outline",children:Y(a.status)}),(0,b.jsx)("time",{className:"text-xs text-muted-foreground",children:az(a.finishedAt??a.startedAt??a.createdAt)})]})]}),a.outputRelativePath&&(0,b.jsx)("p",{className:"mt-1 font-mono text-xs",children:a.outputRelativePath}),a.error&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:a.error})]},a.id)),!H.deployments.length&&!H.exports.length&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:A("noRunsOrExports")})]})]})]})]}),$&&(0,b.jsx)(M,{buildId:H.id,onOpenChange:aa,onSaved:ak,open:$}),(0,b.jsx)(t.ConfirmationDialog,{actionLabel:A("deleteBuild"),cancelLabel:A("cancel"),description:A("deleteBuildDescription"),onConfirm:an,onOpenChange:ac,open:ab,title:A("deleteBuildTitle")})]}):(0,b.jsxs)(y.Empty,{className:"mx-auto w-full max-w-[1500px] border py-12",children:[(0,b.jsxs)(y.EmptyHeader,{children:[(0,b.jsx)(y.EmptyTitle,{children:A("buildNotFound")}),(0,b.jsx)(y.EmptyDescription,{children:A("buildNotFoundDescription")})]}),(0,b.jsx)(w.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(C.Link,{href:"/builds",children:[(0,b.jsx)(d.ArrowLeft,{})," ",A("backToBuilds")]})})]})}],345962)}];
|
|
35
|
+
}`,{buildId:a,requestId:(0,D.createClientId)()}),await ak()}catch(a){P(a instanceof Error?a.message:String(a))}finally{Z(null)}},aC=a=>{let b=aj.current;b&&b.scrollTo({behavior:"smooth",top:"top"===a?0:b.scrollHeight})};return L?(0,b.jsxs)("p",{className:"mx-auto flex w-full max-w-[1500px] items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(z.Spinner,{})," ",A("loading")]}):H?(0,b.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-[1500px] flex-col gap-5",children:[(0,b.jsx)("div",{children:(0,b.jsx)(w.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,b.jsxs)(C.Link,{href:"/builds",children:[(0,b.jsx)(d.ArrowLeft,{})," ",A("backToBuilds")]})})}),O&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsx)(u.AlertDescription,{children:O})}),H.error&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsxs)(u.AlertDescription,{children:[H.errorCode?`${H.errorCode}: `:"",H.error]})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:av?.name??"—"}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold",children:ax?.name??H.id}),(0,b.jsx)(v.Badge,{variant:(0,F.buildStatusVariant)(H.status),children:A(`statuses.${H.status}`)}),(0,b.jsx)(v.Badge,{variant:"outline",children:A(`actions.${H.action}`)}),H.outOfDate&&(0,b.jsx)(v.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:A("outOfDate")})]}),(0,b.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[aw?.branch??aw?.folder??"—"," ·"," ",H.destination.name]}),(0,b.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[A("buildId"),": ",H.id]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(T.RebuildButton,{buildId:H.id,onCompleted:a=>G.push(`/builds/${a.id}`),onError:P}),["QUEUED","PREPARING","RUNNING"].includes(H.status)&&(0,b.jsxs)(w.Button,{disabled:Q,onClick:()=>void am(),variant:"destructive",children:[Q?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(o.Square,{})," ",A("cancelBuild")]}),"SUCCEEDED"===H.status&&ao&&(0,b.jsx)(U.RunBuildControls,{buildId:H.id,destinationType:H.destinationType,onCompleted:ak,onError:P,preferredDestination:H.destination}),"SUCCEEDED"===H.status&&ap&&(0,b.jsxs)(w.Button,{onClick:()=>aa(!0),variant:"outline",children:[(0,b.jsx)(c.Archive,{})," ",A("exportArchive")]}),!al&&at&&as&&aq?.status!=="READY"&&(0,b.jsxs)(w.Button,{disabled:null!==X,onClick:()=>void aB("TEST_RESULTS"),variant:"outline",children:["TEST_RESULTS"===X?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(k,{}),aq?.status==="FAILED"?A("retryParseTestResults"):A("parseTestResultsAction")]}),!al&&as&&ay&&ar?.status!=="READY"&&(0,b.jsxs)(w.Button,{disabled:null!==X,onClick:()=>void aB("CODE_COVERAGE"),variant:"outline",children:["CODE_COVERAGE"===X?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(l,{}),ar?.status==="FAILED"?A("retryCoverageReport"):A("generateCoverageReport")]}),ar?.status==="READY"&&(0,b.jsx)(w.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(C.Link,{href:`/builds/${H.id}/coverage`,children:[(0,b.jsx)(l,{})," ",A("viewCoverageReport")]})}),(0,b.jsxs)(w.Button,{disabled:Q||["QUEUED","PREPARING","RUNNING"].includes(H.status),onClick:()=>ac(!0),variant:"destructive",children:[(0,b.jsx)(p.Trash2,{})," ",A("deleteBuild")]})]})]}),aq&&(0,b.jsx)(ad,{report:aq}),(0,b.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]",children:[(0,b.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,b.jsxs)(x.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)(w.Button,{"aria-expanded":ag,className:"-m-2 h-auto min-w-0 flex-1 justify-start p-2 text-left aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:bg-transparent dark:aria-expanded:hover:bg-muted/50",onClick:()=>ai(a=>!a),type:"button",variant:"ghost",children:(0,b.jsx)("span",{className:"truncate font-medium",children:A("logs")})}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[ag&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.Button,{"aria-label":A("scrollLogsToTop"),onClick:()=>aC("top"),size:"icon-xs",type:"button",variant:"outline",children:(0,b.jsx)(g,{})}),(0,b.jsx)(w.Button,{"aria-label":A("scrollLogsToBottom"),onClick:()=>aC("bottom"),size:"icon-xs",type:"button",variant:"outline",children:(0,b.jsx)(e.ArrowDownToLine,{})})]}),(0,b.jsx)(w.Button,{"aria-expanded":ag,"aria-label":A(ag?"collapseLogs":"expandLogs"),onClick:()=>ai(a=>!a),size:"icon-sm",title:A(ag?"collapseLogs":"expandLogs"),type:"button",variant:"ghost",children:ag?(0,b.jsx)(m.ChevronDown,{className:"size-5"}):(0,b.jsx)(n.ChevronRight,{className:"size-5"})})]})]})}),ag&&(0,b.jsx)(x.CardContent,{className:"py-4",children:(0,b.jsx)("pre",{className:"max-h-[calc(100svh-8rem)] w-full min-w-0 max-w-full overflow-auto rounded-lg bg-neutral-950 p-3 text-xs whitespace-pre-wrap text-neutral-100 [overflow-wrap:anywhere] sm:max-h-[48rem]",ref:aj,children:J.length?J.map(a=>`[${a.phase}] ${a.message}`).join("\n"):A("noLogs")})})]}),(0,b.jsxs)(x.Card,{children:[(0,b.jsxs)(x.CardHeader,{children:[(0,b.jsx)(x.CardTitle,{children:A("commandSummary")}),(0,b.jsx)(x.CardAction,{children:(0,b.jsx)(w.Button,{"aria-label":ae?A("commandCopied"):A("copyCommand"),onClick:()=>void aA(H.commandSummary),size:"icon-sm",type:"button",variant:"ghost",children:ae?(0,b.jsx)(h.Check,{}):(0,b.jsx)(i.Copy,{})})})]}),(0,b.jsx)(x.CardContent,{children:(0,b.jsx)("pre",{className:"w-full min-w-0 max-w-full overflow-x-auto rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap [overflow-wrap:anywhere]",children:H.commandSummary})})]}),(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("scripts")})}),(0,b.jsx)(x.CardContent,{className:"space-y-2",children:H.scriptExecutions.length?H.scriptExecutions.map(a=>(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border p-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("p",{className:"text-sm font-medium",children:[a.nameSnapshot," ·"," ",Y(a.phase)]}),a.error&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:a.error})]}),(0,b.jsx)(v.Badge,{variant:"FAILED"===a.status?"destructive":"outline",children:Y(a.status)})]},a.id)):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:A("noScriptExecutions")})})]})]}),(0,b.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("overview")})}),(0,b.jsx)(x.CardContent,{children:(0,b.jsxs)("dl",{className:"space-y-3 text-sm",children:[(0,b.jsx)(ah,{label:A("buildId"),value:H.id,mono:!0}),(0,b.jsx)(ah,{label:A("scheme"),value:ax?.scheme??"—",mono:!0}),(0,b.jsx)(ah,{label:A("configuration"),value:ax?.buildConfiguration??"—",mono:!0}),(0,b.jsx)(ah,{label:A("head"),value:aw?.headSha??"—",mono:!0}),(0,b.jsx)(ah,{label:A("startedAt"),value:az(H.startedAt)}),(0,b.jsx)(ah,{label:A("finishedAt"),value:az(H.finishedAt)}),(0,b.jsx)(ah,{label:A("artifactDirectory"),value:H.artifactDirectory,mono:!0})]})})]}),(0,b.jsx)(_,{settings:ax?.advancedSettings}),(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("artifacts")})}),(0,b.jsx)(x.CardContent,{className:"space-y-2",children:H.artifacts.length?H.artifacts.map(a=>{let c="IPA"===a.kind,d=a.metadata??{};return(0,b.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(v.Badge,{variant:"outline",children:Y(a.kind)}),(0,b.jsx)(w.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,b.jsxs)("a",{download:!0,href:`/api/builds/${encodeURIComponent(H.id)}/artifacts/${encodeURIComponent(a.id)}`,children:[(0,b.jsx)(j.Download,{})," ",c?A("downloadIpa"):A("downloadArtifact")]})})]}),(0,b.jsx)("p",{className:"mt-1 break-all font-mono text-xs text-muted-foreground",children:a.relativePath}),c&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("dl",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:["string"==typeof d.bundleIdentifier&&(0,b.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,b.jsx)("dt",{children:A("ipaBundleIdentifier")}),(0,b.jsx)("dd",{className:"break-all font-mono",children:d.bundleIdentifier})]}),"string"==typeof d.bundleShortVersion&&(0,b.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,b.jsx)("dt",{children:A("ipaBundleVersion")}),(0,b.jsx)("dd",{className:"font-mono",children:d.bundleShortVersion})]})]}),(0,b.jsx)("div",{className:"mt-2 flex justify-end",children:(0,b.jsx)(S,{artifactId:a.id,buildId:H.id,metadata:d,publicOrigin:f})})]})]},a.id)}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:A("noArtifacts")})})]}),(0,b.jsxs)(x.Card,{children:[(0,b.jsx)(x.CardHeader,{children:(0,b.jsx)(x.CardTitle,{children:A("runsAndExports")})}),(0,b.jsxs)(x.CardContent,{className:"space-y-2",children:[H.deployments.map(a=>(0,b.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a.destination.name}),(0,b.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,b.jsx)(v.Badge,{variant:"FAILED"===a.status?"destructive":"outline",children:Y(a.status)}),(0,b.jsx)("time",{className:"text-xs text-muted-foreground",children:az(a.finishedAt??a.startedAt??a.createdAt)})]})]}),a.error&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:a.error})]},a.id)),H.exports.map(a=>(0,b.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:A("archiveExport")}),(0,b.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,b.jsx)(v.Badge,{variant:"FAILED"===a.status?"destructive":"outline",children:Y(a.status)}),(0,b.jsx)("time",{className:"text-xs text-muted-foreground",children:az(a.finishedAt??a.startedAt??a.createdAt)})]})]}),a.outputRelativePath&&(0,b.jsx)("p",{className:"mt-1 font-mono text-xs",children:a.outputRelativePath}),a.error&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:a.error})]},a.id)),!H.deployments.length&&!H.exports.length&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:A("noRunsOrExports")})]})]})]})]}),$&&(0,b.jsx)(M,{buildId:H.id,onOpenChange:aa,onSaved:ak,open:$}),(0,b.jsx)(t.ConfirmationDialog,{actionLabel:A("deleteBuild"),cancelLabel:A("cancel"),description:A("deleteBuildDescription"),onConfirm:an,onOpenChange:ac,open:ab,title:A("deleteBuildTitle")})]}):(0,b.jsxs)(y.Empty,{className:"mx-auto w-full max-w-[1500px] border py-12",children:[(0,b.jsxs)(y.EmptyHeader,{children:[(0,b.jsx)(y.EmptyTitle,{children:A("buildNotFound")}),(0,b.jsx)(y.EmptyDescription,{children:A("buildNotFoundDescription")})]}),(0,b.jsx)(w.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(C.Link,{href:"/builds",children:[(0,b.jsx)(d.ArrowLeft,{})," ",A("backToBuilds")]})})]})}],345962)}];
|
|
36
36
|
|
|
37
37
|
//# sourceMappingURL=src_components_builds_build-detail-page_tsx_0q1lvps._.js.map
|
|
@@ -6,6 +6,6 @@ module.exports=[208309,a=>{"use strict";var b=a.i(187924),c=a.i(347929),d=a.i(21
|
|
|
6
6
|
artifact { id kind relativePath sizeBytes checksum metadata createdAt }
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
}`,{id:a}),c=b.build?.reports.find(a=>"CODE_COVERAGE"===a.kind);z(c??null);let d=b.build?.snapshot.configuration,e=b.build?.snapshot.worktree;E(d?.name??a),G(e?.folder??null),K(null)}catch(a){K(a instanceof Error?a.message:String(a))}finally{I(!1)}},[a]);(0,l.useEffect)(()=>{let a=window.setTimeout(()=>void R(),0);return()=>window.clearTimeout(a)},[R]);let S=(0,l.useMemo)(()=>Array.isArray(f?.data.files)?f.data.files:[],[f]),T=(0,l.useMemo)(()=>{let a=S.filter(a=>`${a.target} ${a.name} ${x(a.path,F)}`.toLocaleLowerCase().includes(L.trim().toLocaleLowerCase())),b=(a,b)=>a.localeCompare(b,e,{numeric:!0,sensitivity:"base"});return a.toSorted((a,c)=>{let d=0;return 0!==(d="filename"===P.key?b(a.name,c.name):"target"===P.key?b(a.target,c.target):"lineCoverage"===P.key?a.lineCoverage-c.lineCoverage:w(a)-w(c))?"asc"===P.direction?d:-d:b(a.name,c.name)||b(a.target,c.target)||b(a.path,c.path)})},[e,S,L,P,F]),U=Array.isArray(f?.data.changedFiles)?f.data.changedFiles:[],V=a=>"number"==typeof a?new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1}).format(a):"—",W=a=>{Q(b=>b.key===a?{key:a,direction:"asc"===b.direction?"desc":"asc"}:{key:a,direction:"lineCoverage"===a||"uncoveredLines"===a?"desc":"asc"})};return H?(0,b.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(s.Spinner,{})," ",c("loadingCoverageReport")]}):f?(0,b.jsxs)("section",{className:"mx-auto flex w-full max-w-7xl flex-col gap-5",children:[(0,b.jsx)("div",{children:(0,b.jsx)(o.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,b.jsxs)(u.Link,{href:`/builds/${a}`,children:[(0,b.jsx)(d.ArrowLeft,{})," ",c("backToBuild")]})})}),J&&(0,b.jsx)(m.Alert,{variant:"destructive",children:(0,b.jsx)(m.AlertDescription,{children:J})}),f.error&&(0,b.jsx)(m.Alert,{variant:"destructive",children:(0,b.jsx)(m.AlertDescription,{children:f.error})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:c("coverageReport")}),(0,b.jsx)("h1",{className:"text-2xl font-semibold",children:D})]}),(0,b.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,b.jsx)(B,{label:c("overallCoverage"),percentage:f.summary.lineCoverage,value:V(f.summary.lineCoverage)}),(0,b.jsx)(B,{label:c("coveredLines"),value:String(f.summary.coveredLines??0)}),(0,b.jsx)(B,{label:c("executableLines"),value:String(f.summary.executableLines??0)}),(0,b.jsx)(B,{label:c("changedCoverage"),percentage:f.summary.changedLineCoverage,value:V(f.summary.changedLineCoverage)})]}),U.length>0&&(0,b.jsxs)(p.Card,{children:[(0,b.jsx)(p.CardHeader,{children:(0,b.jsx)(p.CardTitle,{children:c("changedFilesCoverage")})}),(0,b.jsx)(p.CardContent,{children:(0,b.jsx)(C,{coverageFiles:S,files:U,percent:V,worktreeFolder:F})})]}),(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(p.CardHeader,{
|
|
9
|
+
}`,{id:a}),c=b.build?.reports.find(a=>"CODE_COVERAGE"===a.kind);z(c??null);let d=b.build?.snapshot.configuration,e=b.build?.snapshot.worktree;E(d?.name??a),G(e?.folder??null),K(null)}catch(a){K(a instanceof Error?a.message:String(a))}finally{I(!1)}},[a]);(0,l.useEffect)(()=>{let a=window.setTimeout(()=>void R(),0);return()=>window.clearTimeout(a)},[R]);let S=(0,l.useMemo)(()=>Array.isArray(f?.data.files)?f.data.files:[],[f]),T=(0,l.useMemo)(()=>{let a=S.filter(a=>`${a.target} ${a.name} ${x(a.path,F)}`.toLocaleLowerCase().includes(L.trim().toLocaleLowerCase())),b=(a,b)=>a.localeCompare(b,e,{numeric:!0,sensitivity:"base"});return a.toSorted((a,c)=>{let d=0;return 0!==(d="filename"===P.key?b(a.name,c.name):"target"===P.key?b(a.target,c.target):"lineCoverage"===P.key?a.lineCoverage-c.lineCoverage:w(a)-w(c))?"asc"===P.direction?d:-d:b(a.name,c.name)||b(a.target,c.target)||b(a.path,c.path)})},[e,S,L,P,F]),U=Array.isArray(f?.data.changedFiles)?f.data.changedFiles:[],V=a=>"number"==typeof a?new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1}).format(a):"—",W=a=>{Q(b=>b.key===a?{key:a,direction:"asc"===b.direction?"desc":"asc"}:{key:a,direction:"lineCoverage"===a||"uncoveredLines"===a?"desc":"asc"})};return H?(0,b.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(s.Spinner,{})," ",c("loadingCoverageReport")]}):f?(0,b.jsxs)("section",{className:"mx-auto flex w-full max-w-7xl flex-col gap-5",children:[(0,b.jsx)("div",{children:(0,b.jsx)(o.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,b.jsxs)(u.Link,{href:`/builds/${a}`,children:[(0,b.jsx)(d.ArrowLeft,{})," ",c("backToBuild")]})})}),J&&(0,b.jsx)(m.Alert,{variant:"destructive",children:(0,b.jsx)(m.AlertDescription,{children:J})}),f.error&&(0,b.jsx)(m.Alert,{variant:"destructive",children:(0,b.jsx)(m.AlertDescription,{children:f.error})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:c("coverageReport")}),(0,b.jsx)("h1",{className:"text-2xl font-semibold",children:D})]}),(0,b.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,b.jsx)(B,{label:c("overallCoverage"),percentage:f.summary.lineCoverage,value:V(f.summary.lineCoverage)}),(0,b.jsx)(B,{label:c("coveredLines"),value:String(f.summary.coveredLines??0)}),(0,b.jsx)(B,{label:c("executableLines"),value:String(f.summary.executableLines??0)}),(0,b.jsx)(B,{label:c("changedCoverage"),percentage:f.summary.changedLineCoverage,value:V(f.summary.changedLineCoverage)})]}),U.length>0&&(0,b.jsxs)(p.Card,{children:[(0,b.jsx)(p.CardHeader,{children:(0,b.jsx)(p.CardTitle,{children:c("changedFilesCoverage")})}),(0,b.jsx)(p.CardContent,{children:(0,b.jsx)(C,{coverageFiles:S,files:U,percent:V,worktreeFolder:F})})]}),(0,b.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(p.CardHeader,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)(o.Button,{"aria-expanded":N,className:"-m-2 h-auto min-w-0 flex-1 justify-start p-2 text-left aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:bg-transparent dark:aria-expanded:hover:bg-muted/50",onClick:()=>O(a=>!a),type:"button",variant:"ghost",children:(0,b.jsx)("span",{className:"truncate font-medium",children:c("allCoverageFiles")})}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,b.jsx)(n.Badge,{children:S.length}),(0,b.jsx)(o.Button,{"aria-expanded":N,"aria-label":c(N?"collapseCoverageFiles":"expandCoverageFiles"),onClick:()=>O(a=>!a),size:"icon-sm",title:c(N?"collapseCoverageFiles":"expandCoverageFiles"),type:"button",variant:"ghost",children:N?(0,b.jsx)(g.ChevronDown,{className:"size-5"}):(0,b.jsx)(h.ChevronRight,{className:"size-5"})})]})]})}),N&&(0,b.jsxs)(p.CardContent,{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{className:"relative max-w-xl",children:[(0,b.jsx)(i.Search,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),(0,b.jsx)(r.Input,{"aria-label":c("searchCoverageFiles"),className:"pl-9",onChange:a=>M(a.target.value),placeholder:c("searchCoverageFiles"),value:L})]}),(0,b.jsx)("div",{className:"overflow-auto rounded-md border",children:(0,b.jsxs)(t.Table,{"aria-label":c("allCoverageFiles"),className:"min-w-[60rem] text-xs",children:[(0,b.jsx)(t.TableHeader,{children:(0,b.jsxs)(t.TableRow,{children:[(0,b.jsx)(y,{activeSort:P,ariaLabel:c("sortCoverageFiles",{column:c("coverageTarget")}),label:c("coverageTarget"),onSort:W,sortKey:"target"}),(0,b.jsx)(y,{activeSort:P,ariaLabel:c("sortCoverageFiles",{column:c("coverageFile")}),label:c("coverageFile"),onSort:W,sortKey:"filename"}),(0,b.jsx)(t.TableHead,{className:"h-8 px-2 text-right",children:c("coveredLines")}),(0,b.jsx)(y,{activeSort:P,align:"right",ariaLabel:c("sortCoverageFiles",{column:c("uncoveredLines")}),label:c("uncoveredLines"),onSort:W,sortKey:"uncoveredLines"}),(0,b.jsx)(y,{activeSort:P,align:"right",ariaLabel:c("sortCoverageFiles",{column:c("coverage")}),label:c("coverage"),onSort:W,sortKey:"lineCoverage"})]})}),(0,b.jsx)(t.TableBody,{children:T.map((a,c)=>(0,b.jsxs)(t.TableRow,{children:[(0,b.jsx)(t.TableCell,{className:"px-2 py-1.5",children:(0,b.jsx)(n.Badge,{variant:"outline",children:a.target})}),(0,b.jsx)(t.TableCell,{className:"max-w-xl px-2 py-1.5",children:(0,b.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2",children:[(0,b.jsx)("span",{className:"shrink-0 font-medium",children:a.name}),(0,b.jsx)("span",{className:"min-w-0 truncate font-mono text-muted-foreground",title:a.path,children:x(a.path,F)})]})}),(0,b.jsxs)(t.TableCell,{className:"px-2 py-1.5 text-right tabular-nums",children:[a.coveredLines," / ",a.executableLines]}),(0,b.jsx)(t.TableCell,{className:"px-2 py-1.5 text-right tabular-nums",children:w(a)}),(0,b.jsx)(t.TableCell,{className:"px-2 py-1.5 text-right font-medium",children:(0,b.jsx)(A,{percent:V,value:a.lineCoverage})})]},`${a.target}:${a.path}:${c}`))})]})})]})]})]}):(0,b.jsxs)(q.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,b.jsxs)(q.EmptyHeader,{children:[(0,b.jsx)(q.EmptyTitle,{children:c("coverageReportNotFound")}),(0,b.jsx)(q.EmptyDescription,{children:c("coverageReportNotFoundDescription")})]}),(0,b.jsx)(o.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(u.Link,{href:`/builds/${a}`,children:[(0,b.jsx)(d.ArrowLeft,{})," ",c("backToBuild")]})})]})}],208309)}];
|
|
10
10
|
|
|
11
11
|
//# sourceMappingURL=src_components_builds_coverage-report-page_tsx_1nhwba1._.js.map
|
|
@@ -5,6 +5,6 @@ module.exports=[848267,a=>{"use strict";var b=a.i(187924),c=a.i(235709),d=a.i(21
|
|
|
5
5
|
iosDeviceFirmware(id: $id) { ${F.IOS_DEVICE_FIRMWARE_FIELDS} }
|
|
6
6
|
}`,{id:am}).then(b=>{a||O(b.iosDeviceFirmware)}).catch(b=>{a||S(b instanceof Error?b.message:String(b))}).finally(()=>{a||Q(!1)})},0);return()=>{a=!0,window.clearTimeout(b)}},[am,an]);let ao=a=>a?new Date(a).toLocaleString(H):"—",ap=async b=>{b.preventDefault(),ac(!0);try{await (0,D.controlPlaneRequest)(`mutation RenameIosDevice($id: ID!, $displayName: String!) {
|
|
7
7
|
renameIosDevice(id: $id, displayName: $displayName) { id }
|
|
8
|
-
}`,{id:a,displayName:T}),await al()}catch(a){ae(a instanceof Error?a.message:String(a))}finally{ac(!1)}},aq=async()=>{ac(!0);try{await (0,D.controlPlaneRequest)("mutation RegisterIosDevice($id: ID!) { registerIosDevice(id: $id) { id } }",{id:a}),ag(!1),await al()}catch(a){ae(a instanceof Error?a.message:String(a)),ag(!1),await al()}finally{ac(!1)}},ar=async()=>{ac(!0);try{await (0,D.controlPlaneRequest)("mutation RejectIosDevice($id: ID!) { rejectIosDevice(id: $id) { id } }",{id:a}),ai(!1),await al()}catch(a){ae(a instanceof Error?a.message:String(a))}finally{ac(!1)}},as=async()=>{ac(!0);try{await (0,D.controlPlaneRequest)("mutation DeleteIosDevice($id: ID!) { deleteIosDevice(id: $id) }",{id:a}),I.push("/devices")}catch(a){ae(a instanceof Error?a.message:String(a)),ac(!1)}},at=async()=>{J&&(await (0,C.copyText)(J.udid),Y(!0),window.setTimeout(()=>Y(!1),2e3))},au=async a=>{await (0,C.copyText)(a),$(a),window.setTimeout(()=>$(null),2e3)};if(_)return(0,b.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(z.Spinner,{})," ",i("loading")]});if(!J)return(0,b.jsxs)(y.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,b.jsxs)(y.EmptyHeader,{children:[(0,b.jsx)(y.EmptyTitle,{children:i("notFound")}),ad&&(0,b.jsx)(y.EmptyDescription,{children:ad})]}),(0,b.jsx)(u.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(B.Link,{href:"/devices",children:[(0,b.jsx)(d.ArrowLeft,{})," ",i("back")]})})]});let av=L?.appStoreConnectConfigured&&["PENDING","REGISTRATION_FAILED"].includes(J.status),aw=J.osVersion?N?.firmwares.filter(a=>a.version===J.osVersion||a.buildId.toUpperCase()===J.osVersion?.toUpperCase()):null,ax=aw?.find(a=>a.signed)??aw?.[0]??null,ay=J.osVersion?ax?`${ax.version} (${ax.buildId})`:J.osVersion:i("unavailable");return(0,b.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-6xl flex-col gap-5",children:[(0,b.jsx)("div",{children:(0,b.jsx)(u.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,b.jsxs)(B.Link,{href:"/devices",children:[(0,b.jsx)(d.ArrowLeft,{})," ",i("back")]})})}),ad&&(0,b.jsx)(s.Alert,{variant:"destructive",children:(0,b.jsx)(s.AlertDescription,{children:ad})}),J.registrationError&&(0,b.jsx)(s.Alert,{variant:"destructive",children:(0,b.jsx)(s.AlertDescription,{children:J.registrationError})}),"REGISTERED"===J.status&&(0,b.jsxs)(s.Alert,{children:[(0,b.jsx)(e.Check,{}),(0,b.jsxs)(s.AlertDescription,{children:[i("rebuildWarning")," ",(0,b.jsx)(B.Link,{className:"text-primary hover:underline",href:"/builds",children:i("openBuilds")})]})]}),!L?.appStoreConnectConfigured&&(0,b.jsxs)(s.Alert,{children:[(0,b.jsx)(l.Settings,{}),(0,b.jsxs)(s.AlertDescription,{children:[i("configureAppleFirst")," ",(0,b.jsx)(B.Link,{className:"text-primary hover:underline",href:"/settings",children:i("openSettings")})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:N?.name??J.product??i("unavailable")}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold",children:J.displayName}),(0,b.jsx)(E.IosDeviceStatusBadge,{label:i(`status.${J.status}`),status:J.status})]}),(0,b.jsx)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:J.maskedUdid})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(u.Button,{disabled:!av||ab,onClick:()=>ag(!0),children:[ab&&"REGISTERING"===J.status?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(c.Apple,{})," ","REGISTRATION_FAILED"===J.status?i("retryRegistration"):i("registerWithApple")]}),(0,b.jsxs)(u.Button,{disabled:ab||!["PENDING","REGISTRATION_FAILED"].includes(J.status),onClick:()=>ai(!0),variant:"outline",children:[(0,b.jsx)(n,{})," ",i("reject")]}),(0,b.jsxs)(u.Button,{disabled:ab||"REGISTERING"===J.status,onClick:()=>ak(!0),variant:"destructive",children:[(0,b.jsx)(m.Trash2,{})," ",i("delete")]})]})]}),(0,b.jsxs)(v.Card,{children:[(0,b.jsx)(v.CardHeader,{children:(0,b.jsx)(v.CardTitle,{children:i("generalInformation")})}),(0,b.jsxs)(v.CardContent,{className:"space-y-5",children:[(0,b.jsxs)("form",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:ap,children:[(0,b.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,b.jsx)(x.Label,{htmlFor:"device-display-name",children:i("deviceLabel")}),(0,b.jsx)(w.Input,{id:"device-display-name",maxLength:100,onChange:a=>U(a.target.value),required:!0,value:T})]}),(0,b.jsxs)(u.Button,{disabled:ab||T.trim()===J.displayName,type:"submit",variant:"outline",children:[ab?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(k.Save,{})," ",i("saveName")]})]}),(0,b.jsxs)("dl",{className:"grid gap-4 sm:grid-cols-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("udid")}),(0,b.jsxs)("dd",{className:"mt-1 flex items-center gap-2 font-mono text-sm",children:[(0,b.jsx)("span",{className:"break-all",children:V?J.udid:J.maskedUdid}),(0,b.jsx)(u.Button,{"aria-label":V?i("hideUdid"):i("revealUdid"),onClick:()=>W(a=>!a),size:"icon-sm",variant:"ghost",children:V?(0,b.jsx)(j,{}):(0,b.jsx)(h.Eye,{})}),(0,b.jsx)(u.Button,{"aria-label":i("copyUdid"),onClick:()=>void at(),size:"icon-sm",variant:"ghost",children:X?(0,b.jsx)(e.Check,{}):(0,b.jsx)(f.Copy,{})})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("deviceModel")}),(0,b.jsxs)("dd",{className:"mt-1",children:[N?.name??J.product??i("unavailable"),N&&(0,b.jsx)("span",{className:"ml-2 font-mono text-xs text-muted-foreground",children:N.identifier})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("osVersion")}),(0,b.jsx)("dd",{className:"mt-1",children:ay})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("lastIp")}),(0,b.jsx)("dd",{className:"mt-1 font-mono text-sm",children:J.lastIpAddress??i("unavailable")})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("lastSeen")}),(0,b.jsx)("dd",{className:"mt-1",children:ao(J.lastSeenAt)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("appleDeviceId")}),(0,b.jsx)("dd",{className:"mt-1 font-mono text-sm",children:J.appleDeviceId??i("unavailable")})]})]})]})]}),(0,b.jsxs)(v.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(v.CardHeader,{className:"border-b py-4",children:(0,b.jsx)(v.CardTitle,{children:i("ipHistory")})}),J.ipObservations.length?(0,b.jsxs)(A.Table,{children:[(0,b.jsx)(A.TableHeader,{children:(0,b.jsxs)(A.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(A.TableHead,{children:i("ipAddress")}),(0,b.jsx)(A.TableHead,{children:i("source")}),(0,b.jsx)(A.TableHead,{children:i("forwardedBy")}),(0,b.jsx)(A.TableHead,{children:i("observed")})]})}),(0,b.jsx)(A.TableBody,{children:J.ipObservations.map(a=>(0,b.jsxs)(A.TableRow,{children:[(0,b.jsx)(A.TableCell,{className:"font-mono text-xs",children:a.ipAddress}),(0,b.jsx)(A.TableCell,{children:(0,b.jsx)(t.Badge,{variant:"outline",children:i(`ipSource.${a.source}`)})}),(0,b.jsx)(A.TableCell,{children:i(`ipHeaderSource.${a.headerSource}`)}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:ao(a.observedAt)})]},a.id))})]}):(0,b.jsx)(v.CardContent,{className:"py-6 text-sm text-muted-foreground",children:i("noIpHistory")})]}),(0,b.jsxs)(v.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(v.CardHeader,{className:"border-b py-4",children:(0,b.jsx)(v.CardTitle,{children:i("enrollmentHistory")})}),J.enrollments.length?(0,b.jsxs)(A.Table,{children:[(0,b.jsx)(A.TableHeader,{children:(0,b.jsxs)(A.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(A.TableHead,{children:i("statusLabel")}),(0,b.jsx)(A.TableHead,{children:i("created")}),(0,b.jsx)(A.TableHead,{children:i("completed")}),(0,b.jsx)(A.TableHead,{children:i("failure")})]})}),(0,b.jsx)(A.TableBody,{children:J.enrollments.map(a=>(0,b.jsxs)(A.TableRow,{children:[(0,b.jsx)(A.TableCell,{children:(0,b.jsx)(t.Badge,{variant:"outline",children:i(`enrollmentStatus.${a.status}`)})}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:ao(a.createdAt)}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:ao(a.consumedAt)}),(0,b.jsx)(A.TableCell,{children:a.failureCode??i("unavailable")})]},a.id))})]}):(0,b.jsx)(v.CardContent,{className:"py-6 text-sm text-muted-foreground",children:i("noEnrollmentHistory")})]}),(0,b.jsxs)(v.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(v.CardHeader,{className:"border-b py-4",children:[(0,b.jsx)(v.CardTitle,{children:i("firmwareTitle")}),(0,b.jsx)(v.CardDescription,{children:i("firmwareDescription")})]}),P?(0,b.jsxs)(v.CardContent,{className:"flex items-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,b.jsx)(z.Spinner,{})," ",i("firmwareLoading")]}):R?(0,b.jsx)(v.CardContent,{className:"py-4",children:(0,b.jsx)(s.Alert,{variant:"destructive",children:(0,b.jsx)(s.AlertDescription,{children:i("firmwareLoadFailed",{error:R})})})}):N?.firmwares.length?(0,b.jsxs)(A.Table,{className:"min-w-[52rem]",children:[(0,b.jsx)(A.TableHeader,{children:(0,b.jsxs)(A.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(A.TableHead,{children:i("signingStatus")}),(0,b.jsx)(A.TableHead,{children:i("firmwareVersion")}),(0,b.jsx)(A.TableHead,{children:i("releaseDate")}),(0,b.jsx)(A.TableHead,{children:i("fileSize")}),(0,b.jsx)(A.TableHead,{className:"text-right",children:i("firmwareDownload")})]})}),(0,b.jsx)(A.TableBody,{children:N.firmwares.map(a=>{var c;let d,h,j,k=`${a.version} (${a.buildId})`;return(0,b.jsxs)(A.TableRow,{children:[(0,b.jsx)(A.TableCell,{children:(0,b.jsx)(t.Badge,{variant:a.signed?"success":"destructive",children:i(a.signed?"signed":"unsigned")})}),(0,b.jsx)(A.TableCell,{className:"font-medium",children:k}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:(0,b.jsx)("time",{dateTime:a.releaseDate,children:(d=a.releaseDate,new Intl.DateTimeFormat(H,{dateStyle:"medium"}).format(new Date(d)))})}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground tabular-nums",children:(c=a.fileSize,j=Math.min(Math.floor(Math.log(Math.max(c,1))/Math.log(1024)),(h=["B","KiB","MiB","GiB","TiB"]).length-1),`${new Intl.NumberFormat(H,{maximumFractionDigits:1}).format(c/1024**j)} ${h[j]}`)}),(0,b.jsx)(A.TableCell,{children:(0,b.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,b.jsx)(u.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,b.jsxs)("a",{href:a.url,rel:"noreferrer",target:"_blank",children:[(0,b.jsx)(g.Download,{})," ",i("downloadFirmware")]})}),(0,b.jsx)(u.Button,{"aria-label":i("copyFirmwareUrl",{version:k}),onClick:()=>void au(a.url),size:"icon-sm",title:i("copyFirmwareUrl",{version:k}),variant:"ghost",children:Z===a.url?(0,b.jsx)(e.Check,{}):(0,b.jsx)(f.Copy,{})})]})})]},`${a.buildId}:${a.url}`)})})]}):(0,b.jsx)(v.CardContent,{className:"py-6 text-sm text-muted-foreground",children:i("noFirmware")})]}),(0,b.jsx)(r.ConfirmationDialog,{actionLabel:i("confirmRegister"),cancelLabel:G("cancel"),description:i("registerDescription"),onConfirm:aq,onOpenChange:ag,open:af,title:i("registerTitle")}),(0,b.jsx)(r.ConfirmationDialog,{actionLabel:i("confirmReject"),cancelLabel:G("cancel"),description:i("rejectDescription"),onConfirm:ar,onOpenChange:ai,open:ah,title:i("rejectTitle")}),(0,b.jsx)(r.ConfirmationDialog,{actionLabel:i("confirmDelete"),cancelLabel:G("cancel"),description:i("deleteDescription"),onConfirm:as,onOpenChange:ak,open:aj,title:i("deleteTitle")})]})}],848267)}];
|
|
8
|
+
}`,{id:a,displayName:T}),await al()}catch(a){ae(a instanceof Error?a.message:String(a))}finally{ac(!1)}},aq=async()=>{ac(!0);try{await (0,D.controlPlaneRequest)("mutation RegisterIosDevice($id: ID!) { registerIosDevice(id: $id) { id } }",{id:a}),ag(!1),await al()}catch(a){ae(a instanceof Error?a.message:String(a)),ag(!1),await al()}finally{ac(!1)}},ar=async()=>{ac(!0);try{await (0,D.controlPlaneRequest)("mutation RejectIosDevice($id: ID!) { rejectIosDevice(id: $id) { id } }",{id:a}),ai(!1),await al()}catch(a){ae(a instanceof Error?a.message:String(a))}finally{ac(!1)}},as=async()=>{ac(!0);try{await (0,D.controlPlaneRequest)("mutation DeleteIosDevice($id: ID!) { deleteIosDevice(id: $id) }",{id:a}),I.push("/devices")}catch(a){ae(a instanceof Error?a.message:String(a)),ac(!1)}},at=async()=>{J&&(await (0,C.copyText)(J.udid),Y(!0),window.setTimeout(()=>Y(!1),2e3))},au=async a=>{await (0,C.copyText)(a),$(a),window.setTimeout(()=>$(null),2e3)};if(_)return(0,b.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(z.Spinner,{})," ",i("loading")]});if(!J)return(0,b.jsxs)(y.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,b.jsxs)(y.EmptyHeader,{children:[(0,b.jsx)(y.EmptyTitle,{children:i("notFound")}),ad&&(0,b.jsx)(y.EmptyDescription,{children:ad})]}),(0,b.jsx)(u.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(B.Link,{href:"/devices",children:[(0,b.jsx)(d.ArrowLeft,{})," ",i("back")]})})]});let av=L?.appStoreConnectConfigured&&["PENDING","REGISTRATION_FAILED"].includes(J.status),aw=J.osVersion?N?.firmwares.filter(a=>a.version===J.osVersion||a.buildId.toUpperCase()===J.osVersion?.toUpperCase()):null,ax=aw?.find(a=>a.signed)??aw?.[0]??null,ay=J.osVersion?ax?`${ax.version} (${ax.buildId})`:J.osVersion:i("unavailable");return(0,b.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-6xl flex-col gap-5",children:[(0,b.jsx)("div",{children:(0,b.jsx)(u.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,b.jsxs)(B.Link,{href:"/devices",children:[(0,b.jsx)(d.ArrowLeft,{})," ",i("back")]})})}),ad&&(0,b.jsx)(s.Alert,{variant:"destructive",children:(0,b.jsx)(s.AlertDescription,{children:ad})}),J.registrationError&&(0,b.jsx)(s.Alert,{variant:"destructive",children:(0,b.jsx)(s.AlertDescription,{children:J.registrationError})}),"REGISTERED"===J.status&&(0,b.jsxs)(s.Alert,{children:[(0,b.jsx)(e.Check,{}),(0,b.jsxs)(s.AlertDescription,{children:[i("rebuildWarning")," ",(0,b.jsx)(B.Link,{className:"text-primary hover:underline",href:"/builds",children:i("openBuilds")})]})]}),!L?.appStoreConnectConfigured&&(0,b.jsxs)(s.Alert,{children:[(0,b.jsx)(l.Settings,{}),(0,b.jsxs)(s.AlertDescription,{children:[i("configureAppleFirst")," ",(0,b.jsx)(B.Link,{className:"text-primary hover:underline",href:"/settings",children:i("openSettings")})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:N?.name??J.product??i("unavailable")}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold",children:J.displayName}),(0,b.jsx)(E.IosDeviceStatusBadge,{label:i(`status.${J.status}`),status:J.status})]}),(0,b.jsx)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:J.maskedUdid})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(u.Button,{disabled:!av||ab,onClick:()=>ag(!0),children:[ab&&"REGISTERING"===J.status?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(c.Apple,{})," ","REGISTRATION_FAILED"===J.status?i("retryRegistration"):i("registerWithApple")]}),(0,b.jsxs)(u.Button,{disabled:ab||!["PENDING","REGISTRATION_FAILED"].includes(J.status),onClick:()=>ai(!0),variant:"outline",children:[(0,b.jsx)(n,{})," ",i("reject")]}),(0,b.jsxs)(u.Button,{disabled:ab||"REGISTERING"===J.status,onClick:()=>ak(!0),variant:"destructive",children:[(0,b.jsx)(m.Trash2,{})," ",i("delete")]})]})]}),(0,b.jsxs)(v.Card,{children:[(0,b.jsx)(v.CardHeader,{children:(0,b.jsx)(v.CardTitle,{children:i("generalInformation")})}),(0,b.jsxs)(v.CardContent,{className:"space-y-5",children:[(0,b.jsxs)("form",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:ap,children:[(0,b.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,b.jsx)(x.Label,{htmlFor:"device-display-name",children:i("deviceLabel")}),(0,b.jsx)(w.Input,{id:"device-display-name",maxLength:100,onChange:a=>U(a.target.value),required:!0,value:T})]}),(0,b.jsxs)(u.Button,{disabled:ab||T.trim()===J.displayName,type:"submit",variant:"outline",children:[ab?(0,b.jsx)(z.Spinner,{}):(0,b.jsx)(k.Save,{})," ",i("saveName")]})]}),(0,b.jsxs)("dl",{className:"grid gap-4 sm:grid-cols-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("udid")}),(0,b.jsxs)("dd",{className:"mt-1 flex items-center gap-2 font-mono text-sm",children:[(0,b.jsx)("span",{className:"break-all",children:V?J.udid:J.maskedUdid}),(0,b.jsx)(u.Button,{"aria-label":V?i("hideUdid"):i("revealUdid"),onClick:()=>W(a=>!a),size:"icon-sm",variant:"ghost",children:V?(0,b.jsx)(j,{}):(0,b.jsx)(h.Eye,{})}),(0,b.jsx)(u.Button,{"aria-label":i("copyUdid"),onClick:()=>void at(),size:"icon-sm",variant:"ghost",children:X?(0,b.jsx)(e.Check,{}):(0,b.jsx)(f.Copy,{})})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("deviceModel")}),(0,b.jsxs)("dd",{className:"mt-1",children:[N?.name??J.product??i("unavailable"),N&&(0,b.jsx)("span",{className:"ml-2 font-mono text-xs text-muted-foreground",children:N.identifier})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("osVersion")}),(0,b.jsx)("dd",{className:"mt-1",children:ay})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("lastIp")}),(0,b.jsx)("dd",{className:"mt-1 font-mono text-sm",children:J.lastIpAddress??i("unavailable")})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("lastSeen")}),(0,b.jsx)("dd",{className:"mt-1",children:ao(J.lastSeenAt)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-xs text-muted-foreground",children:i("appleDeviceId")}),(0,b.jsx)("dd",{className:"mt-1 font-mono text-sm",children:J.appleDeviceId??i("unavailable")})]})]})]})]}),(0,b.jsxs)(v.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(v.CardHeader,{children:(0,b.jsx)(v.CardTitle,{children:i("ipHistory")})}),J.ipObservations.length?(0,b.jsxs)(A.Table,{children:[(0,b.jsx)(A.TableHeader,{children:(0,b.jsxs)(A.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(A.TableHead,{children:i("ipAddress")}),(0,b.jsx)(A.TableHead,{children:i("source")}),(0,b.jsx)(A.TableHead,{children:i("forwardedBy")}),(0,b.jsx)(A.TableHead,{children:i("observed")})]})}),(0,b.jsx)(A.TableBody,{children:J.ipObservations.map(a=>(0,b.jsxs)(A.TableRow,{children:[(0,b.jsx)(A.TableCell,{className:"font-mono text-xs",children:a.ipAddress}),(0,b.jsx)(A.TableCell,{children:(0,b.jsx)(t.Badge,{variant:"outline",children:i(`ipSource.${a.source}`)})}),(0,b.jsx)(A.TableCell,{children:i(`ipHeaderSource.${a.headerSource}`)}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:ao(a.observedAt)})]},a.id))})]}):(0,b.jsx)(v.CardContent,{className:"py-6 text-sm text-muted-foreground",children:i("noIpHistory")})]}),(0,b.jsxs)(v.Card,{className:"gap-0 py-0",children:[(0,b.jsx)(v.CardHeader,{children:(0,b.jsx)(v.CardTitle,{children:i("enrollmentHistory")})}),J.enrollments.length?(0,b.jsxs)(A.Table,{children:[(0,b.jsx)(A.TableHeader,{children:(0,b.jsxs)(A.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(A.TableHead,{children:i("statusLabel")}),(0,b.jsx)(A.TableHead,{children:i("created")}),(0,b.jsx)(A.TableHead,{children:i("completed")}),(0,b.jsx)(A.TableHead,{children:i("failure")})]})}),(0,b.jsx)(A.TableBody,{children:J.enrollments.map(a=>(0,b.jsxs)(A.TableRow,{children:[(0,b.jsx)(A.TableCell,{children:(0,b.jsx)(t.Badge,{variant:"outline",children:i(`enrollmentStatus.${a.status}`)})}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:ao(a.createdAt)}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:ao(a.consumedAt)}),(0,b.jsx)(A.TableCell,{children:a.failureCode??i("unavailable")})]},a.id))})]}):(0,b.jsx)(v.CardContent,{className:"py-6 text-sm text-muted-foreground",children:i("noEnrollmentHistory")})]}),(0,b.jsxs)(v.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(v.CardHeader,{children:[(0,b.jsx)(v.CardTitle,{children:i("firmwareTitle")}),(0,b.jsx)(v.CardDescription,{children:i("firmwareDescription")})]}),P?(0,b.jsxs)(v.CardContent,{className:"flex items-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,b.jsx)(z.Spinner,{})," ",i("firmwareLoading")]}):R?(0,b.jsx)(v.CardContent,{className:"py-4",children:(0,b.jsx)(s.Alert,{variant:"destructive",children:(0,b.jsx)(s.AlertDescription,{children:i("firmwareLoadFailed",{error:R})})})}):N?.firmwares.length?(0,b.jsxs)(A.Table,{className:"min-w-[52rem]",children:[(0,b.jsx)(A.TableHeader,{children:(0,b.jsxs)(A.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(A.TableHead,{children:i("signingStatus")}),(0,b.jsx)(A.TableHead,{children:i("firmwareVersion")}),(0,b.jsx)(A.TableHead,{children:i("releaseDate")}),(0,b.jsx)(A.TableHead,{children:i("fileSize")}),(0,b.jsx)(A.TableHead,{className:"text-right",children:i("firmwareDownload")})]})}),(0,b.jsx)(A.TableBody,{children:N.firmwares.map(a=>{var c;let d,h,j,k=`${a.version} (${a.buildId})`;return(0,b.jsxs)(A.TableRow,{children:[(0,b.jsx)(A.TableCell,{children:(0,b.jsx)(t.Badge,{variant:a.signed?"success":"destructive",children:i(a.signed?"signed":"unsigned")})}),(0,b.jsx)(A.TableCell,{className:"font-medium",children:k}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground",children:(0,b.jsx)("time",{dateTime:a.releaseDate,children:(d=a.releaseDate,new Intl.DateTimeFormat(H,{dateStyle:"medium"}).format(new Date(d)))})}),(0,b.jsx)(A.TableCell,{className:"text-muted-foreground tabular-nums",children:(c=a.fileSize,j=Math.min(Math.floor(Math.log(Math.max(c,1))/Math.log(1024)),(h=["B","KiB","MiB","GiB","TiB"]).length-1),`${new Intl.NumberFormat(H,{maximumFractionDigits:1}).format(c/1024**j)} ${h[j]}`)}),(0,b.jsx)(A.TableCell,{children:(0,b.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,b.jsx)(u.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,b.jsxs)("a",{href:a.url,rel:"noreferrer",target:"_blank",children:[(0,b.jsx)(g.Download,{})," ",i("downloadFirmware")]})}),(0,b.jsx)(u.Button,{"aria-label":i("copyFirmwareUrl",{version:k}),onClick:()=>void au(a.url),size:"icon-sm",title:i("copyFirmwareUrl",{version:k}),variant:"ghost",children:Z===a.url?(0,b.jsx)(e.Check,{}):(0,b.jsx)(f.Copy,{})})]})})]},`${a.buildId}:${a.url}`)})})]}):(0,b.jsx)(v.CardContent,{className:"py-6 text-sm text-muted-foreground",children:i("noFirmware")})]}),(0,b.jsx)(r.ConfirmationDialog,{actionLabel:i("confirmRegister"),cancelLabel:G("cancel"),description:i("registerDescription"),onConfirm:aq,onOpenChange:ag,open:af,title:i("registerTitle")}),(0,b.jsx)(r.ConfirmationDialog,{actionLabel:i("confirmReject"),cancelLabel:G("cancel"),description:i("rejectDescription"),onConfirm:ar,onOpenChange:ai,open:ah,title:i("rejectTitle")}),(0,b.jsx)(r.ConfirmationDialog,{actionLabel:i("confirmDelete"),cancelLabel:G("cancel"),description:i("deleteDescription"),onConfirm:as,onOpenChange:ak,open:aj,title:i("deleteTitle")})]})}],848267)}];
|
|
9
9
|
|
|
10
10
|
//# sourceMappingURL=src_components_devices_device-detail-page_tsx_1mut_l4._.js.map
|
package/standalone/.next/server/chunks/ssr/src_components_devices_devices-page_tsx_1y45lv2._.js
CHANGED
|
@@ -2,7 +2,7 @@ module.exports=[652811,a=>{"use strict";var b=a.i(187924),c=a.i(536670),d=a.i(40
|
|
|
2
2
|
id clientRegistrationId tokenMasked topic environment supportedPushTypes
|
|
3
3
|
displayName deviceModel osVersion appVersion appBuild locale pushMagicConfigured
|
|
4
4
|
status lastFailureReason lastRegisteredAt lastSentAt
|
|
5
|
-
`;function G({registrations:a,onChanged:c}={}){let d=(0,g.useTranslations)("apnsDevices"),e=(0,g.useTranslations)("common"),i=(0,f.useLocale)(),[l,m]=(0,h.useState)([]),[p,r]=(0,h.useState)(!0),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(null),[E,H]=(0,h.useState)(""),[J,K]=(0,h.useState)(null),L=(0,h.useCallback)(async()=>{try{let a=await (0,q.controlPlaneRequest)(`query ApnsDevices { apnsRegistrations { ${F} } }`);m(a.apnsRegistrations),K(null)}catch(a){K(a instanceof Error?a.message:String(a))}finally{r(!1)}},[]);(0,h.useEffect)(()=>{if(void 0!==a)return(0,q.controlPlaneSubscriptions)().subscribe({query:"subscription { pushNotificationsChanged }"},{next:()=>void c?.(),error:()=>void 0,complete:()=>void 0});let b=window.setTimeout(()=>void L(),0),d=(0,q.controlPlaneSubscriptions)().subscribe({query:"subscription { pushNotificationsChanged }"},{next:()=>void L(),error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(b),d()}},[a,L,c]);let M=async(a,b)=>{t(!0);try{await (0,q.controlPlaneRequest)(a,b),c?await c():await L()}catch(a){K(a instanceof Error?a.message:String(a))}finally{t(!1)}},N=a??l,O=void 0===a&&p;return(0,b.jsxs)(k.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(k.CardHeader,{className:"
|
|
5
|
+
`;function G({registrations:a,onChanged:c}={}){let d=(0,g.useTranslations)("apnsDevices"),e=(0,g.useTranslations)("common"),i=(0,f.useLocale)(),[l,m]=(0,h.useState)([]),[p,r]=(0,h.useState)(!0),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(null),[E,H]=(0,h.useState)(""),[J,K]=(0,h.useState)(null),L=(0,h.useCallback)(async()=>{try{let a=await (0,q.controlPlaneRequest)(`query ApnsDevices { apnsRegistrations { ${F} } }`);m(a.apnsRegistrations),K(null)}catch(a){K(a instanceof Error?a.message:String(a))}finally{r(!1)}},[]);(0,h.useEffect)(()=>{if(void 0!==a)return(0,q.controlPlaneSubscriptions)().subscribe({query:"subscription { pushNotificationsChanged }"},{next:()=>void c?.(),error:()=>void 0,complete:()=>void 0});let b=window.setTimeout(()=>void L(),0),d=(0,q.controlPlaneSubscriptions)().subscribe({query:"subscription { pushNotificationsChanged }"},{next:()=>void L(),error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(b),d()}},[a,L,c]);let M=async(a,b)=>{t(!0);try{await (0,q.controlPlaneRequest)(a,b),c?await c():await L()}catch(a){K(a instanceof Error?a.message:String(a))}finally{t(!1)}},N=a??l,O=void 0===a&&p;return(0,b.jsxs)(k.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(k.CardHeader,{className:"max-sm:has-data-[slot=card-action]:grid-cols-1",children:[(0,b.jsx)(k.CardTitle,{children:d("title")}),(0,b.jsx)(k.CardDescription,{children:d("description")}),(0,b.jsx)(k.CardAction,{className:"max-sm:col-start-1 max-sm:row-start-3 max-sm:row-span-1 max-sm:mt-3 max-sm:justify-self-stretch",children:(0,b.jsx)(I,{})})]}),J&&(0,b.jsx)("p",{className:"border-b p-4 text-sm text-destructive",children:J}),O?(0,b.jsxs)("p",{className:"flex items-center gap-2 p-6 text-sm text-muted-foreground",children:[(0,b.jsx)(n.Spinner,{})," ",d("loading")]}):0===N.length?(0,b.jsx)("p",{className:"p-8 text-center text-sm text-muted-foreground",children:d("empty")}):(0,b.jsxs)(o.Table,{children:[(0,b.jsx)(o.TableHeader,{children:(0,b.jsxs)(o.TableRow,{children:[(0,b.jsx)(o.TableHead,{children:d("device")}),(0,b.jsx)(o.TableHead,{children:d("topic")}),(0,b.jsx)(o.TableHead,{children:d("environment")}),(0,b.jsx)(o.TableHead,{children:d("pushTypes")}),(0,b.jsx)(o.TableHead,{children:d("token")}),(0,b.jsx)(o.TableHead,{children:d("status")}),(0,b.jsx)(o.TableHead,{children:d("lastRegistration")}),(0,b.jsx)(o.TableHead,{children:d("lastSend")}),(0,b.jsx)(o.TableHead,{})]})}),(0,b.jsx)(o.TableBody,{children:N.map(a=>(0,b.jsxs)(o.TableRow,{children:[(0,b.jsxs)(o.TableCell,{children:[(0,b.jsx)("p",{className:"font-medium",children:a.displayName}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:[a.deviceModel,a.osVersion&&`iOS ${a.osVersion}`,a.appVersion&&`${a.appVersion} (${a.appBuild??"—"})`].filter(Boolean).join(" · ")}),(0,b.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:a.clientRegistrationId})]}),(0,b.jsx)(o.TableCell,{className:"font-mono text-xs",children:a.topic}),(0,b.jsx)(o.TableCell,{children:(0,b.jsx)(z.Badge,{variant:"outline",children:a.environment})}),(0,b.jsx)(o.TableCell,{children:(0,b.jsx)("div",{className:"flex max-w-72 flex-wrap gap-1",children:a.supportedPushTypes.map(a=>(0,b.jsx)(z.Badge,{variant:"secondary",children:a},a))})}),(0,b.jsx)(o.TableCell,{className:"font-mono text-xs",children:a.tokenMasked}),(0,b.jsxs)(o.TableCell,{children:[(0,b.jsx)(z.Badge,{variant:"ACTIVE"===a.status?"default":"destructive",children:a.status}),a.lastFailureReason&&(0,b.jsx)("p",{className:"mt-1 text-xs text-destructive",children:a.lastFailureReason})]}),(0,b.jsx)(o.TableCell,{children:new Date(a.lastRegisteredAt).toLocaleString(i)}),(0,b.jsx)(o.TableCell,{children:a.lastSentAt?new Date(a.lastSentAt).toLocaleString(i):"—"}),(0,b.jsx)(o.TableCell,{children:(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{asChild:!0,children:(0,b.jsx)(j.Button,{disabled:s,size:"icon-sm",variant:"ghost",children:(0,b.jsx)(w.MoreHorizontal,{})})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",children:[(0,b.jsx)(B.DropdownMenuItem,{onSelect:()=>{v(a),H(a.displayName)},children:d("rename")}),(0,b.jsx)(B.DropdownMenuItem,{onSelect:()=>void M("mutation Active($id: ID!, $active: Boolean!) { setApnsRegistrationActive(id: $id, active: $active) { id } }",{id:a.id,active:"ACTIVE"!==a.status}),children:"ACTIVE"===a.status?d("deactivate"):d("activate")}),(0,b.jsx)(B.DropdownMenuItem,{variant:"destructive",onSelect:a=>a.preventDefault(),children:(0,b.jsx)(y.ConfirmationDialog,{actionLabel:d("delete"),cancelLabel:e("cancel"),description:d("deleteDescription"),onConfirm:()=>M("mutation Delete($id: ID!) { deleteApnsRegistration(id: $id) }",{id:a.id}),title:d("deleteTitle"),trigger:(0,b.jsxs)("span",{className:"flex w-full items-center gap-2",children:[(0,b.jsx)(x.Trash2,{})," ",d("delete")]})})})]})]})})]},a.id))})]}),(0,b.jsx)(A.Dialog,{onOpenChange:a=>!a&&v(null),open:!!u,children:(0,b.jsxs)(A.DialogContent,{children:[(0,b.jsxs)(A.DialogHeader,{children:[(0,b.jsx)(A.DialogTitle,{children:d("rename")}),(0,b.jsx)(A.DialogDescription,{children:d("renameDescription")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(D.Label,{htmlFor:"apns-rename",children:d("displayName")}),(0,b.jsx)(C.Input,{id:"apns-rename",onChange:a=>H(a.target.value),value:E})]}),(0,b.jsxs)(A.DialogFooter,{children:[(0,b.jsx)(j.Button,{onClick:()=>v(null),variant:"outline",children:e("cancel")}),(0,b.jsx)(j.Button,{disabled:s||!E.trim(),onClick:()=>{u&&M("mutation Rename($id: ID!, $name: String!) { renameApnsRegistration(id: $id, displayName: $name) { id } }",{id:u.id,name:E}).then(()=>v(null))},children:d("save")})]})]})})]})}let H={clientRegistrationId:"install-2FC735A5-734D-4A41-A1DD-BC8444796894",token:"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",tokenEncoding:"HEX",topic:"com.example.MyApp",environment:"SANDBOX",supportedPushTypes:["alert","background"],displayName:"Chandler’s iPhone",deviceModel:"iPhone18,1",osVersion:"26.0",appVersion:"4.2",appBuild:"310",locale:"en_US"};function I(){let a=(0,g.useTranslations)("apnsDevices"),[c,d]=(0,h.useState)(null),e=`POST /api/ios/apns-devices
|
|
6
6
|
Content-Type: application/json
|
|
7
7
|
|
|
8
8
|
\`\`\`json
|
|
@@ -16,6 +16,6 @@ module.exports=[117297,a=>{"use strict";var b=a.i(187924),c=a.i(219107),d=a.i(58
|
|
|
16
16
|
githubPullRequest(owner: $owner, name: $name, number: $number) {
|
|
17
17
|
id number title url repositoryGithubId repositoryNameWithOwner repositoryUrl labels jiraKey pipelineStatus pipelines { id name status url checkSuiteId canRetry retryUnavailableReason jobs { id name status url canRetry retryUnavailableReason steps { number name status } } } reviewDecision unresolvedReviewThreadCount headRefName createdAt body bodyHtml author { login avatarUrl url } assignees { login avatarUrl url } reviewThreads { id isResolved isOutdated subjectType path line startLine originalLine originalStartLine viewerCanReply viewerCanResolve viewerCanUnresolve resolvedBy { login avatarUrl url } pullRequest { id number title url repositoryNameWithOwner } rootComment { id body bodyText bodyHtml url author { login avatarUrl url } createdAt updatedAt } replies { id body bodyText bodyHtml url author { login avatarUrl url } createdAt updatedAt } } baseRefName state isDraft mergeable additions deletions changedFiles commitCount updatedAt mergedAt worktreeId
|
|
18
18
|
}
|
|
19
|
-
}`,{owner:a,name:d,number:e});N(b.githubPullRequest),R(null)}catch(a){R(a instanceof Error?a.message:String(a))}finally{P(!1)}},[e,a,d]);(0,o.useEffect)(()=>{let a=window.setTimeout(()=>void S(),0);return()=>window.clearTimeout(a)},[S]);let T=a=>{N(b=>b?{...b,pipelineStatus:"PENDING",pipelines:b.pipelines.map(b=>b.id===a.id?{...a,jobs:a.jobs??b.jobs}:b)}:b)},U=(a,b)=>{N(c=>c?{...c,reviewThreads:c.reviewThreads.map(c=>c.id===a?{...c,replies:[...c.replies,b]}:c)}:c)},V=a=>{N(b=>{if(!b)return b;let c=b.reviewThreads.find(b=>b.id===a.id),d=c&&c.isResolved!==a.isResolved?a.isResolved?-1:1:0;return{...b,unresolvedReviewThreadCount:Math.max(0,b.unresolvedReviewThreadCount+d),reviewThreads:b.reviewThreads.map(b=>b.id===a.id?{...b,...a}:b)}})};if(O&&!M)return(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(A.Spinner,{}),v("loading")]});if(!M)return(0,b.jsxs)("section",{className:"mx-auto w-full max-w-5xl space-y-5",children:[Q&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsx)(u.AlertDescription,{children:Q})}),(0,b.jsxs)(z.Empty,{className:"border py-12",children:[(0,b.jsxs)(z.EmptyHeader,{children:[(0,b.jsx)(z.EmptyMedia,{variant:"icon",children:(0,b.jsx)(h.GitPullRequest,{})}),(0,b.jsx)(z.EmptyTitle,{children:v("notFound")}),(0,b.jsx)(z.EmptyDescription,{children:v("notFoundDescription")})]}),(0,b.jsx)(x.Button,{asChild:!0,className:"mt-4",variant:"outline",children:(0,b.jsx)(C.Link,{href:"/pull-requests",children:v("back")})})]})]});let W=new Intl.DateTimeFormat(K,{dateStyle:"medium",timeStyle:"short"}),X=a=>a?W.format(new Date(a)):"—";return(0,b.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-6xl flex-col gap-5",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)(x.Button,{asChild:!0,className:"mb-3 -ml-2",variant:"ghost",children:(0,b.jsxs)(C.Link,{href:"/pull-requests",children:[(0,b.jsx)(c.ArrowLeft,{}),v("back")]})}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground",children:[M.repositoryNameWithOwner," #",M.number]}),(0,b.jsx)("h1",{className:"mt-1 text-2xl font-semibold break-words tracking-tight [overflow-wrap:anywhere]",children:M.title}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,b.jsx)(w.Badge,{children:H(`pullRequestStates.${M.state}`)}),M.isDraft&&(0,b.jsx)(w.Badge,{children:v("draft")}),(0,b.jsx)(w.Badge,{className:"APPROVED"===(k=M.reviewDecision)?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"CHANGES_REQUESTED"===k?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"REVIEW_REQUIRED"===k?"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300":"border-slate-500/30 bg-slate-500/10 text-slate-700 dark:text-slate-300",children:H(`reviewStates.${M.reviewDecision}`)}),M.jiraKey&&(0,b.jsx)(w.Badge,{asChild:!0,className:"cursor-pointer hover:bg-muted/80",children:(0,b.jsx)("button",{onClick:()=>F(M.jiraKey),type:"button",children:M.jiraKey})})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[M.worktreeId&&(0,b.jsx)(x.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(C.Link,{href:(0,E.worktreeDetailHref)(M.worktreeId),children:[(0,b.jsx)(i.GitBranch,{}),v("viewWorktree")]})}),"OPEN"===M.state&&(0,b.jsx)(r.MergePullRequestButton,{onMerged:S,pullRequest:M,size:"default"}),(0,b.jsxs)(x.Button,{disabled:O,onClick:()=>void S(),variant:"outline",children:[(0,b.jsx)(j.RefreshCw,{className:O?"animate-spin":void 0}),v("refresh")]}),(0,b.jsx)(x.Button,{asChild:!0,children:(0,b.jsxs)("a",{href:M.url,rel:"noreferrer",target:"_blank",children:[v("openInGitHub"),(0,b.jsx)(f.ExternalLink,{})]})})]})]}),Q&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsx)(u.AlertDescription,{children:Q})}),(0,b.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-2",children:[(0,b.jsxs)("div",{className:"contents",children:[(0,b.jsx)(y.Card,{className:"min-w-0 order-2 lg:col-span-2",children:(0,b.jsx)(y.CardContent,{children:(0,b.jsx)(q.GitHubMarkdownBlock,{body:M.body,bodyHtml:M.bodyHtml,emptyLabel:v("noDescription"),header:(0,b.jsx)(y.CardTitle,{children:v("description")}),headerClassName:"border-b pb-4"})})}),(0,b.jsxs)("div",{className:"min-w-0 order-3 space-y-4 lg:col-span-2",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:v("comments")}),(0,b.jsx)(w.Badge,{variant:"secondary",children:M.reviewThreads.length})]}),0===M.reviewThreads.length?(0,b.jsx)(z.Empty,{className:"border py-8",children:(0,b.jsxs)(z.EmptyHeader,{children:[(0,b.jsx)(z.EmptyTitle,{children:v("noComments")}),(0,b.jsx)(z.EmptyDescription,{children:v("noCommentsDescription")})]})}):(0,b.jsx)("div",{className:"space-y-5",children:M.reviewThreads.map(a=>(0,b.jsx)(s.ReviewThreadCard,{locale:K,onReplyAdded:U,onStateChanged:V,thread:a},a.id))})]}),(0,b.jsxs)(y.Card,{className:"min-w-0 order-4 gap-0 py-0 lg:col-span-2",children:[(0,b.jsxs)(y.CardHeader,{className:"flex grid-cols-none flex-row items-center justify-between gap-3
|
|
19
|
+
}`,{owner:a,name:d,number:e});N(b.githubPullRequest),R(null)}catch(a){R(a instanceof Error?a.message:String(a))}finally{P(!1)}},[e,a,d]);(0,o.useEffect)(()=>{let a=window.setTimeout(()=>void S(),0);return()=>window.clearTimeout(a)},[S]);let T=a=>{N(b=>b?{...b,pipelineStatus:"PENDING",pipelines:b.pipelines.map(b=>b.id===a.id?{...a,jobs:a.jobs??b.jobs}:b)}:b)},U=(a,b)=>{N(c=>c?{...c,reviewThreads:c.reviewThreads.map(c=>c.id===a?{...c,replies:[...c.replies,b]}:c)}:c)},V=a=>{N(b=>{if(!b)return b;let c=b.reviewThreads.find(b=>b.id===a.id),d=c&&c.isResolved!==a.isResolved?a.isResolved?-1:1:0;return{...b,unresolvedReviewThreadCount:Math.max(0,b.unresolvedReviewThreadCount+d),reviewThreads:b.reviewThreads.map(b=>b.id===a.id?{...b,...a}:b)}})};if(O&&!M)return(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(A.Spinner,{}),v("loading")]});if(!M)return(0,b.jsxs)("section",{className:"mx-auto w-full max-w-5xl space-y-5",children:[Q&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsx)(u.AlertDescription,{children:Q})}),(0,b.jsxs)(z.Empty,{className:"border py-12",children:[(0,b.jsxs)(z.EmptyHeader,{children:[(0,b.jsx)(z.EmptyMedia,{variant:"icon",children:(0,b.jsx)(h.GitPullRequest,{})}),(0,b.jsx)(z.EmptyTitle,{children:v("notFound")}),(0,b.jsx)(z.EmptyDescription,{children:v("notFoundDescription")})]}),(0,b.jsx)(x.Button,{asChild:!0,className:"mt-4",variant:"outline",children:(0,b.jsx)(C.Link,{href:"/pull-requests",children:v("back")})})]})]});let W=new Intl.DateTimeFormat(K,{dateStyle:"medium",timeStyle:"short"}),X=a=>a?W.format(new Date(a)):"—";return(0,b.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-6xl flex-col gap-5",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)(x.Button,{asChild:!0,className:"mb-3 -ml-2",variant:"ghost",children:(0,b.jsxs)(C.Link,{href:"/pull-requests",children:[(0,b.jsx)(c.ArrowLeft,{}),v("back")]})}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground",children:[M.repositoryNameWithOwner," #",M.number]}),(0,b.jsx)("h1",{className:"mt-1 text-2xl font-semibold break-words tracking-tight [overflow-wrap:anywhere]",children:M.title}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,b.jsx)(w.Badge,{children:H(`pullRequestStates.${M.state}`)}),M.isDraft&&(0,b.jsx)(w.Badge,{children:v("draft")}),(0,b.jsx)(w.Badge,{className:"APPROVED"===(k=M.reviewDecision)?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"CHANGES_REQUESTED"===k?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"REVIEW_REQUIRED"===k?"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300":"border-slate-500/30 bg-slate-500/10 text-slate-700 dark:text-slate-300",children:H(`reviewStates.${M.reviewDecision}`)}),M.jiraKey&&(0,b.jsx)(w.Badge,{asChild:!0,className:"cursor-pointer hover:bg-muted/80",children:(0,b.jsx)("button",{onClick:()=>F(M.jiraKey),type:"button",children:M.jiraKey})})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[M.worktreeId&&(0,b.jsx)(x.Button,{asChild:!0,variant:"outline",children:(0,b.jsxs)(C.Link,{href:(0,E.worktreeDetailHref)(M.worktreeId),children:[(0,b.jsx)(i.GitBranch,{}),v("viewWorktree")]})}),"OPEN"===M.state&&(0,b.jsx)(r.MergePullRequestButton,{onMerged:S,pullRequest:M,size:"default"}),(0,b.jsxs)(x.Button,{disabled:O,onClick:()=>void S(),variant:"outline",children:[(0,b.jsx)(j.RefreshCw,{className:O?"animate-spin":void 0}),v("refresh")]}),(0,b.jsx)(x.Button,{asChild:!0,children:(0,b.jsxs)("a",{href:M.url,rel:"noreferrer",target:"_blank",children:[v("openInGitHub"),(0,b.jsx)(f.ExternalLink,{})]})})]})]}),Q&&(0,b.jsx)(u.Alert,{variant:"destructive",children:(0,b.jsx)(u.AlertDescription,{children:Q})}),(0,b.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-2",children:[(0,b.jsxs)("div",{className:"contents",children:[(0,b.jsx)(y.Card,{className:"min-w-0 order-2 lg:col-span-2",children:(0,b.jsx)(y.CardContent,{children:(0,b.jsx)(q.GitHubMarkdownBlock,{body:M.body,bodyHtml:M.bodyHtml,emptyLabel:v("noDescription"),header:(0,b.jsx)(y.CardTitle,{children:v("description")}),headerClassName:"border-b pb-4"})})}),(0,b.jsxs)("div",{className:"min-w-0 order-3 space-y-4 lg:col-span-2",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:v("comments")}),(0,b.jsx)(w.Badge,{variant:"secondary",children:M.reviewThreads.length})]}),0===M.reviewThreads.length?(0,b.jsx)(z.Empty,{className:"border py-8",children:(0,b.jsxs)(z.EmptyHeader,{children:[(0,b.jsx)(z.EmptyTitle,{children:v("noComments")}),(0,b.jsx)(z.EmptyDescription,{children:v("noCommentsDescription")})]})}):(0,b.jsx)("div",{className:"space-y-5",children:M.reviewThreads.map(a=>(0,b.jsx)(s.ReviewThreadCard,{locale:K,onReplyAdded:U,onStateChanged:V,thread:a},a.id))})]}),(0,b.jsxs)(y.Card,{className:"min-w-0 order-4 gap-0 py-0 lg:col-span-2",children:[(0,b.jsxs)(y.CardHeader,{className:"flex grid-cols-none flex-row items-center justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(y.CardTitle,{children:v("pipelines")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("pipelineCount",{count:M.pipelines.length})})]}),(0,b.jsx)(p.PipelineMenu,{onPipelineRetried:T,pipelineStatus:M.pipelineStatus,pipelines:M.pipelines,repositoryId:M.repositoryGithubId})]}),(0,b.jsx)(y.CardContent,{className:"px-0",children:0===M.pipelines.length?(0,b.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:H("noPipelines")}):(0,b.jsxs)(B.Table,{children:[(0,b.jsx)(B.TableHeader,{children:(0,b.jsxs)(B.TableRow,{className:"hover:bg-transparent",children:[(0,b.jsx)(B.TableHead,{children:v("pipelineName")}),(0,b.jsx)(B.TableHead,{children:v("pipelineStatus")}),(0,b.jsx)(B.TableHead,{className:"text-right",children:v("pipelineDetails")})]})}),(0,b.jsx)(B.TableBody,{children:M.pipelines.map(a=>(0,b.jsxs)(o.Fragment,{children:[(0,b.jsxs)(B.TableRow,{children:[(0,b.jsx)(B.TableCell,{className:"font-medium",children:a.name}),(0,b.jsx)(B.TableCell,{children:(0,b.jsx)(w.Badge,{className:(0,p.pipelineStateClass)(a.status),children:H(`pipelineStates.${a.status}`)})}),(0,b.jsx)(B.TableCell,{children:(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[a.url?(0,b.jsx)(x.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,b.jsxs)("a",{href:a.url,rel:"noreferrer",target:"_blank",children:[v("viewPipeline"),(0,b.jsx)(f.ExternalLink,{})]})}):(0,b.jsxs)(x.Button,{disabled:!0,size:"sm",variant:"outline",children:[v("viewPipeline"),(0,b.jsx)(f.ExternalLink,{})]}),(0,b.jsx)(p.RetryPipelineButton,{onError:R,onPipelineRetried:T,pipeline:a,repositoryId:M.repositoryGithubId})]})})]}),(0,b.jsx)(B.TableRow,{className:"bg-muted/20 hover:bg-muted/20",children:(0,b.jsx)(B.TableCell,{className:"p-0",colSpan:3,children:(0,b.jsxs)("div",{className:"border-l-2 border-muted-foreground/20 px-4 py-1",children:[(0,b.jsx)("p",{className:"px-3 py-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:v("jobCount",{count:a.jobs.length})}),0===a.jobs.length?(0,b.jsx)("p",{className:"px-3 pb-3 text-sm text-muted-foreground",children:v("noJobs")}):(0,b.jsx)("div",{className:"divide-y",children:a.jobs.map(c=>(0,b.jsx)(G,{checkSuiteId:a.checkSuiteId,job:c,onError:R,onRetried:()=>{var b,d;return b=a.id,d=c.id,void N(a=>a?{...a,pipelineStatus:"PENDING",pipelines:a.pipelines.map(a=>a.id===b?{...a,status:"QUEUED",canRetry:!1,retryUnavailableReason:"NOT_COMPLETED",jobs:a.jobs.map(a=>a.id===d?{...a,status:"QUEUED",canRetry:!1,retryUnavailableReason:"NOT_COMPLETED",steps:[]}:{...a,canRetry:!1,retryUnavailableReason:"NOT_COMPLETED"})}:a)}:a)},repositoryId:M.repositoryGithubId},c.id))})]})})})]},a.id))})]})})]})]}),(0,b.jsxs)("div",{className:"contents",children:[(0,b.jsxs)(y.Card,{className:"min-w-0 order-1",children:[(0,b.jsx)(y.CardHeader,{children:(0,b.jsx)(y.CardTitle,{children:v("details")})}),(0,b.jsx)(y.CardContent,{children:(0,b.jsxs)("dl",{className:"grid gap-4 text-sm",children:[(0,b.jsx)(I,{label:v("branches"),children:(0,b.jsxs)("span",{className:"font-mono text-xs break-all",children:[M.headRefName," → ",M.baseRefName]})}),(0,b.jsxs)(I,{label:v("changes"),children:[(0,b.jsxs)("span",{className:"text-emerald-600",children:["+",M.additions]})," ",(0,b.jsxs)("span",{className:"text-red-600",children:["−",M.deletions]})]}),(0,b.jsx)(I,{label:v("files"),children:M.changedFiles??"—"}),(0,b.jsx)(I,{label:v("commits"),children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(g,{className:"size-4"}),M.commitCount]})}),(0,b.jsx)(I,{label:v("mergeable"),children:H(`mergeableStates.${M.mergeable}`)}),(0,b.jsx)(I,{label:v("openComments"),children:M.unresolvedReviewThreadCount}),(0,b.jsx)(I,{label:v("created"),children:X(M.createdAt)}),(0,b.jsx)(I,{label:v("updated"),children:X(M.updatedAt)}),M.mergedAt&&(0,b.jsx)(I,{label:v("merged"),children:X(M.mergedAt)})]})})]}),(0,b.jsxs)(y.Card,{className:"min-w-0 order-1",children:[(0,b.jsx)(y.CardHeader,{children:(0,b.jsx)(y.CardTitle,{children:v("people")})}),(0,b.jsxs)(y.CardContent,{className:"space-y-4",children:[(0,b.jsx)(J,{label:v("author"),person:M.author,unknownLabel:v("unknown")}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"mb-2 text-xs text-muted-foreground",children:v("assignees")}),0===M.assignees.length?(0,b.jsx)("p",{className:"text-sm",children:v("unassigned")}):(0,b.jsx)("div",{className:"space-y-2",children:M.assignees.map(a=>(0,b.jsx)(J,{person:a,unknownLabel:v("unknown")},a.login))})]})]})]})]})]}),(0,b.jsx)(t.JiraTicketDrawer,{issueKey:L,onClose:()=>F(null)})]})}],117297)}];
|
|
20
20
|
|
|
21
21
|
//# sourceMappingURL=src_components_github_pull-request-detail-page_tsx_1etlamp._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[422434,a=>{"use strict";var b=a.i(187924),c=a.i(727061),d=a.i(168370),e=a.i(519783),f=a.i(879675),g=a.i(980180),h=a.i(415925),i=a.i(572131),j=a.i(844873),k=a.i(124348),l=a.i(786304),m=a.i(699570),n=a.i(591119),o=a.i(46524),p=a.i(866718),q=a.i(870430),r=a.i(668684),s=a.i(206015),t=a.i(555027),u=a.i(460280);let v="window total live cache errors averageMs";function w(a){return a?new Date(a).toLocaleString():"—"}function x(a){return"LIVE"===a?"border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300":"ERROR"===a?"border-destructive/30 bg-destructive/10 text-destructive":"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"}function y({metric:a}){let d=(0,h.useTranslations)("jiraCache");return(0,b.jsx)(n.Card,{children:(0,b.jsxs)(n.CardContent,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"font-medium",children:a.window}),(0,b.jsx)(c.Database,{className:"size-4 text-muted-foreground"})]}),(0,b.jsx)("p",{className:"mt-3 text-3xl font-semibold",children:a.total}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:d("average",{ms:a.averageMs})}),(0,b.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2 text-xs",children:[(0,b.jsxs)("span",{children:[d("live")," ",a.live]}),(0,b.jsxs)("span",{children:[d("cache")," ",a.cache]}),(0,b.jsxs)("span",{children:[d("errors")," ",a.errors]})]})]})})}function z({title:a,description:c,children:d}){return(0,b.jsxs)(n.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(n.CardHeader,{
|
|
1
|
+
module.exports=[422434,a=>{"use strict";var b=a.i(187924),c=a.i(727061),d=a.i(168370),e=a.i(519783),f=a.i(879675),g=a.i(980180),h=a.i(415925),i=a.i(572131),j=a.i(844873),k=a.i(124348),l=a.i(786304),m=a.i(699570),n=a.i(591119),o=a.i(46524),p=a.i(866718),q=a.i(870430),r=a.i(668684),s=a.i(206015),t=a.i(555027),u=a.i(460280);let v="window total live cache errors averageMs";function w(a){return a?new Date(a).toLocaleString():"—"}function x(a){return"LIVE"===a?"border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300":"ERROR"===a?"border-destructive/30 bg-destructive/10 text-destructive":"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"}function y({metric:a}){let d=(0,h.useTranslations)("jiraCache");return(0,b.jsx)(n.Card,{children:(0,b.jsxs)(n.CardContent,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"font-medium",children:a.window}),(0,b.jsx)(c.Database,{className:"size-4 text-muted-foreground"})]}),(0,b.jsx)("p",{className:"mt-3 text-3xl font-semibold",children:a.total}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:d("average",{ms:a.averageMs})}),(0,b.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2 text-xs",children:[(0,b.jsxs)("span",{children:[d("live")," ",a.live]}),(0,b.jsxs)("span",{children:[d("cache")," ",a.cache]}),(0,b.jsxs)("span",{children:[d("errors")," ",a.errors]})]})]})})}function z({title:a,description:c,children:d}){return(0,b.jsxs)(n.Card,{className:"gap-0 py-0",children:[(0,b.jsxs)(n.CardHeader,{children:[(0,b.jsx)(n.CardTitle,{children:a}),(0,b.jsx)(n.CardDescription,{children:c})]}),d]})}function A({children:a}){return(0,b.jsx)(o.Empty,{className:"py-8",children:(0,b.jsx)(o.EmptyHeader,{children:(0,b.jsx)(o.EmptyDescription,{children:a})})})}function B({offset:a,setOffset:c,total:d}){let e=(0,h.useTranslations)("jiraCache");return(0,b.jsxs)("div",{className:"flex items-center justify-between border-t p-3 text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:e("showing",{start:0===d?0:a+1,end:Math.min(a+50,d),total:d})}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(m.Button,{disabled:0===a,onClick:()=>c(Math.max(0,a-50)),size:"sm",variant:"outline",children:e("previous")}),(0,b.jsx)(m.Button,{disabled:a+50>=d,onClick:()=>c(a+50),size:"sm",variant:"outline",children:e("next")})]})]})}a.s(["JiraCachePage",0,function(){let a=(0,h.useTranslations)("jiraCache"),c=(0,h.useTranslations)("common"),[n,o]=(0,i.useState)(null),[C,D]=(0,i.useState)("5"),[E,F]=(0,i.useState)(0),[G,H]=(0,i.useState)(0),[I,J]=(0,i.useState)(!0),[K,L]=(0,i.useState)(null),[M,N]=(0,i.useState)(null),O=(0,i.useCallback)(async()=>{J(!0);try{let a=await (0,u.controlPlaneRequest)(`query JiraCachePage($limit: Int!, $callOffset: Int!, $ticketOffset: Int!) {
|
|
2
2
|
jiraSettings { siteUrl email tokenConfigured cacheTtlSeconds updatedAt }
|
|
3
3
|
jiraCacheMetrics { windows { ${v} } operations { operation windows { ${v} } } }
|
|
4
4
|
jiraApiCalls(limit: $limit, offset: $callOffset) { items { id operation requestSummary source durationMs statusCode error itemCount servedStale createdAt } total limit offset }
|