Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.mockserver.dashboard.static.js.main.411a4d36.chunk.js Maven / Gradle / Ivy
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{392:function(e,t,a){e.exports=a(804)},396:function(e,t,a){e.exports=a(803)},55:function(e,t,a){"use strict";a.d(t,"a",function(){return n}),a.d(t,"d",function(){return i}),a.d(t,"f",function(){return r}),a.d(t,"c",function(){return l}),a.d(t,"g",function(){return o}),a.d(t,"b",function(){return c}),a.d(t,"e",function(){return s});var n="CONNECT_SOCKET",i="SEND_MESSAGE",r=function(e,t,a){return function(n){return n(function(e,t,a){return{type:i,message:e,host:t,port:a}}(e,t,a))}},l="MESSAGE_RECEIVED",o=function(e){return{type:l,entities:e}},c="DISCONNECT_SOCKET",s=function(){return function(e){return e({type:c})}}},602:function(e,t,a){},724:function(e,t,a){},803:function(e,t,a){"use strict";a.r(t);var n=a(0),i=a.n(n),r=a(16),l=a(44),o=a(22),c=a(23),s=a(26),d=a(24),p=a(27),u=a(806),m=a(807),h=a(809),b=a(805),g=a(15),v=a(183),y=a.n(v),E=a(184),f=a.n(E),x=a(56),k=a(55),O=function(e){var t=void 0,a=!0,n=!1,i=void 0;try{for(var r,l=e[Symbol.iterator]();!(a=(r=l.next()).done);a=!0){var o=r.value,c=!1,s=!0,d=!1,p=void 0;try{for(var u,m=o.values[Symbol.iterator]();!(s=(u=m.next()).done);s=!0){u.value&&(c=!0)}}catch(h){d=!0,p=h}finally{try{s||null==m.return||m.return()}finally{if(d)throw p}}o.name&&c&&(t||(t=[]),t.push(o))}}catch(h){n=!0,i=h}finally{try{a||null==l.return||l.return()}finally{if(n)throw i}}return t},w=function(e){var t=e.host,a=void 0===t?"127.0.0.1":t,n=e.port,i=void 0===n?"1080":n,r=e.requestMatcher,l=void 0===r?{}:r,o=e.sendMessage,c={method:void 0,path:void 0,keepAlive:void 0,secure:void 0,headers:void 0,queryStringParameters:void 0,cookies:void 0};l.enabled&&((c={method:l.method,path:l.path,keepAlive:!!l.keepAlive||void 0,secure:!!l.secure||void 0,headers:void 0,queryStringParameters:void 0,cookies:void 0}).cookies=function(e){var t=void 0,a=!0,n=!1,i=void 0;try{for(var r,l=e[Symbol.iterator]();!(a=(r=l.next()).done);a=!0){var o=r.value;o.name&&o.value&&(t||(t=[]),t.push(o))}}catch(c){n=!0,i=c}finally{try{a||null==l.return||l.return()}finally{if(n)throw i}}return t}(l.cookies),c.headers=O(l.headers),c.queryStringParameters=O(l.queryStringParameters)),console.log(JSON.stringify(c,void 0,2)),o(c,a,i)},T=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l0?i.a.createElement(g.f,{style:{display:"inline-block",verticalAlign:"bottom",minWidth:"28px",width:"28px"},disabled:a,onClick:function(){return t.remove(n)}},i.a.createElement(f.a,null)):"")}),i.a.createElement(g.f,{style:{display:"inline-block",verticalAlign:"bottom",minWidth:"28px",width:"28px"},disabled:a,onClick:function(){return t.push("")}},i.a.createElement(y.a,null)))},a.renderKeysToMultiValues=function(e){var t=e.fields,n=e.disabled,r=e.title;return i.a.createElement("div",{style:{width:"100%",display:"inline-block",paddingRight:"10px"}},i.a.createElement("div",{style:{color:n?"#9c9c9c":"rgb(0, 188, 212)",width:"20%",paddingTop:"45px",paddingRight:"15px",display:"inline-block",verticalAlign:"top",textAlign:"right",fontFamily:"Roboto, sans-serif"}},r),i.a.createElement("div",{style:{display:"inline-block",width:"75%"}},t.map(function(e,r){return i.a.createElement("div",{key:r,style:{display:"inline-block",width:"80%"}},i.a.createElement("div",{style:{width:"30%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:n,name:"".concat(e,".name"),component:x.AutoComplete,hintText:"Name",floatingLabelText:"Name",fullWidth:!0,openOnFocus:!0,filter:g.a.fuzzyFilter,dataSource:[]})),i.a.createElement(m.a,{name:"".concat(e,".values"),component:a.renderValues,disabled:n}),r>0?i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:n,onClick:function(){return t.remove(r)}},i.a.createElement(f.a,null)):"")}),i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:n,onClick:function(){return t.push({values:[""]})}},i.a.createElement(y.a,null))))},a.renderKeysToValues=function(e){var t=e.fields,a=e.disabled,n=e.title;return i.a.createElement("div",{style:{width:"100%",display:"inline-block",paddingRight:"10px"}},i.a.createElement("div",{style:{color:a?"#9c9c9c":"rgb(0, 188, 212)",width:"20%",paddingTop:"45px",paddingRight:"15px",display:"inline-block",verticalAlign:"top",textAlign:"right",fontFamily:"Roboto, sans-serif"}},n),i.a.createElement("div",{style:{display:"inline-block",width:"75%"}},t.map(function(e,n){return i.a.createElement("div",{key:n,style:{display:"inline-block",width:"80%"}},i.a.createElement("div",{style:{width:"30%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:a,name:"".concat(e,".name"),component:x.AutoComplete,hintText:"Name",floatingLabelText:"Name",fullWidth:!0,openOnFocus:!0,filter:g.a.fuzzyFilter,dataSource:[]})),i.a.createElement("div",{style:{width:"45%",padding:"5px",paddingRight:"10px",display:"inline-block",verticalAlign:"bottom"}},i.a.createElement(u.a,{disabled:a,fullWidth:!0,name:"".concat(e,".value"),component:x.TextField,hintText:"Value",floatingLabelText:"Value"})),n>0?i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:a,onClick:function(){return t.remove(n)}},i.a.createElement(f.a,null)):"")}),i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:a,onClick:function(){return t.push({})}},i.a.createElement(y.a,null))))},a}return Object(p.a)(t,e),Object(c.a)(t,[{key:"componentWillUnmount",value:function(){this.props.disconnectSocket()}},{key:"componentWillReceiveProps",value:function(e){e.requestMatcher===this.props.requestMatcher&&e.expanded===this.props.expanded||w(e)}},{key:"render",value:function(){var e=!this.props.requestMatcher.enabled;return i.a.createElement("div",{style:{margin:"1%",width:"98%"}},i.a.createElement(g.b,{expanded:this.expanded},i.a.createElement(g.c,{title:"Filter",actAsExpander:!0,showExpandableButton:!0,style:{backgroundColor:e?"rgba(220, 220, 220, 0.5)":"rgba(0, 188, 212, 0.75)"}}),i.a.createElement(g.d,{expandable:!0},i.a.createElement("div",{style:{display:"inline"}},i.a.createElement("div",{style:{width:"10%",display:"inline-block",verticalAlign:"top"}},i.a.createElement("div",{style:{paddingRight:"10px",padding:"5px",display:"inline-block"}},i.a.createElement(u.a,{name:"enabled",component:x.Toggle,label:"Enabled",labelPosition:"left"}))),i.a.createElement("div",{style:{width:"90%",display:"inline-block",verticalAlign:"bottom",marginBottom:"2%"}},i.a.createElement("div",{style:{width:"32%",paddingLeft:"3%",display:"inline-block",verticalAlign:"top"}},i.a.createElement("div",null,i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:e,name:"method",component:x.SelectField,fullWidth:!0,floatingLabelText:"Method"},i.a.createElement(g.g,{value:"",primaryText:""}),i.a.createElement(g.g,{value:"CONNECT",primaryText:"CONNECT"}),i.a.createElement(g.g,{value:"DELETE",primaryText:"DELETE"}),i.a.createElement(g.g,{value:"GET",primaryText:"GET"}),i.a.createElement(g.g,{value:"HEAD",primaryText:"HEAD"}),i.a.createElement(g.g,{value:"OPTIONS",primaryText:"OPTIONS"}),i.a.createElement(g.g,{value:"PATCH",primaryText:"PATCH"}),i.a.createElement(g.g,{value:"POST",primaryText:"POST"}),i.a.createElement(g.g,{value:"PUT",primaryText:"PUT"}),i.a.createElement(g.g,{value:"TRACE",primaryText:"TRACE"}))),i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:e,name:"path",component:x.TextField,fullWidth:!0,hintText:"Path",floatingLabelText:"Path"}))),i.a.createElement("div",null,i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"bottom"}},i.a.createElement(u.a,{disabled:e,name:"secure",component:x.Toggle,label:"Secure",labelPosition:"right"})),i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"bottom",overflow:"none"}},i.a.createElement(u.a,{disabled:e,name:"keepAlive",component:x.Toggle,label:"Keep-Alive",labelPosition:"right"})))),i.a.createElement("div",{style:{width:"65%",display:"inline-block",verticalAlign:"bottom"}},i.a.createElement("div",null,i.a.createElement(m.a,{name:"headers",component:this.renderKeysToMultiValues,disabled:e,title:"Headers:"}),i.a.createElement(m.a,{name:"cookies",component:this.renderKeysToValues,disabled:e,title:"Cookies:"}),i.a.createElement(m.a,{name:"queryStringParameters",component:this.renderKeysToMultiValues,disabled:e,title:"Query Parameters:"}))))))))}}]),t}(n.Component),S=Object(h.a)("requestFilter");T=Object(b.a)({form:"requestFilter",initialValues:{headers:[{values:[""]}],queryStringParameters:[{values:[""]}],cookies:[{}]},destroyOnUnmount:!1})(T);var j={sendMessage:k.f,disconnectSocket:k.e},A=T=Object(l.b)(function(e,t){return{requestMatcher:S(e,"enabled","method","path","keepAlive","secure","headers","queryStringParameters","cookies"),expanded:e.requestFilterExpanded}},j,void 0,{pure:!0})(T),C=a(390),R=a.n(C),M=function(e){function t(){return Object(o.a)(this,t),Object(s.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(p.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){var e=this.props,a=e.index,n=void 0===a?0:a,r=e.displayIndex,l=void 0===r||r,o=e.collapsed,c=void 0===o?0:o,s=e.jsonItem,d=void 0===s?null:s,p=e.display,u=void 0===p?"block":p,m=e.enableClipboard,h=void 0===m||m,b=e.textStyle,g=void 0===b?{}:b;return"object"===typeof d?i.a.createElement(R.a,{src:d,style:{whiteSpace:"nowrap",paddingTop:"6px",display:"table-cell"===u?"table-cell":"block"},name:l?i.a.createElement("div",{style:{display:"table-cell",maxWidth:"200px",minWidth:"115px",textOverflow:"ellipsis",overflow:"hidden"}},t.calculateIndex(null!=n?""+n:n,d)):null,theme:"tomorrow",iconStyle:"triangle",indentWidth:4,collapsed:null!=c?c:0,shouldCollapse:function(e){return!1},enableClipboard:h,displayObjectSize:!1,displayDataTypes:!1,onEdit:!1,onAdd:!1,onDelete:!1}):"string"===typeof d&&d.length>20?i.a.createElement("details",{style:g},i.a.createElement("summary",{style:{color:"rgb(222, 147, 95)",fontSize:"30px",lineHeight:"15px",display:"table-cell"}},"..."),i.a.createElement("pre",null,d)):"string"===typeof d?i.a.createElement("pre",{style:g},d):"number"===typeof d?i.a.createElement("pre",{style:g},d):i.a.createElement("div",null)}}],[{key:"calculateIndex",value:function(e,t){var a=t,n=null;if(a){if(a.httpRequest&&(a=a.httpRequest),a.method){var i=a.method;n=n?n+" "+i:i}if(a.path){var r=a.path;n=n?n+" "+r:r}if(a.statusCode){var l=a.statusCode;n=n?n+" "+l:l}if(a.reasonPhrase){var o=a.reasonPhrase;n=n?n+" "+o:o}}return n}}]),t}(n.Component),N=(a(602),function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,i=new Array(n),r=0;r0&&(r.push(i.a.createElement("div",{style:a,key:"msg"+c},l[c])),o++),t&&t.length>0&&t.length>c){if(-1!==l[c].indexOf("because:")){var s=t[c].split(",").map(function(e,t){var a="orange";return-1!==e.indexOf("matched")?a="rgb(85, 205, 189)":-1!==e.indexOf("didn't match")&&(a="rgb(234, 67, 106)"),i.a.createElement("span",{key:t,style:{display:"block",fontSize:"0.85em",lineHeight:"1.25em",color:a}},e)}),d=Object.assign({},a);d.paddingTop="0px",r.push(i.a.createElement("div",{style:d,key:"arg"+c},i.a.createElement("details",null,i.a.createElement("summary",{style:{color:"rgb(222, 147, 95)",fontSize:"30px",lineHeight:"15px"}},"..."),s)))}else{var p=t[c];if("string"===typeof p&&-1!==l[c].indexOf("generated output:"))try{p=JSON.parse(p)}catch(m){}r.push(i.a.createElement(M,{key:"arg"+c,index:null,displayIndex:-1===l[c].indexOf("for action:"),collapsed:"0",display:"table-cell",textStyle:{fontFamily:"Roboto, sans-serif",backgroundColor:"rgb(29, 31, 33)",display:"table-cell",verticalAlign:"top"},enableClipboard:!1,jsonItem:p}))}o++}for(var u=o;u0&&void 0!==arguments[0]?arguments[0]:{activeExpectations:[],recordedExpectations:[],recordedRequests:[],logMessages:[]},a=arguments.length>1?arguments[1]:void 0,n=0;if(a.type===l.c&&a.entities){var i=(a.entities.logMessages?Object(o.reverse)(a.entities.logMessages):[]).map(function(t){try{var a=JSON.parse(t.value),i=a.arguments?2*a.arguments.length:0;return-1!==a.messageFormat.indexOf("because:")&&i++,i>n&&(n=i),-1!==a.messageFormat.indexOf("request:{}didn't match expectation:{}because:{}")?(e&&JSON.stringify(e)===JSON.stringify(a.httpRequest)&&(a.messageFormat=" {}didn't match expectation:{}because:{}",a.arguments[0]="",a.timestamp=""),e=a.httpRequest):e=void 0,{key:t.key,value:a}}catch(r){return console.log("Error parsing: "+t.value),null}});return i.logMessageMaxWidth=n,{activeExpectations:a.entities.activeExpectations?a.entities.activeExpectations:[],recordedExpectations:a.entities.recordedExpectations?Object(o.reverse)(a.entities.recordedExpectations):[],recordedRequests:a.entities.recordedRequests?Object(o.reverse)(a.entities.recordedRequests):[],logMessages:i,logMessageMaxWidth:n}}return t},s=Object(n.c)({entities:c,form:r.a}),d=function(){var e=null,t=!1,a=function(){t=!1,null!=e&&e.close(),e=null},n=function(n,i){null!=e&&e.close(),(e=new WebSocket("wss://"+n.host+":"+n.port+"/_mockserver_ui_websocket")).onmessage=function(e){i(Object(l.g)(JSON.parse(e.data)))},e.onclose=function(){a()},e.onopen=function(){t=!0,e&&n.message&&1===e.readyState&&e.send(JSON.stringify(n.message))}};return function(i){return function(i){return function(r){switch(r.type){case l.a:n(r,i);break;case l.b:a();break;case l.d:t?e.send(JSON.stringify(r.message)):n(r,i);break;default:return i(r)}}}}}(),p=a(394),u=function(e){return function(t){return function(a){t(Object(p.a)({},a,{getState:e.getState}))}}};t.default=function(e){return Object(n.d)(s,e,Object(n.a)(i.a,d,u))}}},[[396,2,1]]]);
//# sourceMappingURL=main.411a4d36.chunk.js.map