← Back
Editing: index-legacy476.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 n};var r,n={},a=Object.prototype,o=a.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),l=new I(n||[]);return i(o,"_invoke",{value:O(t,r,l)}),o}function v(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var h="suspendedStart",d="suspendedYield",y="executing",m="completed",b={};function g(){}function x(){}function w(){}var _={};f(_,u,(function(){return this}));var j=Object.getPrototypeOf,L=j&&j(j(N([])));L&&L!==a&&o.call(L,u)&&(_=L);var E=w.prototype=g.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(a,i,l,u){var c=v(e[a],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,l,u)}),(function(t){n("throw",t,l,u)})):r.resolve(f).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,u)}))}u(c.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,a){n(t,e,r,a)}))}return a=a?a.then(o,o):o()}})}function O(t,e,n){var a=h;return function(o,i){if(a===y)throw Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:r,done:!0}}for(n.method=o,n.arg=i;;){var l=n.delegate;if(l){var u=T(l,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var c=v(t,e,n);if("normal"===c.type){if(a=n.done?m:d,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function T(t,e){var n=e.method,a=t.iterator[n];if(a===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,T(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=v(a,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,b;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,b):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return x.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:x,configurable:!0}),x.displayName=f(w,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},k(S.prototype),f(S.prototype,c,(function(){return this})),n.AsyncIterator=S,n.async=function(t,e,r,a,o){void 0===o&&(o=Promise);var i=new S(p(t,e,r,a),o);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(E),f(E,s,"Generator"),f(E,u,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 n(n,a){return l.type="throw",l.arg=t,e.next=n,a&&(e.method="next",e.arg=r),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,b):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),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;F(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),b}},n}function r(t,e,r,n,a,o,i){try{var l=t[o](i),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,a)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(a,o){var i=t.apply(e,n);function l(t){r(i,a,o,l,u,"next",t)}function u(t){r(i,a,o,l,u,"throw",t)}l(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var a,o,i,l,u,c,s,f,p,v,h,d,y,m,b,g,x,w,_,j,L,E,k,S,O,T,P,F,I,N,G;return{setters:[function(t){a=t.R,o=t.w,i=t.l,l=t.e},function(t){u=t.j,c=t.r,s=t.c,f=t.s,p=t.w,v=t.p,h=t.G,d=t.H,y=t.x,m=t.q,b=t.v,g=t.F,x=t.y,w=t.e,_=t.A,j=t.a_,L=t.P,E=t.B,k=t.aj,S=t.bM,O=t.M,T=t.z,P=t.ai,F=t.bN},function(t){I=t.u,N=t.S},function(t){G=t.getLoadInfo},null],execute:function(){var r,D,z=u("SITE-LOAD-STATE-STORE",(function(){var t=I(),r=(t.siteInfo,t.siteType),a=function(){var t=n(e().mark((function t(n){var a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,G(n,r.value);case 3:return a=t.sent,t.abrupt("return",{status:a.status,data:a.data});case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{status:!1,msg:"获取负载状态失败"});case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}();return{getLoadDataEvent:a}})),A=z().getLoadDataEvent,C=I(),V=C.siteInfo,H=C.siteType,M=c(""),R=c("java"===H.value?null!==(null===(r=V.value)||void 0===r?void 0:r.pid):null===(D=V.value)||void 0===D?void 0:D.run),U=c(!1),Y=c(),q=c(),B=c(),J=c(),K=c(),Q=[{label:"名称",value:"name"},{label:"状态",value:"status"},{label:"用户",value:"user"},{label:"启动时间",value:"create_time",isTime:!0},{label:"PID",value:"pid"},{label:"PPID",value:"ppid"},{label:"线程",value:"threads"},{label:"Socket",value:"connects"},{label:"CPU",value:"cpu_percent"},{label:"内存",value:"memory_used",isSize:!0},{label:"io读",value:"io_read_bytes",isSize:!0},{label:"io写",value:"io_write_bytes",isSize:!0},{label:"命令",value:"exe"}],W=c([{label:"文件",prop:"path"},{label:"mode",prop:"mode",width:50},{label:"position",prop:"position",width:100},{label:"flags",prop:"flags",width:80},{label:"fd",prop:"fd",width:60}]),X=c([{label:"客户端地址",prop:"client_addr",render:function(t){return t.client_addr||"--"}},{label:"客户端端口",prop:"client_rport"},{label:"协议",prop:"family"},{label:"FD",prop:"fd"},{label:"本地地址",prop:"local_addr"},{label:"本地端口",prop:"local_port"},{label:"状态",prop:"status"}]),Z=function(t){return K.value?t.isTime?a(K.value[t.value]):t.isSize?o(K.value[t.value]):K.value[t.value]:""},$=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:U.value=!0,q.value=Y.value[r].open_files,B.value=Y.value[r].connections,K.value=Y.value[r],U.value=!1;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),tt=function(){var t=n(e().mark((function t(){var r,n,a,o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,U.value=!0,r={project_name:V.value.name},"go"===(n=H.value)&&(r.has_load_info=1),"nodejs"===H.value&&(r.project_type=V.value.project_config.project_type||"nodejs"),a={java:r,default:{data:JSON.stringify(r)}},t.next=9,A(a[n]||a.default);case 9:return o=t.sent,i=o.data,t.next=13,et(i);case 13:U.value=!1,t.next=20;break;case 16:return t.prev=16,t.t0=t.catch(0),t.abrupt("return",{status:!1,msg:"获取负载状态失败"});case 20:case"end":return t.stop()}}),t,null,[[0,16]])})));return function(){return t.apply(this,arguments)}}(),et=function(t){try{var e=(null==t?void 0:t.load_info)||(null==t?void 0:t.data);Object.keys(e).length&&(J.value=Object.keys(e).map((function(t){return t})),M.value=J.value[0],q.value=e[M.value].open_files,B.value=e[M.value].connections,K.value=e[M.value],Y.value=e),"java"!==H.value&&(R.value=t.run)}catch(r){}},rt=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:tt();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),nt={class:"relative h-full"},at={key:0,class:"h-[68rem] overflow-auto"},ot={class:"flex items-center"},it={class:"text-[#666] text-[1.2rem] font-bold"},lt={class:"text-[1.2rem]"},ut={key:1,class:"bg-[#7F7F7F] flex items-center justify-center h-full",style:{"min-height":"600px"}},ct={key:1,class:"bg-[#7F7F7F] flex items-center justify-center h-full",style:{"min-height":"600px"}},st={class:"bg-white px-[48px] py-[16px] text-[#333] flex"},ft=s({__name:"index",setup:function(t,e){var r=e.expose,n=f(N()),a=n.siteInfo,o=n.siteType,l=N().jumpTabEvent;return p((function(){return a.value}),(function(t){var e,r;R.value="java"===o.value?null!==(null===(e=a.value)||void 0===e?void 0:e.pid):null===(r=a.value)||void 0===r?void 0:r.run}),{immediate:!0}),v(rt),r({init:rt}),function(t,e){var r=P,n=k,a=F,o=S,u=i,c=h("bt-loading");return d((m(),b("div",nt,[y(R)?(m(),b("div",at,[y(M)?(m(),b(g,{key:0},[x("div",ot,[e[2]||(e[2]=x("span",{class:"mr-[1.6rem] font-bold text-[1.4rem]"},"进程",-1)),w(n,{modelValue:y(M),"onUpdate:modelValue":e[0]||(e[0]=function(t){return L(M)?M.value=t:null}),onChange:y($),class:"!w-[14rem]"},{default:_((function(){return[(m(!0),b(g,null,j(y(J),(function(t){return m(),O(r,{key:t,label:t,value:t},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","onChange"])]),e[3]||(e[3]=x("span",{class:"text-[#666] mt-[1.6rem] mb-[.8rem] block font-bold text-[1.4rem]"},"基础信息",-1)),w(o,{class:"mt-[20px] table-descriptions",column:3,border:""},{default:_((function(){return[(m(!0),b(g,null,j(y(Q),(function(t,e){return m(),O(a,{key:e,"label-class-name":["!bg-[#fff]"]},{label:_((function(){return[x("span",it,T(t.label),1)]})),default:_((function(){return[x("div",lt,T(y(Z)(t)),1)]})),_:2},1024)})),128))]})),_:1}),e[4]||(e[4]=x("span",{class:"text-[#666] mt-[1.6rem] mb-[.8rem] block font-bold text-[1.4rem]"},"网络",-1)),w(u,{"max-height":160,column:y(X),data:y(B)},null,8,["column","data"]),e[5]||(e[5]=x("span",{class:"text-[#666] mt-[1.6rem] mb-[.8rem] block font-bold text-[1.4rem]"},"打开的文件列表",-1)),w(u,{height:210,column:y(W),data:y(q)},null,8,["column","data"])],64)):(m(),b("div",ut,e[6]||(e[6]=[x("div",{class:"bg-white px-[48px] py-[16px] text-[#333] flex"}," 监听PID失败,请检查项目状态是否开启 ",-1)])))])):(m(),b("div",ct,[x("div",st,[e[7]||(e[7]=E(" 请开启 ")),x("span",{class:"mx-[.4rem] bt-link",onClick:e[1]||(e[1]=function(t){return y(l)("state")})},"项目状态"),e[8]||(e[8]=E(" 后查看负载状态 "))])]))])),[[c,y(U)]])}}});t("default",l(ft,[["__scopeId","data-v-0437306a"]]))}}}))}();
Save File
Cancel