You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
28 KiB
JavaScript
2 lines
28 KiB
JavaScript
3 years ago
|
(this["webpackJsonpmitmproxy-client"]=this["webpackJsonpmitmproxy-client"]||[]).push([[0],{59:function(e,t,s){},65:function(e,t,s){"use strict";s.r(t);var n=s(1),i=s.n(n),r=s(20),o=s.n(r),a=(s(58),s(7)),c=s(8),l=s(15),h=s(14),d=s(52),u=s(10),p=s(13),j=(s(59),s(2)),v=s(22),b=s(16),y=s(43),f=s(30),w=s(0),O=function(e){Object(l.a)(s,e);var t=Object(h.a)(s);function s(e){var n;return Object(a.a)(this,s),(n=t.call(this,e)).state={show:!1,rule:{method:"ALL",url:"",action:1},haveRules:!1},n.handleClose=n.handleClose.bind(Object(v.a)(n)),n.handleShow=n.handleShow.bind(Object(v.a)(n)),n.handleSave=n.handleSave.bind(Object(v.a)(n)),n}return Object(c.a)(s,[{key:"handleClose",value:function(){this.setState({show:!1})}},{key:"handleShow",value:function(){this.setState({show:!0})}},{key:"handleSave",value:function(){var e=this.state.rule,t=[];e.url&&t.push({method:"ALL"===e.method?"":e.method,url:e.url,action:e.action}),this.props.onSave(t),this.handleClose(),this.setState({haveRules:!!t.length})}},{key:"render",value:function(){var e=this,t=this.state,s=t.rule,n=t.haveRules?"success":"primary";return Object(w.jsxs)("div",{children:[Object(w.jsx)(p.a,{variant:n,size:"sm",onClick:this.handleShow,children:"BreakPoint"}),Object(w.jsxs)(b.a,{show:this.state.show,onHide:this.handleClose,children:[Object(w.jsx)(b.a.Header,{closeButton:!0,children:Object(w.jsx)(b.a.Title,{children:"Set BreakPoint"})}),Object(w.jsxs)(b.a.Body,{children:[Object(w.jsxs)(u.a.Group,{as:y.a,children:[Object(w.jsx)(u.a.Label,{column:!0,sm:2,children:"Method"}),Object(w.jsx)(f.a,{sm:10,children:Object(w.jsxs)(u.a.Control,{as:"select",value:s.method,onChange:function(t){e.setState({rule:Object(j.a)(Object(j.a)({},s),{},{method:t.target.value})})},children:[Object(w.jsx)("option",{children:"ALL"}),Object(w.jsx)("option",{children:"GET"}),Object(w.jsx)("option",{children:"POST"}),Object(w.jsx)("option",{children:"PUT"}),Object(w.jsx)("option",{children:"DELETE"})]})})]}),Object(w.jsxs)(u.a.Group,{as:y.a,children:[Object(w.jsx)(u.a.Label,{column:!0,sm:2,children:"URL"}),Object(w.jsx)(f.a,{sm:10,children:Object(w.jsx)(u.a.Control,{value:s.url,onChange:function(t){e.setState({rule:Object(j.a)(Object(j.a)({},s),{},{url:t.target.value})})}})})]}),Object(w.jsxs)(u.a.Group,{as:y.a,children:[Object(w.jsx)(u.a.Label,{column:!0,sm:2,children:"Action"}),Object(w.jsx)(f.a,{sm:10,children:Object(w.jsxs)(u.a.Control,{as:"select",value:s.action,onChange:function(t){e.setState({rule:Object(j.a)(Object(j.a)({},s),{},{action:parseInt(t.target.value)})})},children:[Object(w.jsx)("option",{value:"1",children:"Request"}),Object(w.jsx)("option",{value:"2",children:"Response"}),Object(w.jsx)("option",{value:"3",children:"Both"})]})})]})]}),Object(w.jsxs)(b.a.Footer,{children:[Object(w.jsx)(p.a,{variant:"secondary",onClick:this.handleClose,children:"Close"}),Object(w.jsx)(p.a,{variant:"primary",onClick:this.handleSave,children:"Save"})]})]})]})}}]),s}(i.a.Component),x=function(e){return!!e&&(!!e.header&&(!!e.header["Content-Type"]&&/text|javascript|json|x-www-form-urlencoded|xml|form-data/.test(e.header["Content-Type"].join(""))))},m=function(e){return e?isNaN(e)||e<=0?"0":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB"):"0"},R=function(e){for(var t="",s=new Uint8Array(e),n=s.byteLength,i=0;i<n;i++)t+=String.fromCharCode(s[i]);return btoa(t)},S=function(e){var t="",s=new Uint8Array(e),n=s.byteLength,i="";t+="00000000: ";for(var r=0;r<n;r++)t+=s[r].toString(16).padStart(2,"0")+" ",s[r]>=32&&s[r]<=126?i+=String.fromCharCode(s[r]):i+=".",(r+1)%16===0?(t+=" "+i,i="",t+="\n".concat((r+1).toString(16).padStart(8,"0"),": ")):(r+1)%8===0&&(t+=" ");if(i.length>0){for(var o=i.length;o<16;o++)t+=" ",(o+1)%8===0&&(t+=" ");t+=" "+i}return t};var g,E=function(e){Object(l.a)(s,e);var t=Object(h.a)(s);function s(){return Object(a.a)(this,s),t.apply(this,arguments)}return Object(c.a)(s,[{key:"shouldComponentUpdate",value:function(e){return e.isSelected!==this.props.isSelected||!function(e,t){if(e===t)return!0;var s=Object.keys(e),n=Object
|
||
|
//# sourceMappingURL=main.dab9e469.chunk.js.map
|