@bull-board/ui 6.21.0 → 6.21.2

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.
Files changed (28) hide show
  1. package/dist/index.ejs +2 -2
  2. package/dist/static/css/async/10012.edbbc3cb.css +1 -0
  3. package/dist/static/css/async/79721.5ada9d27.css +1 -0
  4. package/dist/static/css/main.04944c4f.css +1 -0
  5. package/dist/static/js/6693.47be15e9.js +12 -0
  6. package/dist/static/js/async/{10518.e5ba10f5.js → 10518.b0a21f0d.js} +1 -1
  7. package/dist/static/js/async/48554.692c6804.js +1 -0
  8. package/dist/static/js/async/51125.8b45fd61.js +56 -0
  9. package/dist/static/js/async/90409.1795e0fb.js +1 -0
  10. package/dist/static/js/async/highlight-worker.722eeead.js +1 -0
  11. package/dist/static/js/lib-axios.748d6a60.js +1 -0
  12. package/dist/static/js/lib-react.719eb9c0.js +2 -0
  13. package/dist/static/js/main.f9b83451.js +9 -0
  14. package/package.json +17 -16
  15. package/dist/static/css/async/10012.4e1c8e42.css +0 -1
  16. package/dist/static/css/async/79721.0140cf68.css +0 -1
  17. package/dist/static/css/main.79b15ce2.css +0 -1
  18. package/dist/static/js/6693.47a4f9db.js +0 -12
  19. package/dist/static/js/async/48554.9deee037.js +0 -1
  20. package/dist/static/js/async/51125.fe204459.js +0 -56
  21. package/dist/static/js/async/90409.2254a36e.js +0 -1
  22. package/dist/static/js/async/highlight-worker.41f67098.js +0 -1
  23. package/dist/static/js/lib-axios.9f8e84b3.js +0 -1
  24. package/dist/static/js/lib-react.f1fbffc9.js +0 -2
  25. package/dist/static/js/main.d90f3051.js +0 -9
  26. /package/dist/static/js/{6693.47a4f9db.js.LICENSE.txt → 6693.47be15e9.js.LICENSE.txt} +0 -0
  27. /package/dist/static/js/async/{51125.fe204459.js.LICENSE.txt → 51125.8b45fd61.js.LICENSE.txt} +0 -0
  28. /package/dist/static/js/{lib-react.f1fbffc9.js.LICENSE.txt → lib-react.719eb9c0.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["48554"],{51529(e,t,s){s.d(t,{A:()=>l});let l={card:"card-BRjpw_",contentWrapper:"contentWrapper-Aj9Wmy",jobName:"jobName-t8DcMf",sideInfo:"sideInfo-a9IFbv",header:"header-Lw4QCc",headerActions:"headerActions-BHD8mS",statusDot:"statusDot-JKWQae",jobId:"jobId-bLy5Ry",jobNameInline:"jobNameInline-ZJ3YIs",details:"details-JRsI9B",collapseBtn:"collapseBtn-J6rMz7",content:"content-SHI77x",progress:"progress-POOya3",jobLink:"jobLink-wmCWQg",titleWithLink:"titleWithLink-UFeEb7",externalLink:"externalLink-dX0ReW"}},40555(e,t){t.STATUSES=void 0,t.STATUSES={latest:"latest",active:"active",waiting:"waiting",waitingChildren:"waiting-children",prioritized:"prioritized",completed:"completed",failed:"failed",delayed:"delayed",paused:"paused"}},81367(e,t,s){s.d(t,{Z:()=>n});var l=s(31085),a=s(54357);s(14041);let n=e=>{let{children:t,className:s}=e;return(0,l.jsx)("div",{className:(0,a.A)("card-xqyZlH",s),children:t})}},19414(e,t,s){s.d(t,{A:()=>a});var l=s(31085);s(14041);let a=()=>(0,l.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 512",children:(0,l.jsx)("path",{d:"M231.293 473.899l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L70.393 256 251.092 74.87c4.686-4.686 4.686-12.284 0-16.971L231.293 38.1c-4.686-4.686-12.284-4.686-16.971 0L4.908 247.515c-4.686 4.686-4.686 12.284 0 16.971L214.322 473.9c4.687 4.686 12.285 4.686 16.971-.001z"})})},8020(e,t,s){s.d(t,{E:()=>a});var l=s(31085);s(14041);let a=()=>(0,l.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"})})},15190(e,t,s){s.d(t,{u:()=>a});var l=s(31085);s(14041);let a=()=>(0,l.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"})})},2206(e,t,s){s.d(t,{G:()=>a});var l=s(31085);s(14041);let a=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M15 17v-2.99A4 4 0 0 0 11 10H8v5L2 9l6-6v5h3a6 6 0 0 1 6 6v3h-2z"})})},7320(e,t,s){s.d(t,{m:()=>a});var l=s(31085);s(14041);let a=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M5 4a2 2 0 0 0-2 2v6H0l4 4 4-4H5V6h7l2-2H5zm10 4h-3l4-4 4 4h-3v6a2 2 0 0 1-2 2H6l2-2h7V8z"})})},56956(e,t,s){s.d(t,{u:()=>a});var l=s(31085);s(14041);let a=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M6 2l2-2h4l2 2h4v2H2V2h4zM3 6h14l-1 14H4L3 6zm5 2v10h1V8H8zm3 0v10h1V8h-1z"})})},66832(e,t,s){s.d(t,{o:()=>er});var l=s(31085),a=s(40555),n=s(14041),r=s(42348),i=s(33664),c=s(43499),o=s(81367),d=s(12287);let u=e=>{let{className:t}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 512 512",className:t,children:(0,l.jsx)("path",{d:"M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112v320c0 44.2 35.8 80 80 80h320c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v112c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16h112c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"})})};var h=s(40783);let m=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M241 130.5l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9l-22.7 22.7c-9.4 9.4-24.5 9.4-33.9 0L224 227.5 69.3 381.5c-9.4 9.3-24.5 9.3-33.9 0l-22.7-22.7c-9.4-9.4-9.4-24.6 0-33.9L207 130.5C216.4 121.2 231.6 121.2 241 130.5z"})});var p=s(84382),x=s(27987),j=s(15510),g=s(54357),v=s(12445);let S=void 0!==window.Worker,b=null,w=new Map;async function A(e,t){if(S)return b||((b=new Worker(new URL(s.p+s.u("30697"),s.b),Object.assign({},{name:"highlight-worker"},{type:void 0}))).onmessage=e=>{let{data:t}=e,{id:s,code:l}=t;if(w.has(s)){let{resolve:e}=w.get(s);e(l)}}),new Promise((s,l)=>{let a=(0,v.Ak)(5);null==b||b.postMessage({id:a,code:e,language:t}),w.set(a,{resolve:e=>{w.delete(a),s(e)},reject:()=>{w.delete(a),l()}}),setTimeout(()=>l(),6e4)});{let{highlighter:l}=await Promise.all([s.e("2833"),s.e("85334")]).then(s.bind(s,79945));return l.highlightAuto(e,[t]).value||""}}let T=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:(0,l.jsx)("path",{d:"M280 64l40 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l40 0 9.6 0C121 27.5 153.3 0 192 0s71 27.5 78.4 64l9.6 0zM64 112c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16l-16 0 0 24c0 13.3-10.7 24-24 24l-88 0-88 0c-13.3 0-24-10.7-24-24l0-24-16 0zm128-8a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"})}),N=e=>{let{language:t,text:s}=e,[a,r]=(0,n.useState)("");return(0,n.useEffect)(()=>{let e=!1;return A(s,t).then(t=>{e||r(t)}),()=>{e=!0}},[t,s]),(0,l.jsxs)("div",{className:"codeContainerWrapper-ZpYBAP",children:[(0,l.jsx)("pre",{children:(0,l.jsx)("code",{className:(0,g.A)("hljs",t),dangerouslySetInnerHTML:{__html:a}})}),(0,l.jsx)(p.$,{onClick:()=>{navigator.clipboard.writeText(s??"")},className:"copyBtn-vLoi5u",compact:!0,children:(0,l.jsx)(T,{})})]})};var f=s(98807);s(30829);let y=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}),O=e=>{let{textToCopy:t,className:s,tabIndex:a}=e,{t:i}=(0,r.Bd)(),[c,o]=(0,n.useState)(!1),d=(0,n.useRef)(),u=(0,n.useCallback)(async()=>{try{await navigator.clipboard.writeText(t),o(!0),clearTimeout(d.current),d.current=setTimeout(()=>o(!1),1500)}catch(e){alert(i("CLIPBOARD.COPY_FAILED"))}},[t,i]);return(0,l.jsx)(p.$,{onClick:u,className:`copyBtn-S91mHH ${c?"copied-Eowyzo":""} ${s||""}`,tabIndex:a,children:c?(0,l.jsx)(y,{}):(0,l.jsx)(T,{})})},C="label-ymbP05",L={container:"container-_LjKnx",basicChildStyle:"basicChildStyle-tTpXD4",collapseIcon:"collapseIcon-PhouWI",expandIcon:"expandIcon-RZtdZD",collapsedContent:"collapsedContent-wxaP6v",label:C,clickableLabel:C,punctuation:"punctuation-SIrhOo",stringValue:"stringValue-jX0CHZ",numberValue:"numberValue-FVYrm4",booleanValue:"booleanValue-Gs5QuZ",nullValue:"nullValue-Z9oy6o",undefinedValue:"undefinedValue-YPfHsD",otherValue:"otherValue-gr22aS",noQuotesForStringValues:!1},B=e=>{let{data:t,defaultCollapseDepth:s=3}=e,a=(0,n.useMemo)(()=>JSON.stringify(t,null,2),[t]),r=(0,n.useCallback)(e=>0===s?(0,f.ab)(e):e<s,[s]);return(0,l.jsxs)("div",{className:"root-Eyiful",children:[(0,l.jsx)("div",{className:"content-K6N1cP",children:(0,l.jsx)(f.UU,{data:t,shouldExpandNode:r,style:L})}),(0,l.jsx)(O,{textToCopy:a,className:"copyBtn-CoPL0E"})]})};var E=s(36271),I=s(15735),J=s(64328),D=s(47245),R=s(53846),_=s(85891),k=s(26834);let U=(e,t,s)=>{let l;if((0,E.A)(e)){if(null==s?void 0:s.short)return(0,I.A)(new Date(e),s.short);l={hour:"numeric",minute:"numeric",second:"numeric"}}else if((0,J.A)(e,new Date)){if(null==s?void 0:s.common)return(0,I.A)(new Date(e),s.common);l={month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"}}else{if(null==s?void 0:s.full)return(0,I.A)(new Date(e),s.full);l={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"}}return new Intl.DateTimeFormat(t,l).format(e)},M=(e,t,s)=>{let l=(0,D.A)(e,t),a=l/1e3;return a>5?(0,R.A)(e,t,{includeSeconds:!0,locale:_.Q}):a>=1?s("JOB.DURATION.SECS",{duration:a.toFixed(2)}):s("JOB.DURATION.MILLI_SECS",{duration:l})},H=function(e){let{job:t,status:s,className:n}=e,{t:i,i18n:c}=(0,r.Bd)(),o=(0,k._)().dateFormats||{};return(0,l.jsx)("div",{className:(0,g.A)("timelineWrapper-iZqG0C",n),children:(0,l.jsxs)("ul",{className:"timeline-lF9niS",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("small",{children:i("JOB.ADDED_AT")}),(0,l.jsx)("time",{children:U(t.timestamp||0,c.language,o)})]}),!!t.delay&&t.delay>0&&s===a.STATUSES.delayed&&(0,l.jsxs)("li",{children:[(0,l.jsx)("small",{children:i("JOB.WILL_RUN_AT")}),(0,l.jsx)("time",{children:U((t.timestamp||0)+(t.opts.delay||t.delay||0),c.language,o)}),t.delay!==t.opts.delay&&(0,l.jsxs)("small",{children:[i("JOB.DELAY_CHANGED")," "]})]}),!!t.processedOn&&(0,l.jsxs)("li",{children:[(0,l.jsxs)("small",{children:[!!t.delay&&t.delay>0&&i("JOB.DELAYED_FOR")+" ",M(t.processedOn,t.timestamp||0,i)]}),(0,l.jsx)("small",{children:i("JOB.PROCESS_STARTED_AT")}),(0,l.jsx)("time",{children:U(t.processedOn,c.language,o)}),!!t.processedBy&&(0,l.jsx)("small",{children:i("JOB.PROCESSED_BY",{processedBy:t.processedBy})})]}),!!t.finishedOn&&(0,l.jsxs)("li",{children:[(0,l.jsx)("small",{children:M(t.finishedOn,t.processedOn||0,i)}),(0,l.jsx)("small",{children:i(t.isFailed&&s!==a.STATUSES.active&&s!==a.STATUSES.completed?"JOB.FAILED_AT":"JOB.FINISHED_AT")}),(0,l.jsx)("time",{children:U(t.finishedOn,c.language,o)})]})]})})};var z=s(26347),V=s(10451),$=s(8020),P=s(15190);let W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!t||RegExp(`${t}`,"i").test(e.message)};function F(e){return e.map((e,t)=>({message:e,lineNumber:t+1}))}let K=e=>{let t,{actions:s,job:a}=e,{t:i}=(0,r.Bd)(),[c,o]=(0,n.useState)([]),[d,u]=(0,n.useState)(!1),[h,m]=(0,n.useState)(""),[x,j]=(0,n.useState)(""),g=(0,n.useRef)(null),v=(0,n.useRef)();(0,n.useEffect)(()=>{let e=!0;return s.getJobLogs().then(t=>{e&&o(F(t))}),()=>{e=!1}},[]),(0,z.$)(async()=>{o(F(await s.getJobLogs())),requestAnimationFrame(()=>{var e,t;null==(t=g.current)||t.scrollTo({top:null==(e=g.current)?void 0:e.scrollHeight,behavior:"smooth"})})},d?2500:null);let S=()=>{u(!d)},b=c.filter(e=>W(e,h));return(0,l.jsx)("div",{className:"jobLogs-MsL4aJ",ref:g,children:c.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("ul",{className:"toolbar-duDU2f",children:[(0,l.jsx)("li",{children:(0,l.jsx)("input",{className:"searchBar-N4o70g",type:"text",placeholder:i("JOB.LOGS.FILTER_PLACEHOLDER"),value:x,onChange:e=>{let t=e.target.value;j(t),clearTimeout(v.current),v.current=setTimeout(()=>m(t),250)}})}),!a.finishedOn&&(0,l.jsx)("li",{children:(0,l.jsx)(p.$,{isActive:d,onClick:S,children:d?(0,l.jsx)($.E,{}):(0,l.jsx)(P.u,{})})}),(0,l.jsx)("li",{children:(0,l.jsx)(p.$,{onClick:(t=g.current,async()=>t&&document.fullscreenElement!==t?await t.requestFullscreen():document.exitFullscreen()),children:(0,l.jsx)(V.P,{})})}),(0,l.jsx)("li",{children:(0,l.jsx)(O,{textToCopy:b.map(e=>e.message).join("\n")})})]}),(0,l.jsx)("div",{className:"preWrapper-V9RpQs",children:(0,l.jsx)("pre",{children:(0,l.jsx)("ol",{style:{paddingInlineStart:`${`${b.length}`.length+1}ch`},children:b.map(e=>{var t,s;let a;return(0,l.jsxs)("li",{className:null==(a=null==(s=e.message)||null==(t=s.match(/((info|warn|error)?):/i))?void 0:t[1])?void 0:a.toLowerCase(),"data-line-number":`${e.lineNumber}.`,children:[e.message,(0,l.jsx)(O,{textToCopy:e.message,className:"logLineCopyButton-LnHhmG",tabIndex:-1})]},e.lineNumber)})})})})]}):(0,l.jsxs)("div",{className:"emptyState-W3badU",children:[i("JOB.NO_LOGS"),!a.finishedOn&&(0,l.jsx)(p.$,{isActive:d,onClick:S,children:d?(0,l.jsx)($.E,{}):(0,l.jsx)(P.u,{})})]})})},G=e=>{let{selectedTab:t,job:s,actions:a,status:i}=e,{t:c}=(0,r.Bd)(),{collapseJobData:o,collapseJobProgress:u,collapseJobOptions:m,collapseJobError:x,defaultCollapseDepth:j,useCollapsibleJson:g}=(0,h.C)(),[v,S]=(0,n.useState)({data:!1,progress:!1,options:!1,error:!1}),{stacktrace:b,data:w,returnValue:A,opts:T,failedReason:f}=s;switch(t){case"Data":if(o&&!v.data)return(0,l.jsxs)(p.$,{onClick:()=>S({...v,data:!0}),children:[c("JOB.SHOW_DATA_BTN")," ",(0,l.jsx)(d.y,{})]});return g?(0,l.jsx)(B,{data:{jobData:w,returnValue:A},defaultCollapseDepth:j}):(0,l.jsx)(N,{language:"json",text:JSON.stringify({jobData:w,returnValue:A},null,2)});case"Progress":if("number"==typeof s.progress||"boolean"==typeof s.progress||null===s.progress||void 0===s.progress)return(0,l.jsx)("div",{className:"error",children:c("JOB.NO_PROGRESS")});return u&&!v.progress?(0,l.jsxs)(p.$,{onClick:()=>S({...v,progress:!0}),children:[c("JOB.SHOW_PROGRESS_BTN")," ",(0,l.jsx)(d.y,{})]}):g?(0,l.jsx)(B,{data:s.progress,defaultCollapseDepth:j}):(0,l.jsx)(N,{language:"json",text:JSON.stringify(s.progress,null,2)});case"Options":if(m&&!v.options)return(0,l.jsxs)(p.$,{onClick:()=>S({...v,options:!0}),children:[c("JOB.SHOW_OPTIONS_BTN")," ",(0,l.jsx)(d.y,{})]});return g?(0,l.jsx)(B,{data:T,defaultCollapseDepth:j}):(0,l.jsx)(N,{language:"json",text:JSON.stringify(T,null,2)});case"Error":if(0===b.length)return(0,l.jsx)("div",{className:"error",children:f||c("JOB.NO_ERRORS")});return x&&!v.error?(0,l.jsxs)(p.$,{onClick:()=>S({...v,error:!0}),children:[c("JOB.SHOW_ERRORS_BTN")," ",(0,l.jsx)(d.y,{})]}):(0,l.jsx)(N,{language:"stacktrace",text:b.join("\n")},"stacktrace");case"Logs":return(0,l.jsx)(K,{actions:a,job:s});case"Timeline":return(0,l.jsx)(H,{job:s,status:i,className:"timeline-_2T35a"});default:return null}},Y=e=>{let{status:t,job:s,actions:a,withTimeline:n=!1}=e,{tabs:i,selectedTab:c}=(0,j.i)({currentStatus:t,withTimeline:n}),{t:o}=(0,r.Bd)();return 0===i.length?null:(0,l.jsxs)("div",{className:"details-LkCTWS",children:[(0,l.jsx)("ul",{className:"tabActions-fF3v6_",children:i.map(e=>(0,l.jsx)("li",{children:(0,l.jsx)(p.$,{onClick:e.selectTab,isActive:e.isActive,children:o(`JOB.TABS.${e.title.toUpperCase()}`)})},e.title))}),(0,l.jsx)("div",{className:"tabContent-qmHNgq",children:(0,l.jsx)(G,{selectedTab:c,job:s,actions:a,status:t})})]})};var Z=s(2206),Q=s(7320),q=s(56956);let X=e=>{let{title:t,children:s}=e;return(0,l.jsx)("span",{"data-title":t,className:"tooltip-QJB3Pz",children:s})},ee={updateData:{titleKey:"UPDATE_DATA",Icon:()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"})}),actionKey:"updateJobData"},promote:{titleKey:"PROMOTE",Icon:Z.G,actionKey:"promoteJob"},clean:{titleKey:"CLEAN",Icon:q.u,actionKey:"cleanJob"},retry:{titleKey:"RETRY",Icon:Q.m,actionKey:"retryJob"},duplicate:{titleKey:"DUPLICATE",Icon:()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"})}),actionKey:"duplicateJob"}},et={[a.STATUSES.failed]:[ee.retry,ee.duplicate,ee.updateData,ee.clean],[a.STATUSES.delayed]:[ee.promote,ee.duplicate,ee.updateData,ee.clean],[a.STATUSES.completed]:[ee.duplicate,ee.retry,ee.clean],[a.STATUSES.waiting]:[ee.duplicate,ee.updateData,ee.clean],[a.STATUSES.waitingChildren]:[ee.duplicate,ee.updateData,ee.clean],[a.STATUSES.prioritized]:[ee.duplicate,ee.updateData,ee.clean],[a.STATUSES.paused]:[ee.duplicate,ee.updateData,ee.clean]},es=e=>{let{actions:t,status:s,allowRetries:a}=e,n=et[s],{t:i}=(0,r.Bd)();return n?(a||(n=n.filter(e=>"retryJob"!==e.actionKey)),(0,l.jsx)("ul",{className:"jobActions-XfoQK8",children:n.map(e=>(0,l.jsx)("li",{children:(0,l.jsx)(X,{title:i(`JOB.ACTIONS.${e.titleKey}`),children:(0,l.jsx)(p.$,{onClick:t[e.actionKey],className:"button-GXX8BV",children:(0,l.jsx)(e.Icon,{})})})},e.titleKey))})):null},el=e=>{var t;let{progress:s,status:n,className:r,strokeWidth:i=6}=e,c="number"==typeof(t=s)?t:"string"==typeof t?Number.isNaN(+t)?null:+t:t&&"boolean"!=typeof t&&"progress"in t&&"number"==typeof t.progress?t.progress:null;if(!c)return null;let o={cx:"50%",cy:"50%",r:`calc(50% - ${i/2}px)`,strokeWidth:i,"transform-origin":"center"};return(0,l.jsxs)("svg",{className:(0,g.A)("progress-Rr7sCM",r),width:"100%",height:"100%",children:[(0,l.jsx)("circle",{...o}),(0,l.jsx)("circle",{className:(0,g.A)({"failed-rTUpGj":n===a.STATUSES.failed,"success-RY6h2q":n!==a.STATUSES.failed}),pathLength:100,strokeDasharray:100,strokeDashoffset:100-c,strokeLinejoin:"round",strokeLinecap:"round",transform:"rotate(-90)",...o}),(0,l.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"central",children:(0,l.jsx)("tspan",{dominantBaseline:"central",children:`${Math.round(c)}%`})})]})};var ea=s(51529);let en=[a.STATUSES.active,a.STATUSES.completed],er=e=>{var t,s,j,g,v,S;let{job:b,status:w,actions:A,readOnlyMode:T,allowRetries:N,jobUrl:f}=e,{t:y}=(0,r.Bd)(),{collapseJob:O}=(0,h.C)(),C=(0,c.I)(),[L,B]=n.useState(),E=!f||L||!O,I=O&&f,J=/^\d+$/.test(`${b.id}`)?"#":"",D=`${b.id}`.length<=8;return(0,l.jsx)(x.bL,{asChild:!0,open:E,children:(0,l.jsxs)(o.Z,{className:ea.A.card,children:[(0,l.jsxs)("div",{className:ea.A.header,children:[(0,l.jsxs)("div",{className:ea.A.titleWithLink,children:[f?(0,l.jsxs)(i.N_,{className:ea.A.jobLink,to:f,children:[(0,l.jsxs)("span",{className:ea.A.jobId,children:[J,b.id]}),D&&(0,l.jsx)("span",{className:ea.A.jobNameInline,children:b.name})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:ea.A.statusDot,style:{backgroundColor:`var(--${w})`}}),(0,l.jsxs)("span",{className:ea.A.jobId,children:[J,b.id]}),D&&(0,l.jsx)("span",{className:ea.A.jobNameInline,children:b.name})]}),b.externalUrl&&(0,l.jsx)("a",{className:ea.A.externalLink,href:b.externalUrl.href,target:"_blank",rel:"noopener noreferrer",children:b.externalUrl.displayText??(0,l.jsx)(u,{})})]}),(0,l.jsxs)("div",{className:ea.A.headerActions,children:[!T&&(0,l.jsx)(es,{status:w,actions:A,allowRetries:N}),I&&(0,l.jsx)(p.$,{className:ea.A.collapseBtn,onClick:()=>B(!E),children:E?(0,l.jsx)(m,{}):(0,l.jsx)(d.y,{})})]})]}),(0,l.jsx)(x.UC,{asChild:!0,children:(0,l.jsxs)("div",{className:ea.A.details,children:[!C&&(0,l.jsx)("div",{className:ea.A.sideInfo,children:(0,l.jsx)(H,{job:b,status:w})}),(0,l.jsxs)("div",{className:ea.A.contentWrapper,children:[!D&&(0,l.jsxs)("h5",{className:ea.A.jobName,children:[b.name,b.attempts>1&&(0,l.jsx)("span",{children:y("JOB.ATTEMPTS",{attempts:b.attempts})}),!!(null==(s=b.opts)||null==(t=s.repeat)?void 0:t.count)&&(0,l.jsx)("span",{children:y(`JOB.REPEAT${(null==(g=b.opts)||null==(j=g.repeat)?void 0:j.limit)?"_WITH_LIMIT":""}`,{count:b.opts.repeat.count,limit:null==(S=b.opts)||null==(v=S.repeat)?void 0:v.limit})})]}),(0,l.jsx)("div",{className:ea.A.content,children:(0,l.jsx)(Y,{status:w,job:b,actions:A,withTimeline:C})}),(0,l.jsx)(el,{progress:b.progress,status:b.isFailed&&!en.includes(w)?a.STATUSES.failed:w,className:ea.A.progress})]})]})})]})})}},64771(e,t,s){s.d(t,{V:()=>a});var l=s(31085);s(14041);let a=e=>{let{actions:t,children:s}=e;return(0,l.jsxs)("div",{className:"stickyHeader-Woc0cg",children:[s,!!t&&(0,l.jsx)("div",{className:"actionContainer-gipYSV",children:t})]})}},27384(e,t,s){s.d(t,{W:()=>a});var l=s(86090);function a(){let{pathname:e}=(0,l.zy)(),t=(0,l.B6)(e,{path:["/queue/:name/:jobId"],exact:!1,strict:!1});return decodeURIComponent((null==t?void 0:t.params.jobId)||"")}},15510(e,t,s){s.d(t,{d:()=>r,i:()=>i});var l=s(40555),a=s(14041),n=s(40783);let r=["Data","Progress","Options","Logs","Error","Timeline"];function i(e){let[t,s]=(0,a.useState)([]),{defaultJobTab:i}=(0,n.C)(),[c,o]=(0,a.useState)(t.find(e=>e===i)||t[0]);return(0,a.useEffect)(()=>{let t=r.filter(e=>"Error"!==e&&"Timeline"!==e);t=e.currentStatus===l.STATUSES.failed?["Error",...t]:[...t,"Error"],e.withTimeline&&t.push("Timeline"),s(t)},[e.currentStatus,e.withTimeline]),(0,a.useEffect)(()=>{o(t.includes(i)?i:t[0])},[i,t]),{tabs:null==t?void 0:t.map(e=>({title:e,isActive:e===c,selectTab:()=>o(e)})),selectedTab:c}}},96587(e,t,s){s.d(t,{J:()=>p});var l=s(42348),a=s(85865),n=s(83839),r=s(27384),i=s(20050),c=s(36784),o=s(86052),d=s(26347),u=s(87106),h=s(40783);let m=(0,a.vt)(e=>({job:null,status:"latest",loading:!0,updateJob:(t,s)=>e(()=>({job:t,status:s,loading:!1}))}));function p(){let e=(0,c.g)(),t=(0,i._)(),s=(0,r.W)(),{actions:{updateQueues:a}}=(0,u.A)(),{t:p}=(0,l.Bd)(),{confirmJobActions:x,pollingInterval:j}=(0,h.C)(e=>{let{confirmJobActions:t,pollingInterval:s}=e;return{confirmJobActions:t,pollingInterval:s}}),{job:g,status:v,loading:S,updateJob:b}=m(e=>e),{openConfirm:w}=(0,o.S)(),A=()=>e.getJob(t,s).then(e=>{let{job:t,status:s}=e;return b(t,s)}),T=(0,n.A)(s?A:a,w);return{job:g,status:v,loading:S,actions:{getJob:A,pollJob:()=>(0,d.$)(A,j>0?1e3*j:null,[t]),promoteJob:t=>s=>T(()=>e.promoteJob(t,s.id),p("JOB.ACTIONS.CONFIRM.PROMOTE"),x),cleanJob:t=>s=>T(()=>e.cleanJob(t,s.id),p("JOB.ACTIONS.CONFIRM.CLEAN"),x),getJobLogs:t=>s=>()=>e.getJobLogs(t,s.id),retryJob:t=>s=>T(()=>e.retryJob(t,s.id),p("JOB.ACTIONS.CONFIRM.RETRY"),x),updateJobData:(t,s,l)=>T(()=>e.updateJobData(t,s.id,l),"",!1)}}}}}]);