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

1 line
14 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{1276:function(t,e,n){"use strict";n.r(e);var o=n(2972),i=n(1582);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);var a=n(0),s=n(2448),l=n.n(s),c=Object(a.a)(i.default,o.a,o.b,!1,null,null,null);"function"==typeof l.a&&l()(c),e.default=c.exports},1427:function(t,e,n){"use strict";var o=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=o(n(2)),r=o(n(30));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}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",c=function(t,e){return r.default.get(s({id:t,url:l},e))},u=function(t,e){return r.default.post({url:l,params:{action:t},schema:e})},p=c("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=p;var f=c("BFM_IPINFO",{schema:{ipinfo:r.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=f;var d=c("BFM_GENERAL_LIST",{params:{show:"LOGINFAILURES"},pagination:!0,schema:{filter:r.default.OPTIONAL_STRING,value:r.default.OPTIONAL_STRING},before:function(t){var e=t.filter,n=t.value,o={};if(t.sort||(o.sort1="-1"),e){var i="ip"===e?2:3;o["comparison".concat(i)]="equals",o["value".concat(i)]=n}return o},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=c("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 A=c("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=A;var I=c("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=I;var g=c("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=g;var _={type:Array,required:!1},v=r.default.OPTIONAL_STRING,m=u("skiplist",{ip:_,user:_,comments:v,skip_value:v});e.skip=m;var h=u("remove_from_skiplist",{select:r.default.ROWS});e.unskip=h;var O=u("block_ips",{ip:_,user:_});e.block=O;var L=u("unblock",{ip:r.default.ROWS});e.unblock=L},1428:function(t,e,n){"use strict";n.r(e);var o=n(1429),i=n.n(o);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e.default=i.a},1429:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={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=o},1453:function(t,e,n){"use strict";n.r(e);var o=n(1454),i=n.n(o);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e.default=i.a},1454:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={api:[{command:n(1427).getIpInfo,bind:"ipinfo"}]};e.default=o},1455:function(t,e,n){var o=n(1535);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(5).default)("00d3df85",o,!0,{})},1463:function(t,e,n){"use strict";n.r(e);var o=n(1470),i=n(1428);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);var a=n(0),s=Object(a.a)(i.default,o.a,o.b,!1,null,null,null);e.default=s.exports},1470:function(t,e,n){"use strict";var o=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 o})),n.d(e,"b",(function(){return i}))},1533:function(t,e,n){"use strict";n.r(e);var o=n(1549),i=n(1453);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n(1534);var a=n(0),s=Object(a.a)(i.default,o.a,o.b,!1,null,"2a2fd384",null);e.default=s.exports},1534:function(t,e,n){"use strict";var o=n(1455);n.n(o).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 o=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,o){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 o})),n.d(e,"b",(function(){return i}))},1582:function(t,e,n){"use strict";n.r(e);var o=n(1583),i=n.n(o);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e.default=i.a},1583:function(t,e,n){"use strict";var o=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,r=o(n(15)),a=o(n(16)),s=n(1427),l=o(n(1525)),c=o(n(1463)),u=o(n(1533)),p={preload:[s.getBlockList,s.getDefaults],api:[{command:s.getDefaults,bind:{"response.scripts":"scripts"}}],commands:{getBlockList:s.getBlockList},components:{Tabs:c.default,IpinfoDialog:u.default,InputIp:l.default},data:function(){return{select:[],ip:""}},methods:{unblockIP:function(){(0,s.unblock)({ip:this.select}).then(this.$reloadApiTable)},showIPInfo:(i=(0,a.default)(r.default.mark((function t(e){return r.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 i.apply(this,arguments)}),blockIP:function(){(0,s.block)({ip:[this.ip]}).then(this.$reloadApiTable)}}};e.default=p},2448:function(t,e){},2972:function(t,e,n){"use strict";var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("app-page",[n("tabs",{attrs:{id:"block_list"}},[t.$api.scripts.block?n("ui-form-element",[n("translate",{attrs:{slot:"title"},slot:"title"},[t._v("Block IP")]),t._v(" "),n("input-ip",{attrs:{slot:"content",disableVersionSelect:"",version:"v4"},slot:"content",model:{value:t.ip,callback:function(e){t.ip=e},expression:"ip"}},[n("ui-button",{attrs:{slot:"additions:right",size:"normal",theme:"danger"},on:{click:t.blockIP},slot:"additions:right"},[n("translate",[t._v("Block")])],1)],1)],1):t._e(),t._v(" "),n("ui-api-table",t._b({on:{"action:unblock":function(e){t.$dialog("UNBLOCK_IP_DIALOG").open()}},scopedSlots:t._u([{key:"col:ipinfo",fn:function(e){var o=e.ip;return n("ui-button-icon",{attrs:{icon:"question",theme:"primary",title:t.$gettext("IP Info")},on:{click:function(e){return t.showIPInfo(o)}}})}}]),model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},"ui-api-table",{command:t.$commands.getBlockList,rowID:"ip",columns:{ip:{label:t.$gettext("IP"),grow:!0},date_blocked:{label:t.$gettext("Date Blocked"),filter:"date"},info:t.$gettext("Info"),ipinfo:t.$gettext("IP Info")},actions:{unblock:{label:t.$gettext("Unblock"),disabled:!t.$api.scripts.unblock}},verticalLayout:t.$_Client.isPhone},!1))],1),t._v(" "),n("ui-dialog",{attrs:{id:"UNBLOCK_IP_DIALOG",theme:"danger"}},[n("translate",{attrs:{slot:"title","translate-n":t.select.length,"translate-plural":"Unblock IPs"},slot:"title"},[t._v("\n Unblock IP\n ")]),t._v(" "),n("translate",{attrs:{slot:"content","translate-n":t.select.length,"translate-plural":"Are you sure you want to unblock selected IPs?"},slot:"content"},[t._v("\n Are you sure you want to unblock selected IP?\n ")]),t._v(" "),n("ui-button",{attrs:{slot:"buttons",theme:"danger"},on:{click:t.unblockIP},slot:"buttons"},[n("translate",[t._v("Remove")])],1)],1),t._v(" "),n("ipinfo-dialog")],1)},i=[];n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}))}}]);