uigraph 1.0.2 → 1.0.3
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/dist/bin.mjs +9 -0
- package/dist/viewer/assets/{dashboard-diagrams-page-Cb0xNr4W.js → dashboard-diagrams-page-BrtdVf99.js} +2 -2
- package/dist/viewer/assets/dashboard-diagrams-page-inner-BKLoXNtg.js +1 -0
- package/dist/viewer/assets/dashboard-services--bCsUPT2.js +1 -0
- package/dist/viewer/assets/{index-BC5xdBQU.js → index-BGspOYtx.js} +2 -2
- package/dist/viewer/assets/index-D0Xz1Ckp.css +1 -0
- package/dist/viewer/assets/lens-runs-page-DCvFQzxB.js +1 -0
- package/dist/viewer/assets/section-get-started-CSeRLtZQ.js +1 -0
- package/dist/viewer/index.html +2 -2
- package/package.json +1 -1
- package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +0 -1
- package/dist/viewer/assets/dashboard-services-DEscIO2O.js +0 -1
- package/dist/viewer/assets/index-m8s6_jQi.css +0 -1
- package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as l}from"./index-CH7cEAxj.js";import{S as k}from"./section-loader-C4hOfhQS.js";import{S as f}from"./section-not-found-BnrXiPog.js";import{I as D}from"./input--C59pq6j.js";import{S,a as N,b as w,c as v,d as o}from"./select-D9fbrr7O.js";import{T as $,a as q,b as C,c as m,d as U,e as d}from"./table-B4pFND-o.js";import{P as F,u as B}from"./nav-links-DZWMpwMR.js";import{u as O}from"./query-D9oj6LGx.js";import{DashboardSectionHeader as V,DashboardSectionContent as H}from"./index-Bn2bqqMd.js";import{S as Q}from"./services-Ivav34WC.js";import{FilterPill as y}from"./dashboard-services-DEscIO2O.js";import{n as z}from"./git-BilAlIQ8.js";import{a as K}from"./index-Dj_05fqk.js";import{g as _}from"./api-r74Oi8H6.js";import{L as G}from"./chunk-OB3PAWPO-DJIP1M4r.js";import{u as J}from"./useQuery-Dhe6uxrL.js";import"./super-logo-loader-Cxlbn6MB.js";import"./scroll-area-RagrStGj.js";import"./ui-graph-logo-gHowu5gP.js";import"./iconBase-DtqdW2XR.js";import"./chevron-down-DDsUE_xz.js";import"./check-BpmCQNbj.js";import"./chevron-up-DVznKMGv.js";import"./dashboard-layout-sTeeHNsZ.js";import"./grid-scroll-body-DC5pYDPJ.js";import"./popover-476u3TN0.js";import"./gql-FFIj8zdp.js";import"./button-DZj74qS7.js";import"./use-debounced-value-BpNFJd3C.js";import"./better-delete-confirmation-modal-CGEQ5O4X.js";import"./dialog-D7wzTt0L.js";import"./index-B6MxYIzs.js";import"./super-circle-loader-DSkos6uP.js";import"./use-permissions-BvmxJJ5r.js";import"./format-BquKoU4D.js";import"./en-US-B1Lg1a1H.js";import"./useMutation-D5ZHwHsx.js";import"./network-B1apzT1s.js";const M="Pull request reviews run on this machine.",p={running:{label:"Running",className:"text-[#7BA4FF]"},done:{label:"Done",className:"text-[#5FD39A]"},failed:{label:"Failed or stopped",className:"text-[#F2777A]"}};function De(){return e.jsxs(e.Fragment,{children:[e.jsx(V,{title:"Pull Request Reviews",description:"Lens reviews run on this machine."}),e.jsx(H,{children:e.jsx(L,{runPath:F.lens.dashboardRun})})]})}function $e(){return e.jsxs("main",{className:"mx-auto w-full max-w-5xl px-6 py-10",children:[e.jsx("h1",{className:"mb-2 text-xl font-semibold text-[#F4F7FC]",children:"Lens"}),e.jsx("p",{className:"text-paragraph mb-6 text-sm",children:M}),e.jsx(L,{runPath:F.lens.run})]})}function W(n){return z(n).replace(/^https?:\/\/[^/]+\//,"").replace(/\.git$/,"").replace(/\/$/,"").toLowerCase()}function L({runPath:n}){const R=O().id,[u,A]=l.useState(""),[i,E]=l.useState("all"),[r,x]=l.useState("all"),[h,I]=l.useState("newest"),t=B({queryKey:["lens-runs"],queryFn:_,refetchInterval:3e3}),P=J(Q,{variables:{orgId:R,sortBy:"name",sortDir:"asc"}}),j=K(P.data?.services.items).filter(s=>s.gitRepoUrl);if(t.isPending)return e.jsx(k,{label:"Loading Lens runs"});if(t.isError)return e.jsx(f,{plain:!0,label:t.error.message});if(t.data.length===0)return e.jsxs("div",{className:"flex min-h-[200px] flex-col items-center justify-center gap-3 text-sm text-[#828DA3]",children:[e.jsx("p",{children:"No reviews yet. Start one from a terminal:"}),e.jsx("code",{className:"border-stock rounded-md border px-3 py-1.5 font-mono text-[#F4F7FC]",children:"uigraph lens <pull-request>"})]});const c=j.find(s=>s.id===i)?.gitRepoUrl,b=u.trim().toLowerCase(),g=t.data.filter(s=>r==="all"||s.status===r).filter(s=>i==="all"||c!=null&&s.repository.toLowerCase()===W(c)).filter(s=>b===""||`${s.title} ${s.repository}#${s.number??""}`.toLowerCase().includes(b)).sort((s,a)=>h==="newest"?a.updatedAt.localeCompare(s.updatedAt):s.updatedAt.localeCompare(a.updatedAt));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-6 flex flex-wrap items-center gap-3",children:[e.jsx(D,{value:u,onChange:s=>A(s.target.value),placeholder:"Search reviews...",className:"h-10 w-52 rounded-lg border-[#2A3242] bg-[#1E2533] text-[13px] shadow-none focus-visible:bg-[#1E2533]"}),e.jsxs(S,{value:i,onValueChange:E,children:[e.jsx(N,{className:"h-10 w-40 shrink-0 rounded-lg border-[#2A3242] bg-[#1E2533] text-[13px] shadow-none",children:e.jsx(w,{})}),e.jsxs(v,{children:[e.jsx(o,{value:"all",children:"All Services"}),j.map(s=>e.jsx(o,{value:s.id,children:s.name},s.id))]})]}),e.jsxs(S,{value:h,onValueChange:s=>I(s),children:[e.jsx(N,{className:"h-10 w-40 shrink-0 rounded-lg border-[#2A3242] bg-[#1E2533] text-[13px] shadow-none",children:e.jsx(w,{})}),e.jsxs(v,{children:[e.jsx(o,{value:"newest",children:"Newest"}),e.jsx(o,{value:"oldest",children:"Oldest"})]})]}),e.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg bg-[#1E2533] p-0.5 ring-1 ring-[#2A3242]",children:[e.jsx(y,{label:"All",count:t.data.length,active:r==="all",onClick:()=>x("all")}),Object.entries(p).map(([s,{label:a}])=>e.jsx(y,{label:a,count:t.data.filter(T=>T.status===s).length,active:r===s,onClick:()=>x(r===s?"all":s)},s))]})]}),g.length===0?e.jsx(f,{label:"No reviews match your search."}):e.jsx("div",{className:"border-stock rounded-[0.5rem] border",children:e.jsxs($,{children:[e.jsx(q,{children:e.jsxs(C,{children:[e.jsx(m,{className:"h-11 px-3!",children:"Pull request"}),e.jsx(m,{className:"h-11 w-[18%] px-3!",children:"Status"}),e.jsx(m,{className:"h-11 w-[22%] px-3!",children:"Updated"})]})}),e.jsx(U,{children:g.map(s=>e.jsxs(C,{children:[e.jsx(d,{className:"px-3!",children:e.jsxs(G,{to:n(s.runId),className:"block min-w-0",children:[e.jsx("span",{className:"block truncate text-[#F4F7FC] hover:underline",children:s.title}),e.jsxs("span",{className:"text-paragraph text-xs",children:[s.repository,s.number===null?" · local branch":`#${s.number}`]})]})}),e.jsx(d,{className:`px-3! ${p[s.status].className}`,children:p[s.status].label}),e.jsx(d,{className:"text-paragraph px-3!",children:new Date(s.updatedAt).toLocaleString()})]},s.runId))})]})})]})}export{De as DashboardLensRunsPage,$e as LensRunsPage};
|