← Back
Editing: row-ssh-config-legacy.js
!function(){function t(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,n,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function c(e,o,i,u){var c=o&&o.prototype instanceof l?o:l,f=Object.create(c.prototype);return r(f,"_invoke",function(e,r,o){var i,u,c,l=0,f=o||[],s=!1,m={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(n,e){return i=n,u=0,c=t,m.n=e,a}};function p(e,r){for(u=e,c=r,n=0;!s&&l&&!o&&n<f.length;n++){var o,i=f[n],p=m.p,y=i[2];e>3?(o=y===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=e<2&&p<i[1])?(u=0,m.v=r,m.n=i[1]):p<y&&(o=e<3||i[0]>r||r>y)&&(i[4]=e,i[5]=r,m.n=y,u=0))}if(o||e>1)return a;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&p(f,y),u=f,c=y;(n=u<2?t:c)||!s;){i||(u?u<3?(u>1&&(m.n=-1),p(u,c)):m.n=c:m.v=c);try{if(l=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((n=(s=m.n<0)?c:e.call(r,m))!==a)break}catch(n){i=t,u=1,c=n}finally{l=1}}return{value:n,done:s}}}(e,i,u),!0),f}var a={};function l(){}function f(){}function s(){}n=Object.getPrototypeOf;var m=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),p=s.prototype=l.prototype=Object.create(m);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r(t,u,"GeneratorFunction")),t.prototype=Object.create(p),t}return f.prototype=s,r(p,"constructor",s),r(s,"constructor",f),f.displayName="GeneratorFunction",r(s,u,"GeneratorFunction"),r(p),r(p,u,"Generator"),r(p,i,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(e=function(){return{w:c,m:y}})()}function r(t,n,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}r=function(t,n,e,o){function u(n,e){r(t,n,function(t){return this._invoke(n,e,t)})}n?i?i(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e:(u("next",0),u("throw",1),u("return",2))},r(t,n,e,o)}function o(t,n,e,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void e(t)}c.done?n(a):Promise.resolve(a).then(r,o)}function i(t){return function(){var n=this,e=arguments;return new Promise(function(r,i){var u=t.apply(n,e);function c(t){o(u,r,i,c,a,"next",t)}function a(t){o(u,r,i,c,a,"throw",t)}c(void 0)})}}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./firewall-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387"],function(n,r){"use strict";var o,u,c,a,l,f,s,m,p,y,d,v,b,h,g,w;return{setters:[function(t){o=t.K,u=t.j,c=t.W},function(t){a=t.c,l=t.r,f=t.p,s=t.q,m=t.v,p=t.y,y=t.B,d=t.e,v=t.x,b=t.A,h=t.D},function(t){g=t.bx,w=t.by},null],execute:function(){var r={class:"px-[1.6rem] py-[1.6rem]"},_={class:"flex flex-row justify-between border-b border-[#ccc] pb-[1.6rem]"},j={class:"flex flex-row items-center reinforce_ssh"};n("default",a({__name:"row-ssh-config",setup:function(n){var a=l({cycle:0,limit:0,limit_count:0,name:"",open:!1,ps:""}),S=l([{content:"触发以上策略后,客户端IP将被封锁一段时间"},{content:"请在面板日志或操作日志中查看封锁记录"},{content:"在面板日志或操作日志中查看SSH成功登录的记录(非继承),关闭保护后权限自动还原"}]),x=function(){var t=i(e().m(function t(){var n;return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,o({loading:"正在获取配置列表,请稍后...",request:g()});case 1:n=t.v,a.value=n.data;case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),O=function(){var t=i(e().m(function t(){var n,r,i,u;return e().w(function(t){for(;;)switch(t.n){case 0:n=a.value,r=n.cycle,i=n.limit,u=n.limit_count,o({loading:"正在保存配置,请稍后...",request:w({cycle:r,limit:i,limit_count:u}),message:!0,success:function(t){t.status&&x()}});case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return f(function(){return x()}),function(n,e){var o=u,i=h,l=c;return s(),m("div",r,[p("div",_,[p("span",j,[e[4]||(e[4]=y(" 在(检测周期) ",-1)),d(o,{class:"!w-[8rem] mr-[.8rem] ml-[.4rem]",modelValue:v(a).cycle,"onUpdate:modelValue":e[0]||(e[0]=function(t){return v(a).cycle=t})},null,8,["modelValue"]),e[5]||(e[5]=y(" 秒内, 登录错误(检测阈值) ",-1)),d(o,{class:"!w-[8rem] mr-[.8rem] ml-[.4rem]",modelValue:v(a).limit_count,"onUpdate:modelValue":e[1]||(e[1]=function(t){return v(a).limit_count=t})},null,8,["modelValue"]),e[6]||(e[6]=y(" 次, 封锁(封锁时间) ",-1)),d(o,{class:"!w-[8rem] mr-[.8rem] ml-[.4rem]",modelValue:v(a).limit,"onUpdate:modelValue":e[2]||(e[2]=function(t){return v(a).limit=t})},null,8,["modelValue"]),e[7]||(e[7]=y(" 秒 ",-1))]),d(i,{type:"primary",onClick:e[3]||(e[3]=function(t){return O()})},{default:b(function(){return t(e[8]||(e[8]=[y("保存",-1)]))}),_:1})]),d(l,{options:v(S),class:"mx-[1.6rem] mt-[1.6rem]"},null,8,["options"])])}}}))}}})}();
Save File
Cancel