← Back
Editing: index-legacy336.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}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 a(e,o,i,u){var a=o&&o.prototype instanceof l?o:l,s=Object.create(a.prototype);return r(s,"_invoke",function(e,r,o){var i,u,a,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(e,r){return i=e,u=0,a=t,p.n=r,c}};function v(e,r){for(u=e,a=r,n=0;!f&&l&&!o&&n<s.length;n++){var o,i=s[n],v=p.p,y=i[2];e>3?(o=y===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=e<2&&v<i[1])?(u=0,p.v=r,p.n=i[1]):v<y&&(o=e<3||i[0]>r||r>y)&&(i[4]=e,i[5]=r,p.n=y,u=0))}if(o||e>1)return c;throw f=!0,r}return function(o,s,y){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&v(s,y),u=s,a=y;(n=u<2?t:a)||!f;){i||(u?u<3?(u>1&&(p.n=-1),v(u,a)):p.n=a:p.v=a);try{if(l=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((n=(f=p.n<0)?a:e.call(r,p))!==c)break}catch(n){i=t,u=1,a=n}finally{l=1}}return{value:n,done:f}}}(e,i,u),!0),s}var c={};function l(){}function s(){}function f(){}n=Object.getPrototypeOf;var p=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),v=f.prototype=l.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,r(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return s.prototype=f,r(v,"constructor",f),r(f,"constructor",s),s.displayName="GeneratorFunction",r(f,u,"GeneratorFunction"),r(v),r(v,u,"Generator"),r(v,i,function(){return this}),r(v,"toString",function(){return"[object Generator]"}),(e=function(){return{w:a,m:y}})()}function r(t,e,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}r=function(t,e,n,o){function u(e,n){r(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(u("next",0),u("throw",1),u("return",2))},r(t,e,n,o)}function n(t){return function(t){if(Array.isArray(t))return o(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 o(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)?o(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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function c(e,r,n){return(r=function(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./form-item-legacy.js?v=1765440387","./index-legacy62.js?v=1765440387","./useController-legacy10.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./index-legacy93.js?v=1765440387","./column-legacy.js?v=1765440387","./index-legacy135.js?v=1765440387"],function(t,r){"use strict";var o,u,c,l,s,f,p,v,y,m,b,d,g,h,j,w,O,_,S,P;return{setters:[function(t){o=t.G,u=t.aa},function(t){c=t.c,l=t.r,s=t.g,f=t.e,p=t.B,v=t.D,y=t.a5,m=t.q,b=t.v,d=t.x},function(t){g=t.j,h=t.b,j=t.h,w=t.f},function(t){O=t.b,_=t.g},function(t){S=t.u,P=t.a},null,null,null,null,null],execute:function(){var r={class:"p-[2rem]"};t("default",c({__name:"index",props:{compData:{default:function(){return{nodes:[]}}}},setup:function(t,c){var x,T,D=c.expose,A=O().addTcpudpNodeData,E=S(),G=E.nodesStatusList,k=E.testLinkStatus,N=l(t.compData.nodes.map(function(t){return{label:"".concat(t.label," - ").concat(t.server_ip," (").concat(""==t.version?"本机地址":t.version," ").concat(P(t.version,"9.7.0")<0?"版本较低无法显示站点":"",")"),value:t.value,server_ip:t.server_ip}})),C=l(""),I=o({data:function(){return{port:80,node_status:"online",weight:1,max_fail:3,fail_timeout:600,ps:""}},options:function(t){return s(function(){return[g("负载均衡节点","node_id",N.value,{attrs:{class:"!w-[40rem]",placeholder:"请选择负载均衡节点",onChange:function(t){var e;C.value=(null===(e=N.value.find(function(e){return e.value===t}))||void 0===e?void 0:e.server_ip)||""}},rules:[{required:!0,message:"负载均衡节点不能为空"}]}),h("端口","port",{attrs:{class:"!w-[40rem]",placeholder:"请输入端口"},rules:[u({message:"请输入端口"})]}),g("节点状态","node_status",G.value,{attrs:{class:"!w-[40rem]",defaultValue:"online"}}),h("权重","weight",{attrs:{class:"!w-[40rem]",placeholder:"请输入权重"}}),h("阈值","max_fail",{attrs:{class:"!w-[40rem]",placeholder:"请输入阈值"}}),h("恢复时间(秒)","fail_timeout",{attrs:{class:"!w-[39.5rem]",placeholder:"请输入恢复时间(秒)"}}),h("备注","ps",{attrs:{class:"!w-[40rem]",placeholder:"请输入备注"}}),j("测试连接",function(){return f(v,{type:"primary",loading:k.value,onClick:function(){return _(a(a({},t.value),{},{host:C.value}))}},{default:function(){return[p("测试连接")]}})}),w("",[{content:"备份状态: 指当其它节点都无法使用时才会使用此节点"},{content:"参与状态: 正常参与负载均衡,请至少添加1个普通节点"},{content:"IP地址: 仅支持IP地址,否则无法正常参与负载均衡"},{content:"阈值: 在恢复时间的时间段内,如果Nginx与节点通信尝试失败的次数达到此值,Nginx就认为服务器不可用"}],{attrs:{class:"!mt-[1rem]"}})]})},submit:(x=e().m(function t(r,o,i){var u,c,l,s;return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,o();case 1:return c=null===(u=N.value.find(function(t){return t.value===r.value.node_id}))||void 0===u?void 0:u.server_ip,l=r.value.port,s=a(a({},r.value),{},{port:Number(l),host:c}),A.value=[].concat(n(A.value),[s]),t.a(2,!0)}},t)}),T=function(){var t=this,e=arguments;return new Promise(function(r,n){var o=x.apply(t,e);function u(t){i(o,r,n,u,a,"next",t)}function a(t){i(o,r,n,u,a,"throw",t)}u(void 0)})},function(t,e,r){return T.apply(this,arguments)})}),F=I.BtForm;return D({onConfirm:I.submit}),y(function(){k.value=!1}),function(t,e){return m(),b("div",r,[f(d(F))])}}}))}}})}();
Save File
Cancel