← Back
Editing: index-legacy172.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 b?e:b,a=Object.create(o.prototype),u=new C(r||[]);return i(a,"_invoke",{value:O(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",m="suspendedYield",y="executing",v="completed",g={};function b(){}function x(){}function w(){}var _={};f(_,c,(function(){return this}));var E=Object.getPrototypeOf,L=E&&E(E(G([])));L&&L!==o&&a.call(L,c)&&(_=L);var k=w.prototype=b.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function V(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 O(t,e,r){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){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=S(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=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var l=h(t,e,r);if("normal"===l.type){if(o=r.done?v:m,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function S(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,S(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 P(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function G(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 x.prototype=w,i(k,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:x,configurable:!0}),x.displayName=f(w,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(k),t},r.awrap=function(t){return{__await:t}},j(V.prototype),f(V.prototype,l,(function(){return this})),r.AsyncIterator=V,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new V(p(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(k),f(k,s,"Generator"),f(k,c,(function(){return this})),f(k,"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=G,C.prototype={constructor:C,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(T),!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),T(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;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:G(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,m,y,v,g,b,x,w,_,E,L,k,j,V,O,S,P,T,C,G,N,I;return{setters:[function(t){o=t.K,a=t.bT,i=t.w,u=t.k,c=t.al,l=t.e},function(t){s=t.r,f=t.k,p=t.c,h=t.p,d=t.G,m=t.q,y=t.M,v=t.A,g=t.e,b=t.y,x=t.H,w=t.x,_=t.P,E=t.B,L=t.aA,k=t.D,j=t.au,V=t.aw,O=t.a9,S=t.a7},function(t){P=t.B},function(t){T=t.S,C=t._},function(t){G=t.X,N=t.Y,I=t.V},null,null,null,null],execute:function(){var n=T(),q=s({}),z={bind:"监听IP",port:"监听端口",cachesize:"最大缓存容量",maxconn:"最大连接数限制",curr_connections:"当前打开的连接数",cmd_get:"GET请求数",get_hits:"GET命中次数",get_misses:"GET失败次数",hit:"GET命中率",curr_items:"当前被缓存的数据行数",evictions:"因内存不足而被清理的缓存行数",bytes:"当前已使用内存",bytes_read:"请求总大小",bytes_written:"发送总大小"},A=s("service"),F=s(""),U=s(!1),B=s(!1),H=s([]),M=f({ip:"",cachesize:"",maxconn:"",port:"",btn_set_memcached:""}),D=s(""),Y=s([]),X=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:U,request:N(),success:function(t){M.ip=t.data.bind,M.cachesize=t.data.cachesize,M.maxconn=t.data.maxconn,M.port=t.data.port}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),K=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:G(M),message:!0});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=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:U,request:N(),success:function(t){H.value=[];var e=["bytes","bytes_read","bytes_written"];Object.keys(t.data).forEach((function(n){"limit_maxbytes"!==n&&H.value.push({name:n,ps:z[n],value:e.includes(n)?i(Number(t.data[n])):t.data[n]})}))}});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:U,request:I({path:"/etc/init.d/memcached"}),data:{data:[String,F]}});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:"/etc/init.d/memcached",data:F.value,encoding:"utf-8"}),message:!0});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Q=function(t){switch(t.props.name){case"service":W();break;case"performance":X();break;case"config":Z();break;case"load":R()}},W=function(t){A.value="service",t&&(q.value=t),n.init(q.value),D.value=q.value.version.split(".")[0]+"."+q.value.version.split(".")[1],Y.value=q.value.versions},$={class:"my-[12px]"},tt={class:"flex flex-col text-[#666] performance"},et={class:"flex items-center"},nt={class:"flex items-center"},rt={class:"flex items-center"},ot={class:"flex items-center"};t("default",l(p({__name:"index",props:{compData:{default:{}}},setup:function(t){var e=t;return h((function(){W(e.compData)})),function(t,e){var n=L,r=P,o=k,a=j,i=V,l=u,s=O,f=S,p=c,h=d("bt-loading");return m(),y(p,{modelValue:w(A),"onUpdate:modelValue":e[5]||(e[5]=function(t){return _(A)?A.value=t:null}),type:"left-bg-card",onTabClick:w(Q)},{default:v((function(){return[g(n,{label:"服务",name:"service"},{default:v((function(){return[g(C)]})),_:1}),g(n,{label:"配置文件",name:"config"},{default:v((function(){return[e[7]||(e[7]=b("span",{class:"my-[4px] text-[#666]"},"提示:Ctrl+F 搜索关键字,Ctrl+S 保存,Ctrl+H 查找替换",-1)),b("div",$,[x(g(r,{class:"!h-[36rem] !w-[full]",modelValue:w(F),"onUpdate:modelValue":e[0]||(e[0]=function(t){return _(F)?F.value=t:null}),id:"configContent",filePath:"/etc/init.d/memcached"},null,8,["modelValue"]),[[h,w(U)]])]),g(o,{onClick:w(J),type:"primary"},{default:v((function(){return e[6]||(e[6]=[E("保存")])})),_:1},8,["onClick"]),e[8]||(e[8]=b("ul",{class:"leading-8 mt-20px text-[1.2rem] list-disc ml-[20px]"},[b("li",null,"此处为memcached主配置文件,若您不了解配置规则,请勿随意修改")],-1))]})),_:1}),g(n,{label:"负载状态",name:"load"},{default:v((function(){return[x((m(),y(i,{"max-height":"500",data:w(H),border:"",style:{width:"100%"}},{default:v((function(){return[g(a,{prop:"name",label:"字段"}),g(a,{prop:"value",label:"当前值"}),g(a,{prop:"ps",label:"说明"})]})),_:1},8,["data"])),[[h,w(U)]])]})),_:1}),x((m(),y(n,{label:"性能调整",name:"performance"},{default:v((function(){return[b("div",tt,[g(f,{model:w(M)},{default:v((function(){return[g(s,{label:"BindIp"},{default:v((function(){return[b("div",et,[g(l,{modelValue:w(M).ip,"onUpdate:modelValue":e[1]||(e[1]=function(t){return w(M).ip=t})},null,8,["modelValue"]),e[9]||(e[9]=b("span",{class:"unit"},"监听IP,请勿随意修改",-1))])]})),_:1}),g(s,{label:"PORT"},{default:v((function(){return[b("div",nt,[g(l,{modelValue:w(M).port,"onUpdate:modelValue":e[2]||(e[2]=function(t){return w(M).port=t}),type:"number"},null,8,["modelValue"]),e[10]||(e[10]=b("span",{class:"unit"}," 监听端口,一般无需修改",-1))])]})),_:1}),g(s,{label:"CACHESIZE"},{default:v((function(){return[b("div",rt,[g(l,{modelValue:w(M).cachesize,"onUpdate:modelValue":e[3]||(e[3]=function(t){return w(M).cachesize=t}),type:"number"},null,8,["modelValue"]),e[11]||(e[11]=b("span",{class:"unit"}," MB,缓存大小,建议不要大于512M",-1))])]})),_:1}),g(s,{label:"MAXCONN"},{default:v((function(){return[b("div",ot,[g(l,{modelValue:w(M).maxconn,"onUpdate:modelValue":e[4]||(e[4]=function(t){return w(M).maxconn=t}),type:"number"},null,8,["modelValue"]),e[12]||(e[12]=b("span",{class:"unit"},"最大连接数,建议不要大于40960",-1))])]})),_:1}),g(s,{label:" "},{default:v((function(){return[g(o,{onClick:w(K),type:"primary"},{default:v((function(){return e[13]||(e[13]=[E("保存")])})),_:1},8,["onClick"])]})),_:1})]})),_:1},8,["model"])])]})),_:1})),[[h,w(B)]])]})),_:1},8,["modelValue","onTabClick"])}}}),[["__scopeId","data-v-56f9696c"]]))}}}))}();
Save File
Cancel