build/static/js/96.d770512c.chunk.js

1 line
20 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(this.webpackJsonp=this.webpackJsonp||[]).push([[96],{"0fBl":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=o(a("2/Rp"));a("L/Qf");var n=o(a("q1tI")),r=a("spEH"),u=o(a("/k9T"));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.visible,a=e.onCancel,o=e.onSuccess,c=e.title,s=e.subTitle,f=e.content;return n.default.createElement(u.default,{title:c,btn:n.default.createElement("div",null,n.default.createElement(l.default,{size:"large",onClick:a},"取消"),n.default.createElement(l.default,{type:"danger",size:"large",onClick:o},"确认删除")),onCancel:a,visible:t},n.default.createElement("div",{className:"desc"},n.default.createElement(r.AlignCenter,{className:"descMain"},n.default.createElement("i",{className:"iconfont icon-shanchu_tc_icon mr10"}),f),n.default.createElement("p",{className:"task-hide-2",style:{WebkitLineClamp:5}},"删除后未来事件将不会推送至此Webhook地址",n.default.createElement("span",{title:s},s))))}},"33p7":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(a("mr32")),n=i(a("BvKs")),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],l=!0,n=!1,r=void 0;try{for(var u,o=e[Symbol.iterator]();!(l=(u=o.next()).done)&&(a.push(u.value),!t||a.length!==t);l=!0);}catch(e){n=!0,r=e}finally{try{!l&&o.return&&o.return()}finally{if(n)throw r}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};a("0lcf"),a("2WkQ");var o=a("q1tI"),c=i(o),s=i(a("2CTR")),f=i(a("ovOe")),d=i(a("g1a4"));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.request_content,a=e.payload_content,i=e.response_content,m=(0,o.useState)("request"),p=u(m,2),v=p[0],h=p[1],A=(0,o.useState)(void 0),E=u(A,2),b=E[0],y=E[1],g=(0,o.useState)(void 0),K=u(g,2),L=K[0],N=K[1];return(0,o.useEffect)((function(){if(t){var e=[];Object.keys(t).map((function(a,l){e.push({name:a,value:t[a],k:l})})),y(e)}}),[t]),(0,o.useEffect)((function(){if(i&&i.headers){var e=[];Object.keys(i.headers).map((function(t,a){e.push({name:t,value:i.headers[t],k:a})})),N(e)}}),[i]),c.default.createElement("div",{className:"contentPanel"},c.default.createElement("div",null,c.default.createElement(n.default,{selectedKeys:[v],onSelect:function(e){return h(e.key)},mode:"horizontal",className:"contentMenu"},c.default.createElement(n.default.Item,{key:"request"},c.default.createElement("i",{className:"iconfont icon-qingqiuicon font-15 mr5"}),"请求内容"),c.default.createElement(n.default.Item,{key:"response"},c.default.createElement("i",{className:"iconfont icon-xiangyingicon font-16 mr5"}),"响应内容",i&&c.default.createElement(l.default,{color:200===i.status?"#2DB44D":"#CA0002",style:{margin:"0px",marginLeft:"3px",fontSize:"12px"}},i.status)))),c.default.createElement("div",{style:{paddingLeft:"16px"}},"request"===v?c.default.createElement("div",null,b&&b.length>0&&c.default.createElement("div",null,c.default.createElement("p",{className:"retitle"},"头信息"),c.default.createElement("div",{className:"con"},b.map((function(e,t){return c.default.createElement("p",null,c.default.createElement("span",null,e.name,": "),c.default.createElement("span",null,e.value))})))),a&&c.default.createElement("div",null,c.default.createElement("p",{className:"retitle"},"内容"),c.default.createElement("div",{className:"con"},c.default.createElement(f.default,{src:a,name:!1,displayObjectSize:!1,displayDataTypes:!1,enableClipboard:!1})))):c.default.createElement("div",null,L||(!i||i.body)&&i?"":c.default.createElement(s.default,{_html:"暂无数据~"}),L&&L.length>0&&c.default.createElement("div",null,c.default.createElement("p",{className:"retitle"},"头信息"),c.default.createElement("div",{className:"con"},L.map((function(e,t){return c.default.createElement("p",null,c.default.createElement("span",null,e.name,": "),c.default.createElement("span",null,e.value))})))),i&&i.body&&c.default.createElement("div",null,c.default.createElement("p",{className:"retitle"},"响应体"),function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!==(void 0===t?"undefined":r(t))||!t)}catch(e){return!1}}(i.body)?c.default.createElement("div",{className:"con"},c.default.createElement(f.default,{enableClipboard:!1,src:JSON.parse(i.body),name:!1,displayObjectSize:!1,displayDataTypes:!1})):c.default.createElement("div",{className:"conEditor"},c.default.createElement(d.default,{value:i.body}))))))}},MKhi:function(e,t,a){},Olh8:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(a("3S7+")),n=i(a("2/Rp")),r=i(a("gK9i")),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],l=!0,n=!1,r=void 0;try{for(var u,o=e[Symbol.iterator]();!(l=(u=o.next()).done)&&(a.push(u.value),!t||a.length!==t);l=!0);}catch(e){n=!0,r=e}finally{try{!l&&o.return&&o.return()}finally{if(n)throw r}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};a("TfFZ"),a("L/Qf"),a("GRva");var o=a("q1tI"),c=i(o),s=i(a("vDqi")),f=i(a("33p7")),d=i(a("SAFV"));function i(e){return e&&e.__esModule?e:{default:e}}var m=r.default.Panel;t.default=function(e){var t=e.id,a=e.owner,i=e.projectsId,p=e.showNotification,v=(0,o.useState)(void 0),h=u(v,2),A=h[0],E=h[1],b=(0,o.useState)(!1),y=u(b,2),g=y[0],K=y[1];function L(){var e="/"+a+"/"+i+"/webhooks/"+t+"/tasks.json";s.default.get(e,{params:{page:1,limit:10}}).then((function(e){e&&e.data&&(E(e.data.tasks),K(!1))})).catch((function(e){}))}return(0,o.useEffect)((function(){t&&a&&i&&L()}),[t,a,i]),c.default.createElement("div",{className:"pt30"},c.default.createElement("div",{className:"deschead"},c.default.createElement("span",{className:"font-16"},"最近推送历史"),c.default.createElement("span",null,c.default.createElement("a",{className:"color-blue",onClick:L},"刷新"),c.default.createElement(n.default,{type:"primary",className:"ml20",onClick:function(){K(!0);var e="/"+a+"/"+i+"/webhooks/"+t+"/test.json";s.default.post(e).then((function(e){e&&e.data&&(p("测试推送已经加入到队列,请耐心等待数秒再刷新推送记录!"),K(!1))})).catch((function(e){K(!1)}))},loading:g},"测试推送"))),A&&A.length>0&&c.default.createElement(r.default,{accordion:!0,bordered:!1,className:"historyColl"},A.map((function(e,t){return c.default.createElement(m,{header:c.default.createElement("div",{className:"panelHeader"},e.is_succeed?c.default.createElement(l.default,{title:c.default.createElement("span",{className:"pl20 pr20"},"响应成功,类型:",e.response_content&&e.response_content.status)},c.default.createElement("i",{className:"iconfont icon-chenggongicon font-14 mr10",style:{color:"#2DB44D"}})):c.default.createElement("img",{src:d.default,alt:"",className:"mr10",height:"15px",style:{marginTop:"2px"}}),c.default.createElement("span",{className:"name"},e.uuid),c.default.createElement("span",{className:"time"},e.delivered_time))},c.default.createElement(f.default,{request_content:e.request_content&&e.request_content.headers,payload_content:e.payload_content,response_content:e.response_content}))}))))}},SAFV:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOkAAADICAMAAAA6GTZCAAABVlBMVEUAAADHAADKAALMAADKAAPKAALKAALKAALKAAPKAADLAALKAAPKAAHKAALKAALKAALKAALMAADLAADKAAHKAALJAATKAADLAADKAALLAALKAAPKAAHKAALLAALKAALLAAPKAADKAADKAADLAALKAALKAALKAALLAALKAALKAALKAALKAALKAADDAADKAALKAAHLAALKAAPKAAPLAADLAADHAADKAALKAALKAALKAAPNAATKAAL////SJynyv7/lgIDQHR/PFxn319fzxcXfZmfMBQf87+/1zs7xt7jniYnjd3jWODrNDQ/65+feX2DdV1jXP0DVNDbULzH32dn0yMjurq/tpqfqmJnojo/gamvaTU/ZR0j99/f77Oz54+P439/vs7Trn6DplJXicHLhbm/bT1D20dHuq6zqnJ3mhYbk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Y7y3EGSstdTcRgwLrrSAOneYPvPK2zG+n8hpJpxuxWGGdF4hFV6t5yiVvjst7/BHx6DD/0iBvh8sbRUyqLeIJOfNczj3EJUPlZRCbZ1xaEfHJlm9vIEbvuJR3iNEpixRR0qjhf1TeISqnDbGaCvbwJx4gVm3lZ7SI2dQW79n8sIR43aCyLiFu6+8nJx7z44nJ+TXES39780iSbu3H3iRp0ZUEM0iQNn1LMDka9BNTJMeIaaeXFM1k0I1kqCaTLJKhjowOIwmGKIRsA3zXd5r2JPm9psmiddXYBV91NXaSjdaOah8/L2W6O1rJXvbUIb9cy1IqlUqlXPIDeffSKEgJ5KEAAAAASUVORK5CYII="},g1a4:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l,n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},r=a("q1tI"),u=(l=r)&&l.__esModule?l:{default:l},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(a("M/lh"));a("KkuB"),t.default=function(e){var t=e.style,a=void 0===t?{height:"400px"}:t,l=e.value,c=void 0===l?"":l,s=e.onChange,f=void 0===s?function(){}:s,d=e.fontSize,i=void 0===d?14:d,m=e.monacoOptions,p=void 0===m?{scrollBeyondLastLine:!1,lineNumbers:"off",wordWrap:!0,overviewRulerBorder:!0,lineHeight:24,readOnly:!0}:m,v=e.language,h=void 0===v?"html":v,A=(0,r.useRef)(),E=(0,r.useRef)();return(0,r.useEffect)((function(){return E.current=o.editor.create(A.current,n({value:c||"",language:h,theme:"vs-grey",fontSize:i+"px",minimap:{enabled:!1}},p)),E.current.onDidChangeModelContent((function(e){var t=E.current.getValue();f(t)})),function(){E.current.dispose(),E.current=void 0}}),[]),(0,r.useEffect)((function(){E.current&&E.current.updateOptions({fontSize:i+"px"})}),[i]),u.default.createElement("div",{style:a,ref:A})}},gfxg:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=E(a("2/Rp")),n=E(a("kaz8")),r=E(a("9yH6")),u=E(a("2fM7")),o=E(a("Vl3Y")),c=E(a("5rEg")),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},f=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],l=!0,n=!1,r=void 0;try{for(var u,o=e[Symbol.iterator]();!(l=(u=o.next()).done)&&(a.push(u.value),!t||a.length!==t);l=!0);}catch(e){n=!0,r=e}finally{try{!l&&o.return&&o.return()}finally{if(n)throw r}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};a("L/Qf"),a("MKzF"),a("K4yd"),a("8QGh"),a("tULf"),a("1vPl");var d=a("q1tI"),i=E(d),m=a("spEH"),p=a("eO8H"),v=E(a("vDqi")),h=E(a("Olh8")),A=E(a("0fBl"));function E(e){return e&&e.__esModule?e:{default:e}}a("MKhi");var b=["create","delete","push","pull_request_assign","pull_request_review","pull_request_only"];t.default=o.default.create()((0,d.forwardRef)((function(e){var t=e.form,a=e.match,E=e.showNotification,y=e.history,g=(0,d.useState)("POST"),K=f(g,2),L=K[0],N=K[1],S=(0,d.useState)("json"),w=f(S,2),D=w[0],O=(w[1],(0,d.useState)("push")),k=f(O,2),I=k[0],j=k[1],q=(0,d.useState)(["push"]),C=f(q,2),U=C[0],P=C[1],W=(0,d.useState)(!1),M=f(W,2),_=M[0],x=M[1],T=(0,d.useState)(void 0),J=f(T,2),V=J[0],z=J[1],R=(0,d.useState)(!1),H=f(R,2),G=H[0],B=H[1],F=t.getFieldDecorator,Q=t.validateFields,X=t.setFieldsValue,Z=a.params,Y=Z.id,$=Z.owner,ee=Z.projectsId;function te(e){if(e&&e.length>0)return 1===e.length&&"push"===e[0]?(P(["push"]),"push"):e.length===b.length?(P(b),"all"):(P([]),"forevent")}(0,d.useEffect)((function(){if(Y)t="/"+$+"/"+ee+"/webhooks/"+Y+"/edit.json",v.default.get(t).then((function(e){if(e){var t=te(e.data.events);X(s({},e.data,{eventCondition:t,active:e.data.is_active})),z(e.data),N(e.data.http_method),j(t),P(e.data.events)}})).catch((function(e){}));else{var e=te(U);j(e),X({url:"",secret:"",http_method:L,content_type:D,eventCondition:I,event:U,branch_filter:"*",active:!0})}var t}),[Y]);var ae={display:"block",height:"30px",lineHeight:"30px"};return i.default.createElement("div",{className:"newPanel"},i.default.createElement(A.default,{visible:_,onCancel:function(){return x(!1)},onSuccess:function(){if(Y){var e="/"+$+"/"+ee+"/webhooks/"+Y+".json";v.default.delete(e).then((function(e){e&&(E("webhook删除成功"),y.push("/"+$+"/"+ee+"/settings/webhooks"))})).catch((function(e){}))}},title:"删除Webhook",content:"您确定要删除此Webhook吗",subTitle:""+(V&&V.url)}),i.default.createElement(m.Banner,null,i.default.createElement("span",null,i.default.createElement(p.Link,{to:"/"+$+"/"+ee+"/settings/webhooks",className:"color-blue"},"Webhooks"),i.default.createElement("i",{className:"iconfont icon-youjiantou ml5 mr5 font-12"}),i.default.createElement("span",null,Y?"更新":"添加","Webhook"))),i.default.createElement("div",null,i.default.createElement("p",{className:"deschead mg"},i.default.createElement("span",null,"当webhook被触发时我们将向以下URL发送通知包括已选择事件的详细信息。更多信息可查阅",i.default.createElement("a",{className:"color-blue hoverLine",target:"_blank",href:"https://forum.trustie.net/forums/3408/detail"},"webhooks指南"),"。")),i.default.createElement(o.default,null,i.default.createElement("input",{type:"password",style:{display:"none"}}),i.default.createElement(o.default.Item,{label:"目标URL",colon:!1},F("url",{rules:[{required:!0,message:"请输入目标URL"},{validator:function(e,t,a){t||a(),/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(t)||a("请输入有效的URL"),a()}}]})(i.default.createElement(c.default,{placeholder:"请输入目标URL",maxLength:"100",size:"large",autocomplete:"off"}))),i.default.createElement(o.default.Item,{label:"Webhook密钥",colon:!1},F("secret",{rules:[]})(i.default.createElement(c.default.Password,{placeholder:"请输入Webhook密钥",autocomplete:"new-password",size:"large",maxLength:"50"}))),i.default.createElement(o.default.Item,{label:"Http请求方法",colon:!1},F("http_method",{rules:[]})(i.default.createElement(u.default,{onSelect:function(e){N(e)},size:"large"},i.default.createElement(u.default.Option,{value:"GET"},"GET"),i.default.createElement(u.default.Option,{value:"POST"},"POST")))),i.default.createElement(o.default.Item,{label:"POST请求类型",colon:!1,style:{display:"POST"===L?"block":"none"}},F("content_type",{rules:[]})(i.default.createElement(u.default,{size:"large"},i.default.createElement(u.default.Option,{value:"json"},"application/json"),i.default.createElement(u.default.Option,{value:"form"},"application/x-www-form-urlencoded")))),i.default.createElement(o.default.Item,{label:"您希望哪些事件触发此webhook",colon:!1,className:"topLine"},F("eventCondition",{rules:[]})(i.default.createElement(r.default.Group,{onChange:function(e){j(e.target.value),"push"===e.target.value?P(["push"]):"all"===e.target.value?P(b):P([])}},i.default.createElement(r.default,{style:ae,value:"push"},"只是push事件"),i.default.createElement(r.default,{style:ae,value:"all"},"所有事件"),i.default.createElement(r.default,{style:ae,value:"forevent"},"自定义事件")))),i.default.createElement("div",{className:"eventCb",style:{display:"forevent"===I?"block":"none"}},i.default.createElement(n.default.Group,{value:U,onChange:function(e){P(e)}},i.default.createElement("p",{className:"color-grey-3 mb10"},"代码库事件"),i.default.createElement("div",{className:"colSpan"},i.default.createElement("span",null,i.default.createElement(n.default,{value:"push"},"推送"),i.default.createElement("span",null,"git推送到存储库")),i.default.createElement("span",null,i.default.createElement(n.default,{value:"create"},"创建"),i.default.createElement("span",null,"创建分支或标签")),i.default.createElement("span",null,i.default.createElement(n.default,{value:"delete"},"删除"),i.default.createElement("span",null,"删除分支或标签"))),i.default.createElement("p",{className:"color-grey-3 mt10 mb10"},"合并请求事件"),i.default.createElement("div",{className:"colSpan"},i.default.createElement("span",null,i.default.createElement(n.default,{value:"pull_request_only"},"合并请求"),i.default.createElement("span",null,"合并请求被打开、被关闭、被重新打开或被编辑")),i.default.createElement("span",null,i.default.createElement(n.default,{value:"pull_request_assign"},"合并请求分配"),i.default.createElement("span",null,"合并请求被分配或取消分配")))),G&&i.default.createElement("span",{style:{color:"#DF0002"}},"请选择自定义事件!")),i.default.createElement(o.default.Item,{label:"分支过滤",className:"topLine",help:i.default.createElement("span",null,"推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 *,则将报告所有分支的事件。语法文档见",i.default.createElement("a",{href:"http://github.com/gobwas/glob",target:"_blank",className:"hoverLine color-blue"},"github.com/gobwas/glob"),"。示例master,","{","master,release*","}","。"),colon:!1,style:{marginTop:"15px"}},F("branch_filter",{rules:[]})(i.default.createElement(c.default,{size:"large"}))),i.default.createElement(o.default.Item,{className:"topLine bottomLine",colon:!1,style:{height:"110px",paddingBottom:"0px"}},F("active",{valuePropName:"checked"})(i.default.createElement(n.default,null,"激活",i.default.createElement("span",{className:"subCbDesc"},"激活后触发事件的信息将发送到此Webhook地址")))),i.default.createElement(l.default,{type:"primary",onClick:function(){Q((function(e,t){if(!e){if("forevent"===t.eventCondition&&0===U.length)return void B(!0);var a="push"===t.eventCondition?["push"]:"all"===t.eventCondition?b:U;if(Y){var l="/"+$+"/"+ee+"/webhooks/"+Y+".json";v.default.patch(l,{webhook:s({},t,{events:a})}).then((function(e){e&&(E("webhook更新成功"),y.push("/"+$+"/"+ee+"/settings/webhooks"))})).catch((function(e){}))}else{var n="/"+$+"/"+ee+"/webhooks.json";v.default.post(n,{webhook:s({},t,{events:a})}).then((function(e){e&&e.data&&e.data.id&&(E("webhook新建成功"),y.push("/"+$+"/"+ee+"/settings/webhooks"))})).catch((function(e){}))}}}))},className:"ml20",style:{width:Y?"":"100px"}},Y?"更新Webhook":"添加"),Y&&i.default.createElement(l.default,{type:"danger",className:"ml20",onClick:function(){Y&&x(!0)}},"删除"))),Y&&i.default.createElement(h.default,{id:Y,owner:$,projectsId:ee,showNotification:E}))})))}}]);