mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-21 22:30:46 +08:00
Support http,dns and mysql connection. Support custom http, dns response. Support dns rebinding. Support mysql load local files and jdbc deserialize exploit.
2 lines
51 KiB
JavaScript
2 lines
51 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["about"],{"057f":function(t,e,r){var a=r("fc6a"),n=r("241c").f,o={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return n(t)}catch(e){return i.slice()}};t.exports.f=function(t){return i&&"[object Window]"==o.call(t)?s(t):n(a(t))}},"05cd":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[r("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),r("a-drawer",{attrs:{title:t.formAction+" MySQL rule",width:460,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[r("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[r("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly}}),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{label:"Files",rules:t.rules.files}},[r("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"please enter file name,use ';' to split multiple file names",readOnly:t.formReadOnly,disabled:t.form.exploit_jdbc_client},model:{value:t.form.files,callback:function(e){t.$set(t.form,"files",e)},expression:"form.files"}})],1)],1)],1),r("a-row",[r("a-form-model-item",[r("div",{staticClass:"ant-form-item-label"},[r("label",{attrs:{for:"exploit-jdbc-client"}},[t._v("Exploit Jdbc Client "),r("a-tooltip",{attrs:{placement:"topLeft",title:"Whether test to exploit jdbc client."}},[r("a-icon",{attrs:{type:"question-circle"}})],1)],1)]),r("a-switch",{attrs:{id:"exploit-jdbc-client",disabled:t.formReadOnly},model:{value:t.form.exploit_jdbc_client,callback:function(e){t.$set(t.form,"exploit_jdbc_client",e)},expression:"form.exploit_jdbc_client"}})],1)],1),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{label:"Payload"}},t._l(t.payloadKeys,(function(e){return r("a-input-group",{key:e,attrs:{compact:""}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Key-"+e],expression:"['Key-'+payloadKey,]"}],staticStyle:{width:"47%","margin-bottom":"5px"},attrs:{defaultOpen:!1,placeholder:"Key",disabled:!t.form.exploit_jdbc_client,readOnly:t.formReadOnly},model:{value:t.form["Key-"+e],callback:function(r){t.$set(t.form,"Key-"+e,r)},expression:"form['Key-'+payloadKey]"}}),r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Value-"+e],expression:"['Value-'+payloadKey,]"}],staticStyle:{width:"53%"},attrs:{placeholder:"Base64 encoded payload Value",disabled:!t.form.exploit_jdbc_client,readOnly:t.formReadOnly},on:{focus:function(){!t.formReadOnly&&e===t.payloadKeys[t.payloadKeys.length-1]&&t.form["Key-"+e]&&t.addPayload()}},model:{value:t.form["Value-"+e],callback:function(r){t.$set(t.form,"Value-"+e,r)},expression:"form['Value-'+payloadKey]"}},[r("a-icon",{staticClass:"dynamic-delete-button",attrs:{slot:"addonAfter",type:"minus-circle-o"},on:{click:function(){return t.form.exploit_jdbc_client?t.removePayload(e):null}},slot:"addonAfter"})],1)],1)})),1)],1)],1)],1),r("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[r("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),r("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,n=e.selectedKeys,o=(e.clearFilters,e.column);return r("div",{staticStyle:{padding:"8px"}},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+o.dataIndex,value:n[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[o.dataIndex]=n[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[o.dataIndex]=n[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"files",fn:function(e){return r("span",{},[t._v(" "+t._s(e.length>30?e.substr(0,30)+"...":e)+" ")])}},{key:"switchRender",fn:function(e,a,n,o){return r("span",{},[r("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(a,o.dataIndex)}}})],1)}},{key:"action",fn:function(e,a,n){return r("span",{},[r("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none","margin-right":"10px"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(a)}}},[t._v("View")]),r("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none","margin-right":"10px"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(a,n)}}},[t._v("Edit")]),r("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(a,n)}}},[r("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},n=[],o=r("5530"),i=(r("a434"),r("34c6")),s=r("56d7"),l=r("2084"),c="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format"},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"FILES",dataIndex:"files",key:"files",scopedSlots:{customRender:"files"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={files:[{required:!1,message:"please enter file name"}]},h={name:"MysqlRules",data:function(){return{data:[],formVisible:!1,pagination:{current:1},filters:{},loading:!1,columns:f,form:{},rules:p,payloadKeys:[1],formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,r){var a=Object(o["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this;this.loading=!0;var e=Object(o["a"])(Object(o["a"])({},this.filters),{},{page:this.pagination.current,order:this.order});Object(i["f"])(e).then((function(e){var r=e.data.result;t.data=r.data;var a=Object(o["a"])({},t.pagination);a.total=r.count,t.pagination=a,t.loading=!1})).catch((function(e){if(403===e.response.status)return s["store"].authed=!1,[];t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(t,e){var r=this;t[e]=!t[e],Object(i["i"])(t).then().catch((function(t){r.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(c)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var r=this;Object(i["c"])(t).then((function(){r.data.splice(e,1)})).catch((function(t){r.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){for(var e in this.formAction=t,this.formReadOnly=t===c,this.formVisible=!0,this.form.payloads)this.form["Key-"+this.payloadKeys.length]=e,this.form["Value-"+this.payloadKeys.length]=this.form.payloads[e],this.addPayload();this.formReadOnly&&this.removePayload(this.payloadKeys.length)},closeDrawer:function(){this.formVisible=!1,this.payloadKeys=[1]},addPayload:function(){this.payloadKeys.push(this.payloadKeys[this.payloadKeys.length-1]+1)},removePayload:function(t){this.payloadKeys.length>1&&this.payloadKeys.splice(this.payloadKeys.indexOf(t),1)},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){if(e){var r={},a={};for(var n in t.form)if(0===n.indexOf("Key-")){var o=n.substr("Key-".length);t.form["Value-"+o]&&(r[t.form[n]]=t.form["Value-"+o])}else-1===n.indexOf("Value-")&&(a[n]=t.form[n]);a.payloads=r,Object(i["i"])(a).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:l["a"]}},m=h,y=(r("e331"),r("2877")),g=Object(y["a"])(m,a,n,!1,null,"d55a8788",null);e["default"]=g.exports},"159b":function(t,e,r){var a=r("da84"),n=r("fdbc"),o=r("17c2"),i=r("9112");for(var s in n){var l=a[s],c=l&&l.prototype;if(c&&c.forEach!==o)try{i(c,"forEach",o)}catch(d){c.forEach=o}}},"17c2":function(t,e,r){"use strict";var a=r("b727").forEach,n=r("a640"),o=n("forEach");t.exports=o?[].forEach:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var a=r("d039"),n=r("b622"),o=r("2d00"),i=n("species");t.exports=function(t){return o>=51||!a((function(){var e=[],r=e.constructor={};return r[i]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},2084:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{label:"Name",rules:t.rules.name,prop:"name"}},[r("a-input",{attrs:{placeholder:"Please enter rule name",readOnly:t.readOnly},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1)],1),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{rules:t.rules.flagFormat,prop:"flag_format"}},[r("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Flag Format "),r("a-tooltip",{attrs:{title:"1. Only when the request contains content that satisfies the flag format, the request will be captured.\n 2. Please use regular expression syntax.\n 3. The character '*' means to capture all requests.\n 4. Advanced usage: When the format uses grouping, the platform will only notify the user or push to the client when the first group appears for the first time."}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),r("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"please enter flag format",readOnly:t.readOnly},model:{value:t.form.flag_format,callback:function(e){t.$set(t.form,"flag_format",e)},expression:"form.flag_format"}})],1)],1)],1),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{prop:"rank"}},[r("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Rank "),r("a-tooltip",{attrs:{title:"When request match multiple rules, high-rank rules will be matched first"}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),r("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["rank"],expression:"['rank']"}],staticStyle:{width:"100%"},attrs:{disabled:t.readOnly,placeholder:"0"},model:{value:t.form.rank,callback:function(e){t.$set(t.form,"rank",e)},expression:"form.rank"}})],1)],1)],1),r("a-row",{attrs:{gutter:16}},[r("a-col",{attrs:{span:12}},[r("a-form-model-item",[r("div",{staticClass:"ant-form-item-label"},[r("label",{attrs:{for:"push-to-client"}},[t._v("Push to Client "),r("a-tooltip",{attrs:{placement:"topLeft",title:"Whether push to client when capture flag with this rule."}},[r("a-icon",{attrs:{type:"question-circle"}})],1)],1)]),r("a-switch",{attrs:{id:"push-to-client",disabled:t.readOnly},model:{value:t.form.push_to_client,callback:function(e){t.$set(t.form,"push_to_client",e)},expression:"form.push_to_client"}})],1)],1),r("a-col",{attrs:{span:12}},[r("a-form-model-item",[r("div",{staticClass:"ant-form-item-label"},[r("label",{attrs:{for:"notice"}},[t._v("Notice "),r("a-tooltip",{attrs:{placement:"topLeft",title:"Whether notice with bot when capture flag with this rule."}},[r("a-icon",{attrs:{type:"question-circle"}})],1)],1)]),r("a-switch",{attrs:{id:"notice",disabled:t.readOnly},model:{value:t.form.notice,callback:function(e){t.$set(t.form,"notice",e)},expression:"form.notice"}})],1)],1)],1)],1)},n=[],o={name:"BasicRule",data:function(){return{rules:{name:[{required:!0,message:"Please input rule name",trigger:"blur"}],flagFormat:[{required:!0,message:"Please input flag format",trigger:"blur"}]}}},props:["form","readOnly"]},i=o,s=r("2877"),l=Object(s["a"])(i,a,n,!1,null,"41207ecf",null);e["a"]=l.exports},"26cb":function(t,e,r){},"2e08":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[r("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),r("a-drawer",{attrs:{title:t.formAction+" Dns rule",width:460,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[r("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[r("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly}}),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:12}},[r("a-form-model-item",{attrs:{label:"Type",rules:t.rules.type}},[r("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["type"],expression:"['type']"}],staticStyle:{width:"100%"},attrs:{disabled:t.formReadOnly,placeholder:"A"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[r("a-select-option",{attrs:{value:1}},[t._v("A")]),r("a-select-option",{attrs:{value:28}},[t._v("AAAA")]),r("a-select-option",{attrs:{value:5}},[t._v("CNAME")]),r("a-select-option",{attrs:{value:16}},[t._v("TXT")]),r("a-select-option",{attrs:{value:2}},[t._v("NS")]),r("a-select-option",{attrs:{value:99}},[t._v("REBINDING")])],1)],1)],1),r("a-col",{attrs:{span:12}},[r("a-form-model-item",{attrs:{label:"TTL",rules:t.rules.ttl}},[r("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ttl"],expression:"['ttl']"}],staticStyle:{width:"100%"},attrs:{disabled:t.formReadOnly,placeholder:"10",value:99===t.form.type?t.form.ttl=0:null},model:{value:t.form.ttl,callback:function(e){t.$set(t.form,"ttl",e)},expression:"form.ttl"}})],1)],1)],1),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{label:"Value",rules:t.rules.value}},[r("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:99===t.form.type?"8.8.8.8,127.0.0.1":"please enter resolve value",readOnly:t.formReadOnly},model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1)],1)],1)],1),r("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[r("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),r("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,n=e.selectedKeys,o=(e.clearFilters,e.column);return r("div",{staticStyle:{padding:"8px"}},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+o.dataIndex,value:n[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[o.dataIndex]=n[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[o.dataIndex]=n[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"type",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(t.resolveTypes[e])+" ")])],1)}},{key:"switchRender",fn:function(e,a,n,o){return r("span",{},[r("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(a,o.dataIndex)}}})],1)}},{key:"valueRender",fn:function(e){return r("span",{},t._l(e.split(","),(function(e){return r("span",{key:e},[t._v(t._s(e)),r("br")])})),0)}},{key:"action",fn:function(e,a,n){return r("span",{},[r("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none","margin-right":"10px"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(a,n)}}},[t._v("Edit")]),r("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(a,n)}}},[r("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},n=[],o=r("5530"),i=(r("a434"),r("34c6")),s=r("56d7"),l=r("2084"),c="View",d="Edit",u="Create",f={1:"geekblue",28:"green",5:"red",16:"pink",2:"purple",99:"orange"},p={1:"A",28:"AAAA",5:"CNAME",16:"TXT",2:"NS",99:"RB"},h=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format"},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"TYPE",dataIndex:"type",key:"type",scopedSlots:{customRender:"type"}},{title:"TTL",dataIndex:"ttl",key:"ttl"},{title:"VALUE",dataIndex:"value",key:"value",scopedSlots:{customRender:"valueRender"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],m={value:[{required:!1,message:"please enter resolve value"}],type:[{required:!1,message:"please enter resolve type"}],ttl:[{required:!1,message:"please enter resolve ttl"}]},y={name:"DnsRules",data:function(){return{data:[],formVisible:!1,pagination:{current:1},filters:{},loading:!1,columns:h,colors:f,resolveTypes:p,form:{},rules:m,formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,r){var a=Object(o["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this;this.loading=!0;var e=Object(o["a"])(Object(o["a"])({},this.filters),{},{page:this.pagination.current,order:this.order});Object(i["d"])(e).then((function(e){var r=e.data.result;t.data=r.data;var a=Object(o["a"])({},t.pagination);a.total=r.count,t.pagination=a,t.loading=!1})).catch((function(e){if(403===e.response.status)return s["store"].authed=!1,[];t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(t,e){var r=this;t[e]=!t[e],Object(i["g"])(t).then().catch((function(t){r.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(c)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var r=this;Object(i["a"])(t).then((function(){r.data.splice(e,1)})).catch((function(t){r.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){this.formAction=t,this.formReadOnly=t===c,this.formVisible=!0},closeDrawer:function(){this.formVisible=!1},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(i["g"])(t.form).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:l["a"]}},g=y,b=(r("ed5d"),r("2877")),v=Object(b["a"])(g,a,n,!1,null,"56172c6c",null);e["default"]=v.exports},"2e9f":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"expandedRowRender",fn:function(e){return e.files.length?r("div",{staticStyle:{margin:"0"}},[e.files.length?r("b",{staticStyle:{color:"gray"}},[t._v("FILES:")]):t._e(),r("br"),t._l(e.files,(function(a){return r("a",{key:a.name+e.id,attrs:{href:"/revsuit/api/file/mysql/"+a.id,target:"_blank"}},[t._v(t._s(a.name)+" ")])}))],2):t._e()}},{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,n=e.selectedKeys,o=e.clearFilters,i=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+i.dataIndex,value:n[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[i.dataIndex]=n[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[i.dataIndex]=n[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){o(),delete t.filters[i.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"loadData",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"green"}},[t._v("True")]):r("a-tag",{attrs:{color:"red"}},[t._v("False")])],1)}},{key:"fileNum",fn:function(e){return r("span",{},[e.length>=3?r("a-tag",{attrs:{color:"purple"}},[t._v(t._s(e.length))]):r("a-tag",{attrs:{color:t.colors[e.length]}},[t._v(" "+t._s(e.length)+" ")])],1)}}],null,!0)})},n=[],o=r("5530"),i=r("e5bf"),s=r("56d7"),l=["geekblue","blue","pink"],c=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"USER",dataIndex:"username",key:"username",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"LOAD DATA",dataIndex:"load_local_data",key:"load_local_data",scopedSlots:{customRender:"loadData"}},{title:"FILE NUM",dataIndex:"files",key:"files",scopedSlots:{customRender:"fileNum"}},{title:"CLIENT NAME",dataIndex:"client_name",key:"client_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"CLIENT OS",dataIndex:"client_os",key:"client_os",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],d={name:"MysqlLogs",data:function(){return{data:[],pagination:{current:1},filters:{},order:"desc",loading:!1,columns:c,colors:l}},methods:{handleTableChange:function(t,e,r){var a=Object(o["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this;this.loading=!0;var e=Object(o["a"])(Object(o["a"])({},this.filters),{},{page:this.pagination.current,order:this.order});Object(i["c"])(e).then((function(e){var r=e.data.result;t.data=r.data;var a=Object(o["a"])({},t.pagination);a.total=r.count,t.pagination=a,t.loading=!1})).catch((function(t){if(403===t.response.status)return s["store"].authed=!1,[];console.error(t)}))}},mounted:function(){this.fetch({page:"1"})}},u=d,f=(r("6aae"),r("2877")),p=Object(f["a"])(u,a,n,!1,null,null,null);e["default"]=p.exports},"30d9":function(t,e,r){},"333e":function(t,e,r){"use strict";r("db2e")},"34c6":function(t,e,r){"use strict";r.d(e,"e",(function(){return n})),r.d(e,"h",(function(){return o})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return s})),r.d(e,"g",(function(){return l})),r.d(e,"a",(function(){return c})),r.d(e,"f",(function(){return d})),r.d(e,"i",(function(){return u})),r.d(e,"c",(function(){return f}));var a=r("365c");function n(t){return Object(a["a"])({url:"/rule/http",params:t,method:"get",validateStatus:function(t){return t>=200&&t<300}})}function o(t){return Object(a["a"])({url:"/rule/http",data:t,method:"post",validateStatus:function(t){return t>=200&&t<300}})}function i(t){return Object(a["a"])({url:"/rule/http",data:t,method:"delete",validateStatus:function(t){return t>=200&&t<300}})}function s(t){return Object(a["a"])({url:"/rule/dns",params:t,method:"get",validateStatus:function(t){return t>=200&&t<300}})}function l(t){return Object(a["a"])({url:"/rule/dns",data:t,method:"post",validateStatus:function(t){return t>=200&&t<300}})}function c(t){return Object(a["a"])({url:"/rule/dns",data:t,method:"delete",validateStatus:function(t){return t>=200&&t<300}})}function d(t){return Object(a["a"])({url:"/rule/mysql",params:t,method:"get",validateStatus:function(t){return t>=200&&t<300}})}function u(t){return Object(a["a"])({url:"/rule/mysql",data:t,method:"post",validateStatus:function(t){return t>=200&&t<300}})}function f(t){return Object(a["a"])({url:"/rule/mysql",data:t,method:"delete",validateStatus:function(t){return t>=200&&t<300}})}},"4de4":function(t,e,r){"use strict";var a=r("23e7"),n=r("b727").filter,o=r("1dde"),i=o("filter");a({target:"Array",proto:!0,forced:!i},{filter:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},"50ec":function(t,e,r){},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}},"5ea0":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,n=e.selectedKeys,o=e.clearFilters,i=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+i.dataIndex,value:n[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[i.dataIndex]=n[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[i.dataIndex]=n[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){o(),delete t.filters[i.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}}])})},n=[],o=r("5530"),i=r("e5bf"),s=r("56d7"),l=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"DOMAIN",dataIndex:"domain",key:"domain",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],c={name:"DnsLogs",data:function(){return{data:[],pagination:{current:1},filters:{},order:"desc",loading:!1,columns:l}},methods:{handleTableChange:function(t,e,r){var a=Object(o["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this;this.loading=!0;var e=Object(o["a"])(Object(o["a"])({},this.filters),{},{page:this.pagination.current,order:this.order});Object(i["a"])(e).then((function(e){var r=e.data.result;t.data=r.data;var a=Object(o["a"])({},t.pagination);a.total=r.count,t.pagination=a,t.loading=!1})).catch((function(t){if(403===t.response.status)return s["store"].authed=!1,[];console.error(t)}))}},mounted:function(){this.fetch({page:"1"})}},d=c,u=(r("333e"),r("2877")),f=Object(u["a"])(d,a,n,!1,null,null,null);e["default"]=f.exports},"65f0":function(t,e,r){var a=r("861d"),n=r("e8b5"),o=r("b622"),i=o("species");t.exports=function(t,e){var r;return n(t)&&(r=t.constructor,"function"!=typeof r||r!==Array&&!n(r.prototype)?a(r)&&(r=r[i],null===r&&(r=void 0)):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},"6aae":function(t,e,r){"use strict";r("50ec")},"746f":function(t,e,r){var a=r("428f"),n=r("5135"),o=r("e5383"),i=r("9bf2").f;t.exports=function(t){var e=a.Symbol||(a.Symbol={});n(e,t)||i(e,t,{value:o.f(t)})}},"7d3f":function(t,e,r){},"7d9a":function(t,e,r){},8418:function(t,e,r){"use strict";var a=r("c04e"),n=r("9bf2"),o=r("5c6c");t.exports=function(t,e,r){var i=a(e);i in t?n.f(t,i,o(0,r)):t[i]=r}},"9520c":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[r("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),r("a-drawer",{attrs:{title:t.formAction+" HTTP rule",width:460,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[r("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[r("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly}}),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",{attrs:{rules:t.rules.response_status_code,prop:"response_status_code"}},[r("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Response Status Code "),r("a-tooltip",{attrs:{title:"Number between 100-600, or template such as ${query.var_name}/${body.var_name}/${header.var_name}"}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),r("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"200",disabled:t.formReadOnly},model:{value:t.form.response_status_code,callback:function(e){t.$set(t.form,"response_status_code",e)},expression:"form.response_status_code"}})],1)],1)],1),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",[r("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Response Headers "),r("a-tooltip",{attrs:{title:"Support template such as ${query.var_name}/${body.var_name}/${header.var_name}"}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),t._l(t.headerKeys,(function(e){return r("a-input-group",{key:e,attrs:{compact:""}},[r("a-auto-complete",{directives:[{name:"decorator",rawName:"v-decorator",value:["Header-"+e],expression:"['Header-'+headerKey,]"}],staticStyle:{width:"47%","margin-bottom":"5px"},attrs:{dataSource:t.headerSet,filterOption:t.filterOption,defaultOpen:!1,placeholder:"Header",disabled:t.formReadOnly},model:{value:t.form["Header-"+e],callback:function(r){t.$set(t.form,"Header-"+e,r)},expression:"form['Header-'+headerKey]"}}),r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Value-"+e],expression:"['Value-'+headerKey,]"}],staticStyle:{width:"53%"},attrs:{placeholder:"Value",disabled:t.formReadOnly},on:{focus:function(){!t.formReadOnly&&e===t.headerKeys[t.headerKeys.length-1]&&t.form["Header-"+e]&&t.addHeader()}},model:{value:t.form["Value-"+e],callback:function(r){t.$set(t.form,"Value-"+e,r)},expression:"form['Value-'+headerKey]"}},[r("a-icon",{staticClass:"dynamic-delete-button",attrs:{slot:"addonAfter",type:"minus-circle-o"},on:{click:function(){return t.formReadOnly?null:t.removeHeader(e)}},slot:"addonAfter"})],1)],1)}))],2)],1)],1),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:24}},[r("a-form-model-item",[r("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Response Body "),r("a-tooltip",{attrs:{title:"Support template such as ${query.var_name}/${body.var_name}/${header.var_name}"}},[r("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),r("a-textarea",{attrs:{placeholder:"Hello RevSuit!",readOnly:t.formReadOnly},model:{value:t.form.response_body,callback:function(e){t.$set(t.form,"response_body",e)},expression:"form.response_body"}})],1)],1)],1)],1),r("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[r("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),r("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,n=e.selectedKeys,o=(e.clearFilters,e.column);return r("div",{staticStyle:{padding:"8px"}},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+o.dataIndex,value:n[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[o.dataIndex]=n[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[o.dataIndex]=n[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"switchRender",fn:function(e,a,n,o){return r("span",{},[r("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(a,o.dataIndex)}}})],1)}},{key:"action",fn:function(e,a,n){return r("span",{},[r("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none","margin-right":"10px"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(a)}}},[t._v("View")]),r("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none","margin-right":"10px"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(a,n)}}},[t._v("Edit")]),r("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(a,n)}}},[r("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},n=[],o=r("5530"),i=(r("a434"),r("34c6")),s=r("56d7"),l=r("2084"),c="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format"},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={response_status_code:[{validator:function(t,e,r){return console.log(e),void 0===e||!isNaN(e)&&100<e&&e<600||/\${(query|body|header)\..+?}/.test(e)?r():r(new Error("please input legal response status code value"))},trigger:"blur"}]},h={name:"HttpRules",data:function(){return{data:[],formVisible:!1,pagination:{current:1},filters:{},loading:!1,columns:f,form:{},rules:p,formReadOnly:!1,formAction:"",headerKeys:[1],headerSet:["Accept-Patch","Accept-Ranges","Age","Allow","Cache-Control","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Type","Date","Delta-Base","ETag","Expires","Last-Modified","Link","Location","Pragma","Proxy-Authenticate","Public-Key-Pins","Retry-After","Server","Set-Cookie","Strict-Transport-Security","Transfer-Encoding","Upgrade","Vary","Via","Warning","WWW-Authenticate","Content-Security-Policy","Refresh","X-Powered-By","X-Request-ID","X-UA-Compatible","X-XSS-Protection","Access-Control-Allow-Origin","Access-Control-Allow-Credentials","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Allow-Methods","Access-Control-Allow-Headers"]}},methods:{handleTableChange:function(t,e,r){var a=Object(o["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this;this.loading=!0;var e=Object(o["a"])(Object(o["a"])({},this.filters),{},{page:this.pagination.current,order:this.order});Object(i["e"])(e).then((function(e){var r=e.data.result;t.data=r.data;var a=Object(o["a"])({},t.pagination);a.total=r.count,t.pagination=a,t.loading=!1})).catch((function(e){if(403===e.response.status)return s["store"].authed=!1,[];t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(t,e){var r=this;t[e]=!t[e],Object(i["h"])(t).catch((function(t){r.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(c)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var r=this;Object(i["b"])(t).then((function(){r.data.splice(e,1)})).catch((function(t){r.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){for(var e in this.formAction=t,this.formReadOnly=t===c,this.formVisible=!0,this.form.response_headers)this.form["Header-"+this.headerKeys.length]=e,this.form["Value-"+this.headerKeys.length]=this.form.response_headers[e],this.addHeader();this.formReadOnly&&this.removeHeader(this.headerKeys.length)},closeDrawer:function(){this.formVisible=!1,this.headerKeys=[1]},addHeader:function(){this.headerKeys.push(this.headerKeys[this.headerKeys.length-1]+1)},removeHeader:function(t){this.headerKeys.length>1&&this.headerKeys.splice(this.headerKeys.indexOf(t),1)},filterOption:function(t,e){return e.componentOptions.children[0].text.toUpperCase().indexOf(t.toUpperCase())>=0},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;var r={},a={};for(var n in t.form)if(0===n.indexOf("Header-")){var o=n.substr("Header-".length);t.form["Value-"+o]&&(a[t.form[n]]=t.form["Value-"+o])}else-1===n.indexOf("Value-")&&(r[n]=t.form[n]);r.response_headers=a,Object(i["h"])(r).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:l["a"]}},m=h,y=(r("c88f"),r("2877")),g=Object(y["a"])(m,a,n,!1,null,"0f53e934",null);e["default"]=g.exports},a434:function(t,e,r){"use strict";var a=r("23e7"),n=r("23cb"),o=r("a691"),i=r("50c4"),s=r("7b0b"),l=r("65f0"),c=r("8418"),d=r("1dde"),u=d("splice"),f=Math.max,p=Math.min,h=9007199254740991,m="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!u},{splice:function(t,e){var r,a,d,u,y,g,b=s(this),v=i(b.length),w=n(t,v),x=arguments.length;if(0===x?r=a=0:1===x?(r=0,a=v-w):(r=x-2,a=p(f(o(e),0),v-w)),v+r-a>h)throw TypeError(m);for(d=l(b,a),u=0;u<a;u++)y=w+u,y in b&&c(d,u,b[y]);if(d.length=a,r<a){for(u=w;u<v-a;u++)y=u+a,g=u+r,y in b?b[g]=b[y]:delete b[g];for(u=v;u>v-a+r;u--)delete b[u-1]}else if(r>a)for(u=v-a;u>w;u--)y=u+a-1,g=u+r-1,y in b?b[g]=b[y]:delete b[g];for(u=0;u<r;u++)b[u+w]=arguments[u+2];return b.length=v-a+r,d}})},a4d3:function(t,e,r){"use strict";var a=r("23e7"),n=r("da84"),o=r("d066"),i=r("c430"),s=r("83ab"),l=r("4930"),c=r("fdbf"),d=r("d039"),u=r("5135"),f=r("e8b5"),p=r("861d"),h=r("825a"),m=r("7b0b"),y=r("fc6a"),g=r("c04e"),b=r("5c6c"),v=r("7c73"),w=r("df75"),x=r("241c"),_=r("057f"),k=r("7418"),S=r("06cf"),O=r("9bf2"),I=r("d1e7"),R=r("9112"),A=r("6eeb"),E=r("5692"),D=r("f772"),j=r("d012"),C=r("90e3"),T=r("b622"),K=r("e5383"),N=r("746f"),P=r("d44e"),$=r("69f3"),L=r("b727").forEach,V=D("hidden"),F="Symbol",q="prototype",M=T("toPrimitive"),H=$.set,U=$.getterFor(F),z=Object[q],B=n.Symbol,J=o("JSON","stringify"),W=S.f,G=O.f,X=_.f,Q=I.f,Y=E("symbols"),Z=E("op-symbols"),tt=E("string-to-symbol-registry"),et=E("symbol-to-string-registry"),rt=E("wks"),at=n.QObject,nt=!at||!at[q]||!at[q].findChild,ot=s&&d((function(){return 7!=v(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(t,e,r){var a=W(z,e);a&&delete z[e],G(t,e,r),a&&t!==z&&G(z,e,a)}:G,it=function(t,e){var r=Y[t]=v(B[q]);return H(r,{type:F,tag:t,description:e}),s||(r.description=e),r},st=c?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof B},lt=function(t,e,r){t===z&<(Z,e,r),h(t);var a=g(e,!0);return h(r),u(Y,a)?(r.enumerable?(u(t,V)&&t[V][a]&&(t[V][a]=!1),r=v(r,{enumerable:b(0,!1)})):(u(t,V)||G(t,V,b(1,{})),t[V][a]=!0),ot(t,a,r)):G(t,a,r)},ct=function(t,e){h(t);var r=y(e),a=w(r).concat(ht(r));return L(a,(function(e){s&&!ut.call(r,e)||lt(t,e,r[e])})),t},dt=function(t,e){return void 0===e?v(t):ct(v(t),e)},ut=function(t){var e=g(t,!0),r=Q.call(this,e);return!(this===z&&u(Y,e)&&!u(Z,e))&&(!(r||!u(this,e)||!u(Y,e)||u(this,V)&&this[V][e])||r)},ft=function(t,e){var r=y(t),a=g(e,!0);if(r!==z||!u(Y,a)||u(Z,a)){var n=W(r,a);return!n||!u(Y,a)||u(r,V)&&r[V][a]||(n.enumerable=!0),n}},pt=function(t){var e=X(y(t)),r=[];return L(e,(function(t){u(Y,t)||u(j,t)||r.push(t)})),r},ht=function(t){var e=t===z,r=X(e?Z:y(t)),a=[];return L(r,(function(t){!u(Y,t)||e&&!u(z,t)||a.push(Y[t])})),a};if(l||(B=function(){if(this instanceof B)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=C(t),r=function(t){this===z&&r.call(Z,t),u(this,V)&&u(this[V],e)&&(this[V][e]=!1),ot(this,e,b(1,t))};return s&&nt&&ot(z,e,{configurable:!0,set:r}),it(e,t)},A(B[q],"toString",(function(){return U(this).tag})),A(B,"withoutSetter",(function(t){return it(C(t),t)})),I.f=ut,O.f=lt,S.f=ft,x.f=_.f=pt,k.f=ht,K.f=function(t){return it(T(t),t)},s&&(G(B[q],"description",{configurable:!0,get:function(){return U(this).description}}),i||A(z,"propertyIsEnumerable",ut,{unsafe:!0}))),a({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:B}),L(w(rt),(function(t){N(t)})),a({target:F,stat:!0,forced:!l},{for:function(t){var e=String(t);if(u(tt,e))return tt[e];var r=B(e);return tt[e]=r,et[r]=e,r},keyFor:function(t){if(!st(t))throw TypeError(t+" is not a symbol");if(u(et,t))return et[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),a({target:"Object",stat:!0,forced:!l,sham:!s},{create:dt,defineProperty:lt,defineProperties:ct,getOwnPropertyDescriptor:ft}),a({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:pt,getOwnPropertySymbols:ht}),a({target:"Object",stat:!0,forced:d((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(m(t))}}),J){var mt=!l||d((function(){var t=B();return"[null]"!=J([t])||"{}"!=J({a:t})||"{}"!=J(Object(t))}));a({target:"JSON",stat:!0,forced:mt},{stringify:function(t,e,r){var a,n=[t],o=1;while(arguments.length>o)n.push(arguments[o++]);if(a=e,(p(e)||void 0!==t)&&!st(t))return f(e)||(e=function(t,e){if("function"==typeof a&&(e=a.call(this,t,e)),!st(e))return e}),n[1]=e,J.apply(null,n)}})}B[q][M]||R(B[q],M,B[q].valueOf),P(B,F),j[V]=!0},a640:function(t,e,r){"use strict";var a=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&a((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var a=r("23e7"),n=r("7b0b"),o=r("df75"),i=r("d039"),s=i((function(){o(1)}));a({target:"Object",stat:!0,forced:s},{keys:function(t){return o(n(t))}})},b727:function(t,e,r){var a=r("0366"),n=r("44ad"),o=r("7b0b"),i=r("50c4"),s=r("65f0"),l=[].push,c=function(t){var e=1==t,r=2==t,c=3==t,d=4==t,u=6==t,f=7==t,p=5==t||u;return function(h,m,y,g){for(var b,v,w=o(h),x=n(w),_=a(m,y,3),k=i(x.length),S=0,O=g||s,I=e?O(h,k):r||f?O(h,0):void 0;k>S;S++)if((p||S in x)&&(b=x[S],v=_(b,S,w),t))if(e)I[S]=v;else if(v)switch(t){case 3:return!0;case 5:return b;case 6:return S;case 2:l.call(I,b)}else switch(t){case 4:return!1;case 7:l.call(I,b)}return u?-1:c||d?d:I}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},c88f:function(t,e,r){"use strict";r("7d3f")},db2e:function(t,e,r){},dbb4:function(t,e,r){var a=r("23e7"),n=r("83ab"),o=r("56ef"),i=r("fc6a"),s=r("06cf"),l=r("8418");a({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(t){var e,r,a=i(t),n=s.f,c=o(a),d={},u=0;while(c.length>u)r=n(a,e=c[u++]),void 0!==r&&l(d,e,r);return d}})},dbbc:function(t,e,r){"use strict";r("30d9")},e331:function(t,e,r){"use strict";r("7d9a")},e439:function(t,e,r){var a=r("23e7"),n=r("d039"),o=r("fc6a"),i=r("06cf").f,s=r("83ab"),l=n((function(){i(1)})),c=!s||l;a({target:"Object",stat:!0,forced:c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return i(o(t),e)}})},e5383:function(t,e,r){var a=r("b622");e.f=a},e5bf:function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return i}));var a=r("365c");function n(t){return Object(a["a"])({url:"/record/http",params:t,method:"get",validateStatus:function(t){return t>=200&&t<300}})}function o(t){return Object(a["a"])({url:"/record/dns",params:t,method:"get",validateStatus:function(t){return t>=200&&t<300}})}function i(t){return Object(a["a"])({url:"/record/mysql",params:t,method:"get",validateStatus:function(t){return t>=200&&t<300}})}},e8b5:function(t,e,r){var a=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==a(t)}},ed5d:function(t,e,r){"use strict";r("26cb")},f889:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,n=e.selectedKeys,o=e.clearFilters,i=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+i.dataIndex,value:n[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[i.dataIndex]=n[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[i.dataIndex]=n[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){o(),delete t.filters[i.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"method",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(e.toUpperCase())+" ")])],1)}},{key:"expandedRowRender",fn:function(e){return r("code",{staticStyle:{margin:"0"}},[r("b",{staticStyle:{color:"gray"}},[t._v("RAW REQUEST:")]),r("br"),r("hr"),r("span",{staticStyle:{"white-space":"pre-line"}},[t._v(t._s(e.raw_request))])])}}])})},n=[],o=r("5530"),i=r("e5bf"),s=r("56d7"),l={GET:"green",POST:"red",HEAD:"pink",PUT:"geekblue",OPTIONS:"cyan",DELETE:"purple"},c=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"METHOD",dataIndex:"method",key:"method",scopedSlots:{customRender:"method",filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"PATH",dataIndex:"path",key:"path",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],d={name:"HttpLogs",data:function(){return{data:[],pagination:{current:1},filters:{},loading:!1,columns:c,colors:l}},methods:{handleTableChange:function(t,e,r){var a=Object(o["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this;this.loading=!0;var e=Object(o["a"])(Object(o["a"])({},this.filters),{},{page:this.pagination.current,order:this.order});Object(i["b"])(e).then((function(e){var r=e.data.result;t.data=r.data;var a=Object(o["a"])({},t.pagination);a.total=r.count,t.pagination=a,t.loading=!1})).catch((function(t){if(403===t.response.status)return s["store"].authed=!1,[];console.error(t)}))}},mounted:function(){this.fetch({page:"1"})}},u=d,f=(r("dbbc"),r("2877")),p=Object(f["a"])(u,a,n,!1,null,null,null);e["default"]=p.exports}}]);
|
|
//# sourceMappingURL=about.js.map
|