PageSourceSearch

https://app.demandly.com/build/assets/RunPanel-J-p6eAkX.js

js demandly.com collected 2026-10-05 22:46:10 UTC 3,970 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-react-LhIw5p9I.js";import{I as p}from"./vendor-icons-l7iU8llw.js";import{Empty as j,timeAgo as u,StatusPill as _}from"./shared-BB-ZEemS.js";import{GlideList as v}from"./ui-CFLxtauc.js";import"./vendor-lodash-DLrLquRk.js";const N={running:{tone:"info",label:"running"},waiting:{tone:"warning",label:"waiting"},completed:{tone:"success",label:"done"},failed:{tone:"danger",label:"failed"},cancelled:{tone:"neutral",label:"cancelled"}};function y({status:a}){const i=N[a]||{label:a};return e.jsx(_,{status:i.label==="done"?"completed":a==="waiting"?"pending":a,label:i.label})}const k={trigger:"an event",manual:"you",schedule:"the schedule",webhook:"an app event",ai:"the AI",test:"a test"};function f(a){return a.status!=="waiting"?null:a.waiting_for==="approval"?"Waiting for approval in the Approvals tab":a.waiting_for==="delay"?`Waiting until ${a.wait_ref?u(a.wait_ref):"later"}`:a.waiting_for==="event"?`Waiting for ${String(a.wait_ref||"an event").replace(/_/g," ")}`:"Waiting"}function T({runs:a=[],selectedRunId:i,onSelect:h,onCancel:m,onRefresh:w,onOpenApprovals:x,onClose:b,refreshing:r,nodesById:n}){const g=a.find(t=>t.id===i)||null;return e.jsxs("div",{className:"wf-panel",children:[e.jsxs("div",{className:"wf-panel__head",children:[e.jsxs("div",{className:"wf-panel__titles",children:[e.jsx("div",{className:"wf-panel__title",children:"Runs"}),e.jsx("div",{className:"wf-panel__sub",children:"Pick one to light its steps up on the canvas."})]}),e.jsx("button",{type:"button","aria-label":"Refresh",title:"Refresh",className:"wf-iconbtn",onClick:w,disabled:r,children:e.jsx(p,{icon:"tabler:refresh",className:r?"animate-spin":""})}),e.jsx("button",{type:"button","aria-label":"Close",title:"Close",className:"wf-iconbtn",onClick:b,children:e.jsx(p,{icon:"tabler:x"})})]}),e.jsx("div",{className:"wf-panel__body",children:a.length===0?e.jsx("div",{style:{padding:"4px 16px"},children:e.jsx(j,{icon:"tabler:player-play",children:"No runs yet. Press Run to try it with real data."})}):e.jsx(v,{className:"wf-runs",children:a.map(t=>{var c;const l=t.id===i;return e.jsxs("div",{"data-glide":"",className:`wf-run${l?" wf-run--on":""}`,children:[e.jsxs("button",{type:"button",className:"wf-run__top",style:{width:"100%",padding:0,border:0,background:"none",textAlign:"left",cursor:"pointer"},onClick:()=>h(l?null:t.id),children:[e.jsxs("div",{style:{minWidth:0},children:[e.jsxs("div",{className:"wf-run__title",children:["Run #",t.id," ",e.jsxs("span",{className:"wf-run__by",children:["· by ",k[t.started_by]||t.started_by]})]}),e.jsxs("div",{className:"wf-run__meta",children:[u(t.started_at),(c=t.trigger)!=null&&c.sku?` · ${t.trigger.sku}`:""]}),f(t)&&e.jsx("div",{className:"wf-run__warn",children:f(t)}),t.error&&e.jsx("div",{className:"wf-run__error",children:t.error})]}),e.jsx(y,{status:t.status})]}),l&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"wf-run__steps",children:t.steps.map(s=>{var o,d;return e.jsxs("div",{className:"wf-run__step",children:[e.jsxs("span",{className:"wf-run__step-name",children:[((d=(o=n==null?void 0:n[s.node_id])==null?void 0:o.data)==null?void 0:d.label)||s.node_id,s.note&&e.jsxs("span",{className:"wf-run__step-note",children:[" · ",s.note]})]}),e.jsx(_,{status:s.status==="waiting"?"pending":s.status,label:s.status==="completed"?"done":s.status})]},s.id)})}),e.jsxs("div",{className:"wf-run__actions",children:[t.status==="waiting"&&t.waiting_for==="approval"&&e.jsx("button",{type:"button",className:"wf-link",onClick:x,children:"Open Approvals"}),(t.status==="running"||t.status==="waiting")&&e.jsx("button",{type:"button",className:"wf-link wf-link--quiet",onClick:()=>m(t.id),children:"Cancel this run"})]})]})]},t.id)})})}),g&&e.jsx("div",{className:"wf-panel__foot",children:e.jsx("span",{className:"wf-panel__meta",children:"Each step on the canvas is outlined with this run's result. Click one to see what it produced."})})]})}export{y as RunStatusPill,T as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.