Files
DirectAdmin-1.62.4/directadmin-1.62.4/data/skins/evolution/assets/pages/21.js
tuend-work 0b28a76e20 ud
2025-11-12 23:24:15 +07:00

1 line
17 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1277:function(t,e,n){"use strict";n.r(e);var r=n(2973),i=n(1587);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n(0),s=n(2449),l=n.n(s),u=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);"function"==typeof l.a&&l()(u),e.default=u.exports},1427:function(t,e,n){"use strict";var r=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.unblock=e.block=e.unskip=e.skip=e.getBlockList=e.getSkipList=e.getUserList=e.getIpList=e.getGeneralList=e.getIpInfo=e.getDefaults=void 0;var i=r(n(2)),o=r(n(30));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l="/CMD_BRUTE_FORCE_MONITOR",u=function(t,e){return o.default.get(s({id:t,url:l},e))},c=function(t,e){return o.default.post({url:l,params:{action:t},schema:e})},f=u("BFM_DEFAULTS",{params:{seek_value:"-1"},after:function(t){return t.flow(t.project({logsize:"BRUTE_LOG_SIZE",userLimit:"USER_LIMIT",ipLimit:"IP_LIMIT",logScanning:"LOG_SCANNING",subjects:"SUBJECT_SELECT",defaultSubject:"SUBJECT_SELECT","scripts.block":"HAVE_BLOCK_SH","scripts.unblock":"HAVE_UNBLOCK_SH","scripts.show_blocked_ips":"HAVE_SHOW_BLOCKED_IPS_SH"}),t.mapProps({logScanning:t.convert.toAppBoolean,subjects:t.toSelect,defaultSubject:t.flow(t.find(t.getProp("selected")),t.getProp("value")),scripts:t.mapValues(t.isEqual("1"))}))}});e.getDefaults=f;var p=u("BFM_IPINFO",{schema:{ipinfo:o.default.REQUIRED_STRING},after:function(t){return t.flow(t.project({ip:"BLOCK_IP",data:"info"}),t.mapProp("data",t.flow(t.convert.toLines,t.filter(t.notEmpty))))}});e.getIpInfo=p;var d=u("BFM_GENERAL_LIST",{params:{show:"LOGINFAILURES"},pagination:!0,schema:{filter:o.default.OPTIONAL_STRING,value:o.default.OPTIONAL_STRING},before:function(t){var e=t.filter,n=t.value,r={};if(t.sort||(r.sort1="-1"),e){var i="ip"===e?2:3;r["comparison".concat(i)]="equals",r["value".concat(i)]=n}return r},after:function(t){return t.flow(t.project({rows:"LOGINFAILURES"}),t.processTableInfo("rows"),t.mapProp("rows",t.toArray),t.mapProp("rows",t.mapArray((function(t){return s({},t,{date:new Date(Number(t.id.slice(0,13))),index:Number(t.id.slice(13))})}))))}});e.getGeneralList=d;var b=u("BFM_IPLIST",{params:{show:"IPLOGINFAILURES",sort1:-2},pagination:!0,after:function(t){return t.flow(t.project({rows:"IPLOGINFAILURES"}),t.processTableInfo("rows"),t.mapProp("rows",t.flow(t.toArray,t.mapArray(t.project({ip:"ip",failures:"login_failures",first:"first_entry",last:"last_entry",notified:"notified",blocked:"blocked"})),t.mapArrayProps({first:t.convert.toAppDate,last:t.convert.toAppDate,notified:t.isEqual("Yes"),blocked:t.isEqual("Yes")}))))}});e.getIpList=b;var g=u("BFM_USER_LIST",{params:{show:"USERLOGINFAILURES",sort1:-2},pagination:!0,after:function(t){return t.flow(t.project({rows:"USERLOGINFAILURES"}),t.processTableInfo("rows"),t.mapProp("rows",t.flow(t.toArray,t.mapArrayProps({first_entry:t.convert.toAppDate,last_entry:t.convert.toAppDate,notified:t.isEqual("Yes")}))))}});e.getUserList=g;var v=u("BFM_SKIP_LIST",{params:{show:"SKIPLIST"},pagination:!0,after:function(t){return t.flow(t.project({rows:"SKIPLIST"}),t.processTableInfo("rows"),t.mapProp("rows",t.flow(t.toArray,t.mapArray(t.flow(t.moveProp("when","date"),t.mapProp("date",t.convert.toAppDate))))))}});e.getSkipList=v;var _=u("BFM_BLOCK_LIST",{params:{show:"BLOCKED_IPS"},pagination:!0,after:function(t){return t.flow(t.project({rows:"BLOCKED_IPS"}),t.processTableInfo("rows"),t.mapProp("rows",t.toArray),t.mapProp("rows",t.mapArray(t.deleteProp("ip_info"),t.mapProp("date_blocked",t.convert.toAppDate))))}});e.getBlockList=_;var A={type:Array,required:!1},m=o.default.OPTIONAL_STRING,I=c("skiplist",{ip:A,user:A,comments:m,skip_value:m});e.skip=I;var h=c("remove_from_skiplist",{select:o.default.ROWS});e.unskip=h;var O=c("block_ips",{ip:A,user:A});e.block=O;var P=c("unblock",{ip:o.default.ROWS});e.unblock=P},1428:function(t,e,n){"use strict";n.r(e);var r=n(1429),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e.default=i.a},1429:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={api:[{command:n(1427).getDefaults,bind:{"response.scripts":"scripts"}}],props:{id:{type:String,required:!0},filter:{type:Object,required:!1}},methods:{changeTab:function(t){var e=this,n="general"===t?"admin/brute-force-monitor":"admin/brute-force-monitor/".concat(t);n!==this.$route.name&&(this.$router.push({name:n}),this.$nextTick((function(){e.$refs.tabs.dataCurrentTab=e.id})))}},computed:{filterMessage:function(){if(this.filter){if("ip"===this.filter.filter)return this.$gettextInterpolate(this.$gettext("List filtered by IP: %{ ip }"),{ip:this.filter.value});if("user"===this.filter.filter)return this.$gettextInterpolate(this.$gettext("List filtered by User: %{ user } "),{user:this.filter.value})}return this.$gettext("Select IP address or User to filter results")},headers:function(){var t=[{id:"general",label:this.$gettext("Failed Logins"),desc:this.filterMessage},{id:"ip_list",label:this.$gettext("Failed Logins: IP list"),desc:this.$gettext("Select IP to filter results")},{id:"user_list",label:this.$gettext("Failed logins: Usernames List"),desc:this.$gettext("Select username to filter results")},{id:"skip_list",label:this.$gettext("Skip List"),desc:this.$gettext("Skipped IPs / Users")}];return this.$api.scripts.show_blocked_ips&&t.push({id:"block_list",label:this.$gettext("Block List"),desc:this.$gettext("View / Delete Blocked IPs")}),t}}};e.default=r},1453:function(t,e,n){"use strict";n.r(e);var r=n(1454),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e.default=i.a},1454:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={api:[{command:n(1427).getIpInfo,bind:"ipinfo"}]};e.default=r},1455:function(t,e,n){var r=n(1535);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(5).default)("00d3df85",r,!0,{})},1463:function(t,e,n){"use strict";n.r(e);var r=n(1470),i=n(1428);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n(0),s=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);e.default=s.exports},1470:function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("app-page-section",[e("ui-tabs",{ref:"tabs",attrs:{selected:this.id,tabs:this.headers},on:{"update:selected":this.changeTab}},[e("div",{attrs:{slot:"tab:"+this.id},slot:"tab:"+this.id},[this._t("default")],2)])],1)},i=[];n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},1478:function(t,e,n){"use strict";n.r(e);var r=n(1479),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e.default=i.a},1479:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={props:{subject:{type:String,required:!0}}};e.default=r},1480:function(t,e,n){"use strict";n.r(e);var r=n(1481),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e.default=i.a},1481:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(1427),i={props:{select:{type:Array,required:!0,default:function(){return[]}}},methods:{submit:function(){(0,r.skip)({ip:this.select})}}};e.default=i},1533:function(t,e,n){"use strict";n.r(e);var r=n(1549),i=n(1453);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n(1534);var a=n(0),s=Object(a.a)(i.default,r.a,r.b,!1,null,"2a2fd384",null);e.default=s.exports},1534:function(t,e,n){"use strict";var r=n(1455);n.n(r).a},1535:function(t,e,n){(t.exports=n(4)(!0)).push([t.i,"#SHOW_IPINFO_DIALOG .ip[data-v-2a2fd384]{color:#333;font-size:14px;background:#f7f7f7;text-align:left;padding:1rem;border-top-left-radius:4px;border-top-right-radius:4px;border:1px solid #ddd;border-bottom-width:0}#SHOW_IPINFO_DIALOG .ip[data-v-2a2fd384],#SHOW_IPINFO_DIALOG .ipinfo[data-v-2a2fd384]{margin:0;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,monospace,serif}#SHOW_IPINFO_DIALOG .ipinfo[data-v-2a2fd384]{list-style-type:none;background:#fff;padding:0 0 0 5px;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;overflow-x:auto}#SHOW_IPINFO_DIALOG .ipinfo .line[data-v-2a2fd384]{width:100%;text-indent:0}#SHOW_IPINFO_DIALOG .ipinfo .line-content[data-v-2a2fd384]{color:#333;padding:0;position:relative;white-space:nowrap;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%}","",{version:3,sources:["/home/evo/evolution/src/js/pages/admin/brute-force-monitor/_components/ipinfo-dialog.vue"],names:[],mappings:"AAuCA,yCAEQ,WACA,AAEA,eACA,mBACA,gBACA,aACA,2BACA,4BACA,sBACA,qBAAsB,CAZ9B,sFAGQ,SACA,0HACA,CALR,6CAeQ,qBACA,gBACA,AACA,kBACA,sBACA,8BACA,+BACA,eACA,CAvBR,mDAyBY,WACA,aAAc,CA1B1B,2DA4BgB,WACA,UACA,kBACA,mBACA,2BAAA,2BAAA,oBACA,WAAY,CAAA",file:"ipinfo-dialog.vue?vue&type=style&index=0&id=2a2fd384&lang=scss&scoped=true&",sourcesContent:['\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#SHOW_IPINFO_DIALOG {\n .ip {\n color: #333;\n margin: 0;\n font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif;\n font-size: 14px;\n background: #f7f7f7;\n text-align: left;\n padding: 1rem;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border: 1px solid #ddd;\n border-bottom-width: 0;\n }\n .ipinfo {\n list-style-type: none;\n background: #fff;\n margin: 0;\n padding: 0px 0px 0px 5px;\n border: 1px solid #ddd;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n overflow-x: auto;\n font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif;\n .line {\n width: 100%;\n text-indent: 0;\n &-content {\n color: #333;\n padding: 0px;\n position: relative;\n white-space: nowrap;\n display: inline-flex;\n height: 100%;\n }\n }\n }\n}\n'],sourceRoot:""}])},1549:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ui-dialog",{attrs:{id:"SHOW_IPINFO_DIALOG",size:"normal"}},[n("translate",{attrs:{slot:"title","translate-params":{ip:t.$api.ipinfo.ip}},slot:"title"},[t._v("\n IP Info: %{ ip }\n ")]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("h2",{staticClass:"ip"},[t._v("\n "+t._s(t.$api.ipinfo.ip)+"\n ")]),t._v(" "),n("ol",{staticClass:"ipinfo"},t._l(t.$api.ipinfo.data,(function(e,r){return e?n("li",{staticClass:"line"},[n("span",{staticClass:"line-content"},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),0)])],1)},i=[];n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},1579:function(t,e,n){"use strict";n.r(e);var r=n(2269),i=n(1478);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n(0),s=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);e.default=s.exports},1580:function(t,e,n){"use strict";n.r(e);var r=n(2270),i=n(1480);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n(0),s=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);e.default=s.exports},1587:function(t,e,n){"use strict";n.r(e);var r=n(1588),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e.default=i.a},1588:function(t,e,n){"use strict";var r=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(15)),o=r(n(16)),a=r(n(2)),s=n(1427),l=r(n(1463)),u=r(n(1579)),c=r(n(1580)),f=r(n(1533));function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var d,b={preload:[s.getDefaults,s.getIpList],api:[{command:s.getDefaults,bind:"defaults"}],commands:{getIpList:s.getIpList},components:{Tabs:l.default,BlockDialog:u.default,SkipIpsDialog:c.default,IpinfoDialog:f.default},data:function(){return{select:[]}},methods:{blockIPs:function(){(0,s.block)({ip:this.select}).then(this.$reloadApiTable)},skipIPs:function(t){(0,s.skip)(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({ip:this.select},t)).then(this.$reloadApiTable)},showIPInfo:(d=(0,o.default)(i.default.mark((function t(e){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.getIpInfo)({ipinfo:e});case 2:this.$dialog("SHOW_IPINFO_DIALOG").open();case 3:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})}};e.default=b},2269:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ui-dialog",{attrs:{id:"BLOCK_DIALOG",theme:"danger"}},[n("translate",{attrs:{slot:"title","translate-params":{subject:t.subject}},slot:"title"},[t._v("\n Block %{ subject }\n ")]),t._v(" "),n("translate",{attrs:{slot:"content","translate-params":{subject:t.subject}},slot:"content"},[t._v("\n Are you sure you want to block selected %{ subject }?\n ")]),t._v(" "),n("ui-button",{attrs:{slot:"buttons",theme:"danger"},on:{click:function(e){return t.$emit("block")}},slot:"buttons"},[n("translate",[t._v("Block")])],1)],1)},i=[];n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},2270:function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("ui-dialog",{attrs:{id:"ADD_IPS_TO_SKIP_LIST",theme:"danger"}},[e("translate",{attrs:{slot:"title"},slot:"title"},[this._v("Add to skip list")]),this._v(" "),e("translate",{attrs:{slot:"content","translate-n":this.select.length,"translate-plural":"Are you sure you want to add selected IPs to skip list?"},slot:"content"},[this._v("\n Are you sure you want to add selected IP to skip list?\n ")]),this._v(" "),e("ui-button",{attrs:{slot:"buttons",theme:"danger"},on:{click:this.submit},slot:"buttons"},[e("translate",[this._v("\n Add\n ")])],1)],1)},i=[];n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},2449:function(t,e){},2973:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("app-page",[n("tabs",{attrs:{id:"ip_list"}},[n("ui-api-table",t._b({on:{"action:skip":function(e){t.$dialog("ADD_IPS_TO_SKIP_LIST").open()},"action:block":function(e){t.$dialog("BLOCK_DIALOG").open()}},scopedSlots:t._u([{key:"col:ip",fn:function(e){var r=e.ip;return n("ui-link",{attrs:{name:"admin/brute-force-monitor",query:{ip:r}},domProps:{textContent:t._s(r)}})}},{key:"col:notified",fn:function(e){var r=e.notified;return n("ui-badge",{attrs:{theme:r?"safe":"danger",size:"small"}},[t._v("\n "+t._s(r?t.$gettext("Yes"):t.$gettext("No"))+"\n ")])}},{key:"col:blocked",fn:function(e){var r=e.blocked;return n("ui-badge",{attrs:{theme:r?"safe":"danger",size:"small"}},[t._v("\n "+t._s(r?t.$gettext("Yes"):t.$gettext("No"))+"\n ")])}},{key:"col:info",fn:function(e){var r=e.ip;return n("ui-button-icon",{attrs:{icon:"question",theme:"primary",title:t.$gettext("IP Info")},on:{click:function(e){return t.showIPInfo(r)}}})}}]),model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},"ui-api-table",{command:t.$commands.getIpList,rowID:"ip",columns:{ip:{label:t.$gettext("IP"),grow:!0},failures:{label:t.$gettext("Login Failures"),apiName:"login_failures"},first:{label:t.$gettext("First"),filter:"date",apiName:"first_entry"},last:{label:t.$gettext("Last"),filter:"date",apiName:"last_entry"},notified:t.$gettext("Notified"),blocked:t.$gettext("Blocked"),info:t.$gettext("IP Info")},actions:{skip:t.$gettext("Skip"),block:{label:t.$gettext("Block"),disabled:!t.$api.defaults.scripts.block}},initialSort:{key:"failures",order:"DESC"},verticalLayout:t.$_Client.isPhone},!1))],1),t._v(" "),n("skip-ips-dialog",t._b({},"skip-ips-dialog",{select:t.select},!1)),t._v(" "),n("block-dialog",{attrs:{subject:t.$ngettext("IP Address","IP Addresses",t.select.length)},on:{block:t.blockIPs}}),t._v(" "),n("ipinfo-dialog")],1)},i=[];n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))}}]);