← Back
Editing: index-legacy174.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(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var n,r={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),u=new P(r||[]);return i(a,"_invoke",{value:C(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var d="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function w(){}function b(){}function x(){}var _={};f(_,c,(function(){return this}));var L=Object.getPrototypeOf,k=L&&L(L(T([])));k&&k!==o&&a.call(k,c)&&(_=k);var S=x.prototype=w.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(e,n){function r(o,i,u,c){var l=h(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(a,a):a()}})}function C(t,e,r){var o=d;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:n,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=O(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var l=h(t,e,r);if("normal"===l.type){if(o=r.done?m:y,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function O(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=h(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function G(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function V(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,i(S,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},E(j.prototype),f(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new j(p(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(S),f(S,s,"Generator"),f(S,c,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=T,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(V),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),V(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},r}function n(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var i=t.apply(e,r);function u(t){n(i,o,a,u,c,"next",t)}function c(t){n(i,o,a,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./index-legacy140.js?v=VERSION_NUMBER","./index.vue_vue_type_script_setup_true_lang-legacy7.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./ace-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var o,a,i,u,c,l,s,f,p,h,d,y,v,m,g,w,b,x,_,L,k,S,E,j,C,O,G,V,P,T,N,F,q,z;return{setters:[function(t){o=t.K,a=t.bT,i=t.W,u=t.k,c=t.al},function(t){l=t.r,s=t.c,f=t.p,p=t.G,h=t.q,d=t.M,y=t.A,v=t.e,m=t.y,g=t.H,w=t.x,b=t.P,x=t.B,_=t.v,L=t.F,k=t.a_,S=t.C,E=t.aA,j=t.D,C=t.al,O=t.aQ,G=t.a9,V=t.a7},function(t){P=t.B},function(t){T=t.S,N=t._},function(t){F=t.a1,q=t.a2,z=t.V},null,null,null,null],execute:function(){var n=T(),U=l({}),A={enableGzipCompress:"为静态和动态响应启用GZIP/Brotli压缩.",gzipCompressLevel:"指定应用于动态内容的GZIP压缩级别。范围从1(最低)到9(最高).",maxSSLConnections:"指定服务器将接受的最大并发SSL连接数<br/>\t\t\t#因为总的并发SSL和非SSL连接不能超过“Max connections”指定的限制,<br>\t\t\t#允许的并发SSL连接的实际数目必须低于此限制.",maxConnections:"指定服务器可以接受的最大并发连接数.<br/>\t\t\t#这包括纯TCP连接和SSL连接",connTimeout:"指定在处理一个请求期间允许的最大连接空闲时间(秒).",maxKeepAliveReq:"指定可通过保持活动(持久)会话服务的最大请求数."},H=l("service"),I=l(""),M=l(!1),B=l(!1),D=l([]),K=[{content:"此处为openlitespeed主配置文件,若您不了解配置规则,请勿随意修改"}],Y=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o({loading:B,request:F(),success:function(t){D.value=[],Object.keys(t.data).forEach((function(e){D.value.push({name:e,ps:A[e],value:"enableGzipCompress"===e?"1"===t.data[e][0]:t.data[e][0]})}))}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Z=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o({loading:M,request:z({path:"/usr/local/lsws/conf/httpd_config.conf"}),data:{data:[String,I]}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),J=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o({loading:"正在保存中,请稍后...",request:a({path:"/usr/local/lsws/conf/httpd_config.conf",data:I.value,encoding:"utf-8"}),message:!0});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Q=function(){var t=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},D.value.forEach((function(t){n[t.name]="enableGzipCompress"===t.name?t.value?"1":"0":t.value})),t.next=4,o({loading:"正在保存中,请稍后...",request:q({array:JSON.stringify(n)}),message:!0});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(t){switch(t.props.name){case"service":W();break;case"config":Z();break;case"setting":Y()}},W=function(t){H.value="service",t&&(U.value=t),n.init(U.value)},X={class:"my-[12px]"},$={class:"flex flex-col text-[#666] performance"},tt={class:"flex items-center"},et={key:1},nt=["innerHTML"];t("default",s({__name:"index",props:{compData:{default:{}}},setup:function(t){var e=t;return f((function(){W(e.compData)})),function(t,e){var n=E,r=P,o=j,a=i,l=u,s=C,f=O,T=G,F=V,q=c,z=p("bt-loading");return h(),d(q,{modelValue:w(H),"onUpdate:modelValue":e[1]||(e[1]=function(t){return b(H)?H.value=t:null}),type:"left-bg-card",onTabClick:w(R)},{default:y((function(){return[v(n,{label:"服务",name:"service"},{default:y((function(){return[v(N)]})),_:1}),v(n,{label:"配置文件",name:"config"},{default:y((function(){return[e[3]||(e[3]=m("span",{class:"my-[4px] text-[#666]"},"提示:Ctrl+F 搜索关键字,Ctrl+S 保存,Ctrl+H 查找替换",-1)),m("div",X,[g(v(r,{class:"!h-[36rem] !w-[50rem]",modelValue:w(I),"onUpdate:modelValue":e[0]||(e[0]=function(t){return b(I)?I.value=t:null}),id:"configContent",filePath:"/usr/local/lsws/conf/httpd_config.conf"},null,8,["modelValue"]),[[z,w(M)]])]),v(o,{type:"primary",onClick:w(J)},{default:y((function(){return e[2]||(e[2]=[x("保存")])})),_:1},8,["onClick"]),v(a,{options:w(K),class:"ml-[20px] mt-[20px]"},null,8,["options"])]})),_:1}),g((h(),d(n,{label:"参数设置",name:"setting"},{default:y((function(){return[m("div",$,[v(F,{"label-position":"right","label-width":"186px"},{default:y((function(){return[(h(!0),_(L,null,k(w(D),(function(t,n){return h(),d(T,{label:t.name,key:n},{default:y((function(){return[m("div",tt,["enableGzipCompress"!==t.name?(h(),d(l,{key:0,modelValue:t.value,"onUpdate:modelValue":function(e){return t.value=e},width:"16rem"},null,8,["modelValue","onUpdate:modelValue"])):(h(),_("div",et,[v(s,{modelValue:t.value,"onUpdate:modelValue":function(e){return t.value=e},class:"w-[16rem]"},null,8,["modelValue","onUpdate:modelValue"])])),"rollingSize"!=t.name?(h(),d(f,{key:2,class:"item",effect:"dark",placement:"top-start"},{content:y((function(){return[m("div",{innerHTML:t.ps},null,8,nt)]})),default:y((function(){return[e[4]||(e[4]=m("i",{class:"svgtofont-el-warning text-orange text-[1.6rem] ml-[8px]"},null,-1))]})),_:2},1024)):S("",!0)])]})),_:2},1032,["label"])})),128)),v(T,{label:" "},{default:y((function(){return[v(o,{type:"primary",onClick:w(Y)},{default:y((function(){return e[5]||(e[5]=[x("刷新")])})),_:1},8,["onClick"]),v(o,{type:"primary",onClick:w(Q)},{default:y((function(){return e[6]||(e[6]=[x("保存")])})),_:1},8,["onClick"])]})),_:1})]})),_:1})])]})),_:1})),[[z,w(B)]])]})),_:1},8,["modelValue","onTabClick"])}}}))}}}))}();
Save File
Cancel