text: webpackJsonp([30],{19:function(e,t,n){try{(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=[{value:"Integer",label:"整数字段"},{value:"Number",label:"数值字段"},{value:"Text",label:"文本框单行"},{value:"TextArea",label:"文本框多行"},{value:"RichTextEditor",label:"富文本"},{value:"Select",label:"选择列表(单行)"},{value:"MultiSelect",label:"选择列表(多行)"},{value:"CheckboxGroup",label:"复选按钮"},{value:"RadioGroup",label:"单选按钮"},{value:"DatePicker",label:"日期选择控件"},{value:"DateTimePicker",label:"日期时间选择控件"},{value:"TimeTracking",label:"时间跟踪"},{value:"File",label:"文件"},{value:"SingleVersion",label:"单一版本选择"},{value:"MultiVersion",label:"多版本选择"},{value:"SingleUser",label:"单一用户选择"},{value:"MultiUser",label:"多用户选择"},{value:"Url",label:"URL"}];t.FieldTypes=e;var n=[{id:"new",name:"新建"},{id:"inprogress",name:"进行中"},{id:"completed",name:"完成"}];t.StateCategories=n;var r={project:[{id:"view_project",name:"查看项目"},{id:"manage_project",name:"管理项目"}],issue:[{id:"create_issue",name:"创建问题"},{id:"edit_issue",name:"编辑问题"},{id:"edit_self_issue",name:"编辑自己创建的问题"},{id:"delete_issue",name:"删除问题"},{id:"delete_self_issue",name:"删除自己创建的问题"},{id:"assign_issue",name:"分配问题"},{id:"assigned_issue",name:"被分配问题"},{id:"resolve_issue",name:"解决问题"},{id:"close_issue",name:"关闭问题"},{id:"reset_issue",name:"重置问题"},{id:"link_issue",name:"链接问题"},{id:"move_issue",name:"移动问题"},{id:"exec_workflow",name:"执行流程"}],comments:[{id:"add_comments",name:"添加评论"},{id:"edit_comments",name:"编辑评论"},{id:"edit_self_comments",name:"编辑自己的评论"},{id:"delete_comments",name:"删除评论"},{id:"delete_self_comments",name:"删除自己的评论"}],worklogs:[{id:"add_worklog",name:"添加工作日志"},{id:"edit_worklog",name:"编辑工作日志"},{id:"edit_self_worklog",name:"编辑自己的工作日志"},{id:"delete_worklog",name:"删除工作日志"},{id:"delete_self_worklog",name:"删除自己的工作日志"}],files:[{id:"upload_file",name:"上传附件"},{id:"download_file",name:"下载附件"},{id:"remove_file",name:"删除附件"},{id:"remove_self_file",name:"删除自己上传附件"}]};t.Permissions=r;var a=[{id:"create_issue",name:"创建问题"},{id:"edit_issue",name:"编辑问题"},{id:"del_issue",name:"删除问题"},{id:"resolve_issue",name:"解决问题"},{id:"close_issue",name:"关闭问题"},{id:"reopen_issue",name:"重新打开问题"},{id:"create_version",name:"创建版本"},{id:"edit_version",name:"编辑版本"},{id:"release_version",name:"发布版本"},{id:"merge_version",name:"合并版本"},{id:"del_version",name:"删除版本"},{id:"add_worklog",name:"添加工作日志"},{id:"edit_worklog",name:"编辑工作日志"}];t.webhookEvents=a;var l={CARD:"card",KANBAN_COLUMN:"kanban_column",KANBAN_FILTER:"kanban_filter"};t.CardTypes=l;var o=["#CCCCCC","#B3B3B3","#999999","#A4DD00","#68BC00","#006600","#73D8FF","#009CE0","#0062B1","#FCDC00","#FCC400","#FB9E00","#FE9200","#E27300","#C45100","#F44E3B","#D33115","#9F0500"];t.PriorityRGBs=o;var i=["#CCCCCC","#B3B3B3","#999999","#808080","#666666","#FDA1FF","#FA28FF","#AB149E","#AEA1FF","#7B64FF","#653294","#73D8FF","#009CE0","#0062B1","#68CCCA","#16A5A5","#0C797D","#A4DD00","#68BC00","#006600","#DBDF00","#B0BC00","#808900","#FCDC00","#FCC400","#FB9E00","#FE9200","#E27300","#C45100","#F44E3B","#D33115","#9F0500","#4D4D4D","#333333","#000000"];t.LabelRGBs=i;var s=600;t.DetailMinWidth=s;var u=1e3;t.DetailMaxWdith=u}).call(this)}finally{}},40:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxGroup=t.Checkbox=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(1),i=r(o);t.Checkbox=i.default.createClass({displayName:"Checkbox",contextTypes:{checkboxGroup:i.default.PropTypes.object.isRequired},componentWillMount:function(){if(!this.context||!this.context.checkboxGroup)throw new Error("The `Checkbox` component must be used as a child of `CheckboxGroup`.")},render:function(){var e=this.context.checkboxGroup,t=e.name,n=e.checkedValues,r=e.onChange,a={};return n&&(a.checked=n.indexOf(this.props.value)>=0),"function"==typeof r&&(a.onChange=r.bind(null,this.props.value)),i.default.createElement("input",l({},this.props,{type:"checkbox",name:t},a))}}),t.CheckboxGroup=i.default.createClass({displayName:"CheckboxGroup",propTypes:{name:o.PropTypes.string,defaultValue:o.PropTypes.array,value:o.PropTypes.array,onChange:o.PropTypes.func,children:o.PropTypes.node.isRequired,Component:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func,o.PropTypes.object])},getDefaultProps:function(){return{Component:"div"}},childContextTypes:{checkboxGroup:i.default.PropTypes.object},getChildContext:function(){return{checkboxGroup:{name:this.props.name,checkedValues:this.state.value,onChange:this._onCheckboxChange}}},getInitialState:function(){return{value:this.props.value||this.props.defaultValue||[]}},componentWillReceiveProps:function(e){e.value&&this.setState({value:e.value})},render:function(){var e=this.props,t=e.Component,n=(e.name,e.value,e.onChange,e.children),r=a(e,["Component","name","value","onChange","children"]);return i.default.createElement(t,r,n)},getValue:function(){return this.state.value},_isControlledComponent:function(){return!!this.props.value},_onCheckboxChange:function(e,t){var n;n=t.target.checked?this.state.value.concat(e):this.state.value.filter(function(t){return t!==e}),this._isControlledComponent()?this.setState({value:this.props.value}):this.setState({value:n}),"function"==typeof this.props.onChange&&this.props.onChange(n)}})},2030:function(e,t,n){try{(function(){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{"default":e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return{actions:(0,h.bindActionCreators)(y,e)}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function(e,t,n){for(var r=!0;r;){var a=e,l=t,o=n;r=!1,null===a&&(a=Function.prototype);var i=Object.getOwnPropertyDescriptor(a,l);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(o)}var u=Object.getPrototypeOf(a);if(null===u)return;e=u,t=l,n=o,r=!0,i=u=void 0}},d=n(1),p=a(d),f=n(21),h=n(22),m=n(3),b=(a(m),n(5),n(2091)),y=r(b),v=n(2032),E=function(e){function t(e){l(this,n),c(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.pid=""}o(t,e),u(t,[{key:"index",value:function(){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,regeneratorRuntime.awrap(this.props.actions.index(this.pid));case 2:return e.abrupt("return",this.props.webhooks.ecode);case 3:case"end":return e.stop()}},null,this)}},{key:"test",value:function(){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,regeneratorRuntime.awrap(this.props.actions.test(this.pid));case 2:return e.abrupt("return",this.props.webhooks.ecode);case 3:case"end":return e.stop()}},null,this)}},{key:"create",value:function(e){return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,regeneratorRuntime.awrap(this.props.actions.create(this.pid,e));case 2:return t.abrupt("return",this.props.webhooks.ecode);case 3:case"end":return t.stop()}},null,this)}},{key:"update",value:function(e,t){return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,regeneratorRuntime.awrap(this.props.actions.update(this.pid,e,t));case 2:return n.abrupt("return",this.props.webhooks.ecode);case 3:case"end":return n.stop()}},null,this)}},{key:"del",value:function(e){var t;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return t=this.props.actions,n.next=3,regeneratorRuntime.awrap(t.del(this.pid,e));case 3:return n.abrupt("return",this.props.webhooks.ecode);case 4:case"end":return n.stop()}},null,this)}},{key:"componentWillMount",value:function(){var e=this.props.params.key;this.pid=e}},{key:"render",value:function(){var e=this.props.i18n;return p.default.createElement(v,s({index:this.index.bind(this),create:this.create.bind(this),select:this.props.actions.select,update:this.update.bind(this),del:this.del.bind(this),test:this.test.bind(this),i18n:e},this.props.webhooks))}}],[{key:"contextTypes",value:{router:d.PropTypes.object.isRequired},enumerable:!0},{key:"propTypes",value:{actions:d.PropTypes.object.isRequired,location:d.PropTypes.object.isRequired,params:d.PropTypes.object.isRequired,i18n:d.PropTypes.object.isRequired,session:d.PropTypes.object.isRequired,webhooks:d.PropTypes.object.isRequired},enumerable:!0}]);var n=t;return t=(0,f.connect)(function(e){var t=e.i18n,n=e.session,r=e.webhooks;return{i18n:t,session:n,webhooks:r}},i)(t)||t}(d.Component);t.default=E,e.exports=t.default}).call(this)}finally{}},2031:function(e,t,n){try{(function(){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r=!0;r;){var a=e,l=t,o=n;r=!1,null===a&&(a=Function.prototype);var i=Object.getOwnPropertyDescriptor(a,l);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(o)}var u=Object.getPrototypeOf(a);if(null===u)return;e=u,t=l,n=o,r=!0,i=u=void 0}},u=n(1),c=r(u),d=n(8),p=n(2),f=n(40),h=n(3),m=(r(h),n(5)),b=n(4),y=function(e,t){var n={};return e.request_url||(n.request_url="必填"),n},v=function(e){function t(e){a(this,n),s(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.state={ecode:0},this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}l(t,e),i(t,[{key:"handleSubmit",value:function(){var e,t,n,r,a;return regeneratorRuntime.async(function(l){for(;;)switch(l.prev=l.next){case 0:return e=this.props,t=e.values,n=e.create,r=e.close,l.next=6,regeneratorRuntime.awrap(n(t));case 6:a=l.sent,0===a?(this.setState({ecode:0}),r(),m.notify.show("新建完成。","success",2e3)):this.setState({ecode:a});case 8:case"end":return l.stop()}},null,this)}},{key:"handleCancel",value:function(){var e=this.props,t=e.close,n=e.submitting;n||(this.setState({ecode:0}),t())}},{key:"render",value:function(){var e=this.props,t=e.i18n.errMsg,n=e.fields,r=n.request_url,a=n.token,l=n.events,i=e.handleSubmit,s=e.invalid,u=e.submitting;return c.default.createElement(p.Modal,{show:!0,onHide:this.handleCancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},c.default.createElement(p.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},c.default.createElement(p.Modal.Title,{id:"contained-modal-title-la"},"新建Webhooks")),c.default.createElement("form",{onSubmit:i(this.handleSubmit),onKeyDown:function(e){13==e.keyCode&&e.preventDefault()}},c.default.createElement(p.Modal.Body,null,c.default.createElement(p.FormGroup,{controlId:"formControlsText",validationState:r.touched&&r.error?"error":null},c.default.createElement(p.ControlLabel,null,c.default.createElement("span",{className:"txt-impt"},"*"),"请求Url"),c.default.createElement(p.FormControl,o({disabled:u,type:"text"},r,{placeholder:"http://example.com/postreceive"})),r.touched&&r.error&&c.default.createElement(p.HelpBlock,{style:{"float":"right"}},r.error)),c.default.createElement(p.FormGroup,{controlId:"formControlsText"},c.default.createElement(p.ControlLabel,null,"安全令牌"),c.default.createElement(p.FormControl,o({disabled:u,type:"text"},a))),c.default.createElement(p.FormGroup,{controlId:"formControlsText"},c.default.createElement(p.ControlLabel,null,"事件"),c.default.createElement(f.CheckboxGroup,{name:"events",value:l.value||[],onChange:function(e){l.onChange(e)},style:{marginLeft:"10px"}},c.default.createElement("ui",{className:"list-unstyled clearfix"},c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"create_issue"}),c.default.createElement("span",null," 创建问题"))),c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"edit_issue"}),c.default.createElement("span",null," 编辑问题")))),c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"del_issue"}),c.default.createElement("span",null," 删除问题"))),c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"resolve_issue"}),c.default.createElement("span",null," 解决问题")))),c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"close_issue"}),c.default.createElement("span",null," 关闭问题"))),c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"reopen_issue"}),c.default.createElement("span",null," 重新打开")))),c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"add_worklog"}),c.default.createElement("span",null," 添加工作日志"))),c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"edit_worklog"}),c.default.createElement("span",null," 编辑工作日志")))),c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"create_version"}),c.default.createElement("span",null," 新建版本"))),c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"edit_version"}),c.default.createElement("span",null," 编辑版本")))),c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"release_version"}),c.default.createElement("span",null," 发布版本"))),c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"merge_version"}),c.default.createElement("span",null," 合并版本")))),c.default.createElement("li",null,c.default.createElement("div",{style:{width:"50%",display:"inline-block"}},c.default.createElement("label",{style:{fontWeight:400}},c.default.createElement(f.Checkbox,{value:"del_version"}),c.default.createElement("span",null," 删除版本")))))))),c.default.createElement(p.Modal.Footer,null,c.default.createElement("span",{className:"ralign"},0!==this.state.ecode&&!u&&t[this.state.ecode]),c.default.createElement("img",{src:b,className:u?"loading":"hide"}),c.default.createElement(p.Button,{disabled:u||s,type:"submit"},"确定"),c.default.createElement(p.Button,{bsStyle:"link",disabled:u,onClick:this.handleCancel},"取消"))))}}],[{key:"propTypes",value:{i18n:u.PropTypes.object.isRequired,submitting:u.PropTypes.bool,invalid:u.PropTypes.bool,values:u.PropTypes.object,fields:u.PropTypes.object,handleSubmit:u.PropTypes.func.isRequired,close:u.PropTypes.func.isRequired,create:u.PropTypes.func.isRequired},enumerable:!0}]);var n=t;return t=(0,d.reduxForm)({form:"webhooks",fields:["request_url","token","events"],validate:y})(t)||t}(u.Component);t.default=v,e.exports=t.default}).call(this)}finally{}},2032:function(e,t,n){try{(function(){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var a=e,l=t,o=n;r=!1,null===a&&(a=Function.prototype);var i=Object.getOwnPropertyDescriptor(a,l);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(o)}var u=Object.getPrototypeOf(a);if(null===u)return;e=u,t=l,n=o,r=!0,i=u=void 0}},s=n(1),u=r(s),c=n(29),d=n(2),p=n(7),f=(r(p),n(3)),h=r(f),m=n(5),b=n(19),y=(n(18),n(2031)),v=n(2033),E=n(4),k=function(e){function t(e){a(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={createModalShow:!1,operateNotifyShow:!1,operate:"",operateShow:!1,hoverRowId:""},this.createModalClose=this.createModalClose.bind(this),this.operateNotifyClose=this.operateNotifyClose.bind(this)}return l(t,e),o(t,[{key:"componentWillMount",value:function(){var e=this.props.index;e()}},{key:"createModalClose",value:function(){this.setState({createModalShow:!1})}},{key:"operateNotifyClose",value:function(){this.setState({operateNotifyShow:!1})}},{key:"operateNotify",value:function(e){this.setState({operateNotifyShow:!0});var t=this.props.select;t(e)}},{key:"operateSelect",value:function(e){var t,n,r;return regeneratorRuntime.async(function(a){for(;;)switch(a.prev=a.next){case 0:if(t=this.state.hoverRowId,n=this.props.test,"test"!=e){a.next=9;break}return a.next=5,regeneratorRuntime.awrap(n(t));case 5:r=a.sent,0===r?m.notify.show("测试成功。","success",2e3):m.notify.show("测试失败","error",2e3),a.next=11;break;case 9:this.operateNotify(t),this.setState({operate:e});case 11:case"end":return a.stop()}},null,this)}},{key:"onRowMouseOver",value:function(e){e.id!==this.state.hoverRowId&&this.setState({operateShow:!0,hoverRowId:e.id})}},{key:"onMouseLeave",value:function(){this.setState({operateShow:!1,hoverRowId:""})}},{key:"render",value:function(){for(var e=this,t=this.props,n=t.i18n,r=t.collection,a=t.selectedItem,l=(t.loading,t.indexLoading),o=t.itemLoading,i=(t.index,t.create),s=t.del,p=(t.test,t.update),f=(t.options,this.state),m=f.hoverRowId,k=f.operateShow,g=u.default.createElement("span",null,u.default.createElement("i",{className:"fa fa-cog"})),w=[],C=r.length,_=function(t){var n=[];h.default.forEach(b.webhookEvents,function(e){var a=h.default.indexOf(r[t].events,e.id);a!==-1&&n.push(e.name)}),w.push({id:r[t].id,request_url:u.default.createElement("div",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"}},r[t].request_url),events:u.default.createElement("ul",{style:{marginBottom:"0px",paddingLeft:"0px",listStyle:"none"}},h.default.isEmpty(n)?"-":h.default.map(n,function(e,t){return u.default.createElement("li",{key:t},e)})),ssl:1==r[t].ssl?"是":"否",status:"disabled"==r[t].status?u.default.createElement(d.Label,null,"无效"):u.default.createElement(d.Label,{bsStyle:"success"},"有效"),operation:u.default.createElement("div",null,k&&m===r[t].id&&!o&&u.default.createElement(d.DropdownButton,{pullRight:!0,bsStyle:"link",style:{textDecoration:"blink",color:"#000"},title:g,id:"dropdown-basic-"+t,onSelect:e.operateSelect.bind(e)},"enabled"==r[t].status?u.default.createElement(d.MenuItem,{eventKey:"disable"},"禁用"):u.default.createElement(d.MenuItem,{eventKey:"enable"},"启用"),u.default.createElement(d.MenuItem,{eventKey:"del"},"删除")),u.default.createElement("img",{src:E,className:o&&a.id===r[t].id?"loading":"hide"}))})},x=0;x<C;x++)_(x);var T={};return l?T.noDataText=u.default.createElement("div",null,u.default.createElement("img",{src:E,className:"loading"})):T.noDataText="暂无数据显示。",T.onRowMouseOver=this.onRowMouseOver.bind(this),u.default.createElement("div",null,u.default.createElement("div",{style:{marginTop:"5px",height:"40px"}},u.default.createElement(d.FormGroup,null,u.default.createElement(d.Button,{style:{"float":"left",marginRight:"20px"},onClick:function(){e.setState({createModalShow:!0})},disabled:l},u.default.createElement("i",{className:"fa fa-plus"})," 新建Webhook"))),u.default.createElement("div",{className:"info-col",style:{marginBottom:"15px"}},u.default.createElement("div",{className:"info-icon"},u.default.createElement("i",{className:"fa fa-info-circle"})),u.default.createElement("div",{className:"info-content"},u.default.createElement("span",null,"请求Header Content-Type为：application/json；Token附加在Header中的X_ACTIONVIEW_TOKEN里。"))),u.default.createElement("div",null,u.default.createElement(c.BootstrapTable,{data:w,bordered:!1,hover:!0,options:T,trClassName:"tr-top"},u.default.createElement(c.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID"),u.default.createElement(c.TableHeaderColumn,{dataField:"request_url"},"请求Url"),u.default.createElement(c.TableHeaderColumn,{dataField:"events"},"事件"),u.default.createElement(c.TableHeaderColumn,{dataField:"status",width:"100"},"状态"),u.default.createElement(c.TableHeaderColumn,{width:"60",dataField:"operation"})),this.state.createModalShow&&u.default.createElement(y,{show:!0,data:a,close:this.createModalClose,create:i,i18n:n}),this.state.operateNotifyShow&&u.default.createElement(v,{show:!0,close:this.operateNotifyClose,data:a,operate:this.state.operate,del:s,update:p,i18n:n})))}}],[{key:"propTypes",value:{i18n:s.PropTypes.object.isRequired,options:s.PropTypes.object,collection:s.PropTypes.array.isRequired,selectedItem:s.PropTypes.object.isRequired,loading:s.PropTypes.bool.isRequired,itemLoading:s.PropTypes.bool.isRequired,indexLoading:s.PropTypes.bool.isRequired,index:s.PropTypes.func.isRequired,select:s.PropTypes.func.isRequired,create:s.PropTypes.func.isRequired,update:s.PropTypes.func.isRequired,test:s.PropTypes.func.isRequired,del:s.PropTypes.func.isRequired},enumerable:!0}]),t}(s.Component);t.default=k,e.exports=t.default}).call(this)}finally{}},2033:function(e,t,n){try{(function(){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var a=e,l=t,o=n;r=!1,null===a&&(a=Function.prototype);var i=Object.getOwnPropertyDescriptor(a,l);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(o)}var u=Object.getPrototypeOf(a);if(null===u)return;e=u,t=l,n=o,r=!0,i=u=void 0}},s=n(1),u=r(s),c=n(2),d=n(5),p=function(e){function t(e){a(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={ecode:0},this.confirm=this.confirm.bind(this),this.cancel=this.cancel.bind(this)}return l(t,e),o(t,[{key:"confirm",value:function(){var e,t,n,r,a,l,o,i;return regeneratorRuntime.async(function(s){for(;;)switch(s.prev=s.next){case 0:if(e=this.props,t=e.close,n=e.operate,r=e.del,a=e.update,l=e.data,t(),o=0,i="","del"!==n){s.next=15;break}return s.next=11,regeneratorRuntime.awrap(r(l.id));case 11:o=s.sent,i="已删除。",s.next=30;break;case 15:if("enable"!==n){s.next=22;break}return s.next=18,regeneratorRuntime.awrap(a(l.id,{status:"enabled"}));case 18:o=s.sent,i="已启用。",s.next=30;break;case 22:if("disable"!==n){s.next=29;break}return s.next=25,regeneratorRuntime.awrap(a(l.id,{status:"disabled"}));case 25:o=s.sent,i="已禁用。",s.next=30;break;case 29:return s.abrupt("return");case 30:0===o?d.notify.show(i,"success",2e3):d.notify.show("操作失败。","error",2e3);case 31:case"end":return s.stop()}},null,this)}},{key:"cancel",value:function(){var e=this.props.close;e()}},{key:"render",value:function(){var e=this.props,t=e.operate,n=e.data,r="";if("del"===t)r="Webhook删除";else if("enable"===t)r="Webhook启用";else{if("disable"!==t)return u.default.createElement("div",null);r="Webhook禁用"}return u.default.createElement(c.Modal,{show:!0,onHide:this.cancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},u.default.createElement(c.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},u.default.createElement(c.Modal.Title,{id:"contained-modal-title-la"},r)),"del"===t&&u.default.createElement(c.Modal.Body,null,"是否删除【",n.request_url,"】该Webhook？"),"enable"===t&&u.default.createElement(c.Modal.Body,null,"是否启用【",n.request_url,"】该Webhook？"),"disable"===t&&u.default.createElement(c.Modal.Body,null,"是否禁用【",n.request_url,"】该Webhook？"),u.default.createElement(c.Modal.Footer,null,u.default.createElement(c.Button,{onClick:this.confirm},"确定"),u.default.createElement(c.Button,{bsStyle:"link",onClick:this.cancel},"取消")))}}],[{key:"propTypes",value:{close:s.PropTypes.func.isRequired,operate:s.PropTypes.string.isRequired,del:s.PropTypes.func.isRequired,update:s.PropTypes.func.isRequired,data:s.PropTypes.object.isRequired},enumerable:!0}]),t}(s.Component);t.default=p,e.exports=t.default}).call(this)}finally{}},2091:function(e,t,n){try{(function(){"use strict";function e(e){return(0,s.asyncFuncCreator)({constant:"WEBHOOKS_INDEX",promise:function(t){return t.request({url:"/project/"+e+"/webhooks"})}})}function r(e,t){return(0,s.asyncFuncCreator)({constant:"WEBHOOKS_CREATE",promise:function(n){return n.request({url:"/project/"+e+"/webhooks",method:"post",data:t})}})}function a(e,t,n){return(0,s.asyncFuncCreator)({constant:"WEBHOOKS_UPDATE",promise:function(r){return r.request({url:"/project/"+e+"/webhooks/"+t,method:"put",data:n})}})}function l(e,t){return(0,s.asyncFuncCreator)({constant:"WEBHOOKS_TEST",promise:function(n){return n.request({url:"/project/"+e+"/webhooks/"+t+"/test",method:"get"})}})}function o(e,t){return(0,s.asyncFuncCreator)({constant:"WEBHOOKS_DELETE",id:t,promise:function(n){return n.request({url:"/project/"+e+"/webhooks/"+t,method:"delete"})}})}function i(e){return{type:"WEBHOOKS_SELECT",id:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.index=e,t.create=r,t.update=a,t.test=l,t.del=o,t.select=i;var s=n(26)}).call(this)}finally{}}});
  //# sourceMappingURL=webhooks-2fafc167f8a6ebfe8dae.js.map