static.assets.Queue.741dac4d.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redismq-server Show documentation
Show all versions of redismq-server Show documentation
redismq server and console
The newest version!
/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{m as L,i as re,n as s,p as m,q as pe,s as ce,t as me,v as ge,x as be,y as fe,o as p,b as k,e as u,w as t,F as C,z as $,f as c,A as De,B as ve,d as R,C as _e,D as Fe,G as ye,H as xe,I as ke,J as Ce,K as Ve,L as qe,M as Ee,N as we,O as T}from"./index.9c8ed6dc.js";/* empty css */const h={success(){L({message:"\u64CD\u4F5C\u6210\u529F",type:"success"})},error(){L({message:"\u64CD\u4F5C\u5931\u8D25",type:"fail"})}},Me={class:"block"},Be={class:"queue-table"},Le=re({__name:"Queue",setup($e){const{proxy:i}=ye();let g=s(!1);s("add");const v=s([]),P=s([]),z=s([{id:""},{key:""},{tag:""},{consumeTime:""}]),I=m([{prop:"id",label:"\u6D88\u606Fid"},{prop:"key",label:"\u6D88\u606F\u952E"},{prop:"tag",label:"\u6807\u7B7E"},{prop:"consumeTime",label:"\u6D88\u8D39\u65F6\u95F4"}]),S=m([{prop:"queueName",label:"\u865A\u62DF\u961F\u5217\u540D\u79F0"},{prop:"size",label:"\u5B9E\u65F6\u6D88\u606F\u6570\u91CF"}]),H=m([{prop:"queueName",label:"\u961F\u5217\u540D\u79F0"},{prop:"retryMax",label:"\u6D88\u8D39\u5931\u8D25\u91CD\u8BD5\u6B21\u6570"},{prop:"retryInterval",label:"\u91CD\u8BD5\u65F6\u95F4\u95F4\u9694"},{prop:"ackMode",label:"ack\u6A21\u5F0F"},{prop:"concurrency",label:"\u5E76\u53D1\u6D88\u8D39\u8005"},{prop:"maxConcurrency",label:"\u6700\u5927\u5E76\u53D1\u6D88\u8D39\u8005"},{prop:"virtual",label:"\u865A\u62DF\u961F\u5217\u6570\u91CF"},{prop:"queueMaxSize",label:"\u961F\u5217\u5BB9\u91CF"}]),n=m({queue:"",tag:"",body:"",consumeTime:0}),V=s(),_=s(!1),q=s(!1),E=s(!1),F=s(!1),w=s([]),N=s([]),G=()=>{const l={...n};l.consumeTime=new Date(l.consumeTime).getTime(),F.value?le(l):ae(l),i.$refs.sendMessageFormRef.resetFields(),_.value=!1,h.success()},J=(l,e)=>{l.props.name=="queue"?(v.value=w.value,F.value=!1):(v.value=N.value,F.value=!0)},K=()=>{i.$refs.sendMessageFormRef.resetFields()},O=l=>{b.page=l,Q(b)},j=l=>{d.page=l,M(d)},W=(l,e)=>{V.value=e.body,E.value=!0},X=(l,e)=>{g.value=!0,console.log(e),Y({queueName:e.queueName,virtual:e.virtual})},Y=async l=>{let e=await i.$api.mq.vQueueList(l);P.value=e,console.log(e)},Z=(l,e)=>{_.value=!0,n.queue=e.queueName},ee=(l,e)=>{q.value=!0,d.virtualQueueName=e.queueName,M(d)},ae=async l=>{await i.$api.mq.sendMessage(l)},le=async l=>{await i.$api.mq.sendTimingMessage(l)},M=async l=>{console.log(l);let e=await i.$api.mq.pageMessage(l);z.value=e.list,l.total=e.total,console.log(e)},ue=async l=>{await i.$api.mq.deleteMessage(l),M(d)},te=async l=>{const e={vQueue:l};await i.$api.mq.publishPullMessage(e),h.success()},oe=async(l,e)=>{te(e.queueName)},d=m({page:1,size:10,total:0,virtualQueueName:""}),b=m({page:1,size:10,total:0}),se=(l,e)=>{xe.confirm("\u4F60\u786E\u5B9A\u5220\u9664\u6D88\u606F\u5417?",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}).then(()=>{ue(e),h.success()}).catch(()=>{})};pe(()=>{Q(b)});const Q=async l=>{let e=await i.$api.mq.queueList(l);e.forEach(o=>{o.ackMode=o.ackMode=="maual"?"\u624B\u52A8":"\u81EA\u52A8",o.retryInterval=o.retryInterval+"ms"}),e.forEach(o=>{o.delayState==!1?w.value.push(o):o.delayState==!0&&N.value.push(o)}),v.value=w.value};return(l,e)=>{const o=ke,r=Ce,B=Ve,y=qe,f=Ee,ne=ce,ie=we,x=me,A=ge,U=be,de=fe;return p(),k(C,null,[u(x,{class:"queue-dialog",modelValue:_e(g),"onUpdate:modelValue":e[9]||(e[9]=a=>Fe(g)?g.value=a:g=a),style:{width:"50%",height:"50%"}},{footer:t(()=>[]),default:t(()=>[u(B,{data:P.value},{default:t(()=>[(p(!0),k(C,null,$(S,a=>(p(),T(o,{key:a.prop,label:a.label,prop:a.prop},null,8,["label","prop"]))),128)),u(o,{fixed:"right",width:"300px",label:"\u64CD\u4F5C"},{default:t(a=>[u(r,{size:"small",onClick:D=>ee(a.$index,a.row)},{default:t(()=>[c("\u961F\u5217\u6D88\u606F")]),_:2},1032,["onClick"]),u(r,{size:"small",onClick:D=>Z(a.$index,a.row)},{default:t(()=>[c("\u53D1\u9001\u6D88\u606F")]),_:2},1032,["onClick"]),u(r,{type:"danger",size:"small",onClick:D=>oe(a.$index,a.row)},{default:t(()=>[c("\u62C9\u53D6\u6D88\u606F")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u(x,{modelValue:_.value,"onUpdate:modelValue":e[4]||(e[4]=a=>_.value=a),width:"50%",title:"\u53D1\u9001\u6D88\u606F","append-to-body":"",onClose:e[5]||(e[5]=a=>K())},{default:t(()=>[u(ie,{ref:"sendMessageFormRef",model:n,"label-width":"120px"},{default:t(()=>[u(f,{label:"\u865A\u62DF\u961F\u5217",prop:"queue",required:""},{default:t(()=>[u(y,{modelValue:n.queue,"onUpdate:modelValue":e[0]||(e[0]=a=>n.queue=a)},null,8,["modelValue"])]),_:1}),u(f,{label:"\u6807\u7B7E",prop:"tag"},{default:t(()=>[u(y,{modelValue:n.tag,"onUpdate:modelValue":e[1]||(e[1]=a=>n.tag=a)},null,8,["modelValue"])]),_:1}),u(f,{label:"\u6D88\u606F\u4F53",prop:"body",required:""},{default:t(()=>[u(y,{modelValue:n.body,"onUpdate:modelValue":e[2]||(e[2]=a=>n.body=a),type:"textarea",autosize:{minRows:4}},null,8,["modelValue"])]),_:1}),De(u(f,{label:"\u6D88\u8D39\u65F6\u95F4",prop:"consumeTime"},{default:t(()=>[R("div",Me,[u(ne,{modelValue:n.consumeTime,"onUpdate:modelValue":e[3]||(e[3]=a=>n.consumeTime=a),type:"datetime",placeholder:"\u8BF7\u9009\u62E9\u6D88\u8D39\u65F6\u95F4"},null,8,["modelValue"])])]),_:1},512),[[ve,F.value]]),u(f,null,{default:t(()=>[u(r,{type:"primary",onClick:G},{default:t(()=>[c("\u53D1\u9001")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),u(x,{modelValue:q.value,"onUpdate:modelValue":e[8]||(e[8]=a=>q.value=a),width:"80%",title:"\u6D88\u606F\u5217\u8868","append-to-body":""},{default:t(()=>[u(B,{data:z.value},{default:t(()=>[(p(!0),k(C,null,$(I,a=>(p(),T(o,{key:a.prop,label:a.label,prop:a.prop},null,8,["label","prop"]))),128)),u(o,{fixed:"right",width:"200px",label:"\u64CD\u4F5C"},{default:t(a=>[u(r,{size:"small",color:"#009688",onClick:D=>W(a.$index,a.row)},{default:t(()=>[c("\u67E5\u770B")]),_:2},1032,["onClick"]),u(r,{type:"danger",size:"small",onClick:D=>se(a.$index,a.row)},{default:t(()=>[c("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u(A,{background:"",layout:"prev, pager, next",total:d.total,"current-page":d.page,"onUpdate:currentPage":j},null,8,["total","current-page"]),u(x,{modelValue:E.value,"onUpdate:modelValue":e[7]||(e[7]=a=>E.value=a),width:"80%",title:"\u6D88\u606F\u8BE6\u60C5","append-to-body":""},{default:t(()=>[u(y,{modelValue:V.value,"onUpdate:modelValue":e[6]||(e[6]=a=>V.value=a),autosize:{minRows:4,maxRows:20},type:"textarea",placeholder:"Please input",disabled:""},null,8,["modelValue"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),u(de,{type:"card",class:"demo-tabs",onTabClick:J},{default:t(()=>[u(U,{label:"\u666E\u901A\u961F\u5217",name:"queue"}),u(U,{label:"\u5EF6\u65F6\u961F\u5217",name:"delayQueue"})]),_:1}),R("div",Be,[u(B,{data:v.value,style:{width:"100%"},height:"700px",border:"","header-cell-style":{background:"#fff !important",color:"#000 !important","text-align":"center","font-size":"15px","font-weight":"700"},"row-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}},{default:t(()=>[(p(!0),k(C,null,$(H,a=>(p(),T(o,{key:a.prop,label:a.label,prop:a.prop},null,8,["label","prop"]))),128)),u(o,{fixed:"right",width:"200px",label:"\u64CD\u4F5C"},{default:t(a=>[u(r,{size:"default",onClick:D=>X(a.$index,a.row)},{default:t(()=>[c("\u8BE6\u60C5")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u(A,{background:"",layout:"prev, pager, next",total:b.total,"current-page":b.page,"onUpdate:currentPage":O},null,8,["total","current-page"])])],64)}}});export{Le as default};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy