UNPKG

@bull-board/ui

Version:

A Dashboard UI built on top of bull or bullmq.

1 lines 2.25 kB
"use strict";(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["58975"],{79778(e,l,n){n.d(l,{ConcurrencyModal:()=>o});var r=n(31085),a=n(14041),s=n(42348),c=n(87106),t=n(84382),i=n(1701),d=n(80760);let o=e=>{let{open:l,onClose:n,queue:o}=e,{actions:h}=(0,c.A)(),{t:u}=(0,s.Bd)(),[C,m]=(0,a.useState)(null!=o.globalConcurrency?String(o.globalConcurrency):""),x=async e=>{e.preventDefault();let l=""===C?0:parseInt(C,10);isNaN(l)||l<0||(await h.setGlobalConcurrency(o.name,l)(),n())};return(0,r.jsx)(d.a,{width:"small",open:l,onClose:n,title:u("CONCURRENCY.TITLE"),actionButton:(0,r.jsx)(t.$,{type:"submit",theme:"primary",form:"concurrency-form",children:u("CONCURRENCY.SAVE")}),children:(0,r.jsxs)("form",{id:"concurrency-form",onSubmit:x,children:[(0,r.jsx)("p",{children:u("CONCURRENCY.DESCRIPTION")}),(0,r.jsx)(i.F,{label:u("CONCURRENCY.CONCURRENCY"),id:"concurrency",name:"concurrency",type:"number",min:0,value:C,onChange:e=>m(e.target.value)})]})})}},18407(e,l,n){n.d(l,{D:()=>s});var r=n(31085),a=n(54357);n(14041);let s=e=>{let{label:l,id:n,inline:s,children:c}=e;return(0,r.jsxs)("div",{className:(0,a.A)("field-JbAWJt",{"inline-vXG0Za":s}),children:[!!l&&!s&&(0,r.jsx)("label",{htmlFor:n,children:l}),c,!!l&&s&&(0,r.jsx)("label",{htmlFor:n,children:l})]})}},1701(e,l,n){n.d(l,{F:()=>s});var r=n(31085);n(14041);var a=n(18407);let s=e=>{let{label:l,id:n,...s}=e;return(0,r.jsx)(a.D,{label:l,id:n,children:(0,r.jsx)("input",{id:n,type:"text",...s})})}},80760(e,l,n){n.d(l,{a:()=>d});var r=n(31085),a=n(23157),s=n(54357);n(14041);var c=n(42348),t=n(84382),i=n(43697);let d=e=>{let{open:l,title:n,onClose:d,children:o,width:h,actionButton:u}=e,{t:C}=(0,c.Bd)();return(0,r.jsx)(a.bL,{open:l,modal:!0,onOpenChange:e=>{e||d()},children:(0,r.jsxs)(a.ZL,{children:[(0,r.jsx)(a.hJ,{className:i.A.overlay}),(0,r.jsx)("div",{className:i.A.contentWrapper,children:(0,r.jsxs)(a.UC,{className:(0,s.A)(i.A.content,i.A[h||""]),children:[!!n&&(0,r.jsx)(a.hE,{children:n}),(0,r.jsx)(a.VY,{asChild:!0,children:(0,r.jsx)("div",{className:i.A.description,children:o})}),(0,r.jsxs)("div",{className:i.A.actions,children:[u,(0,r.jsx)(a.bm,{asChild:!0,children:(0,r.jsx)(t.$,{theme:"basic",children:C("MODAL.CLOSE_BTN")})})]})]})})]})})}}}]);