File: /www/server/panel/BTPanel/static/js/index-legacy19.js
!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(t,n):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 e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function n(t){return n="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},n(t)}function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function l(n,a,i,o){var l=a&&a.prototype instanceof c?a:c,s=Object.create(l.prototype);return r(s,"_invoke",function(n,a,r){var i,o,l,c=0,s=r||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,o=0,l=t,f.n=n,u}};function p(n,a){for(o=n,l=a,e=0;!d&&c&&!r&&e<s.length;e++){var r,i=s[e],p=f.p,m=i[2];n>3?(r=m===a)&&(l=i[(o=i[4])?5:(o=3,3)],i[4]=i[5]=t):i[0]<=p&&((r=n<2&&p<i[1])?(o=0,f.v=a,f.n=i[1]):p<m&&(r=n<3||i[0]>a||a>m)&&(i[4]=n,i[5]=a,f.n=m,o=0))}if(r||n>1)return u;throw d=!0,a}return function(r,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,m),o=s,l=m;(e=o<2?t:l)||!d;){i||(o?o<3?(o>1&&(f.n=-1),p(o,l)):f.n=l:f.v=l);try{if(c=2,i){if(o||(r="next"),e=i[r]){if(!(e=e.call(i,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,o<2&&(o=0)}else 1===o&&(e=i.return)&&e.call(i),o<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),o=1);i=t}else if((e=(d=f.n<0)?l:n.call(a,f))!==u)break}catch(e){i=t,o=1,l=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),s}var u={};function c(){}function s(){}function d(){}e=Object.getPrototypeOf;var f=[][i]?e(e([][i]())):(r(e={},i,function(){return this}),e),p=d.prototype=c.prototype=Object.create(f);function m(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,r(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return s.prototype=d,r(p,"constructor",d),r(d,"constructor",s),s.displayName="GeneratorFunction",r(d,o,"GeneratorFunction"),r(p),r(p,o,"Generator"),r(p,i,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:l,m:m}})()}function r(t,e,n,a){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}r=function(t,e,n,a){function o(e,n){r(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!a,configurable:!a,writable:!a}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},r(t,e,n,a)}function i(t,e,n,a,r,i,o){try{var l=t[i](o),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(a,r)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(a,r){var o=t.apply(e,n);function l(t){i(o,a,r,l,u,"next",t)}function u(t){i(o,a,r,l,u,"throw",t)}l(void 0)})}}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e,a){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var r=a.call(t,e||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}System.register(["./base-lib-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528","./utils-lib-legacy.js?v=1777008528","./control-legacy.js?v=1777008528"],function(e,r){"use strict";var i,l,c,s,d,f,p,m,v,y,h,b,g,w,x,k,D,T,A,S,_,I,V,O,C,B,P,L,j,z,E,M,G,R,U,q,N,F,W,Z,Y,K,J,H,Q,X,$,tt,et,nt,at,rt,it,ot,lt,ut,ct,st,dt,ft,pt;return{setters:[function(t){i=t.r,l=t.bc,c=t.H,s=t.aD,d=t.c,f=t.j,p=t.k,m=t.q,v=t.s,y=t.J,h=t.K,b=t.e,g=t.v,w=t.F,x=t.B,k=t.C,D=t.p,T=t.Q,A=t.n,S=t.am,_=t.an,I=t.x,V=t.z,O=t.bI,C=t.bw,B=t.g,P=t.w,L=t.o,j=t.a8,z=t.I,E=t.m,M=t.y,G=t.M,R=t.aW,U=t.az,q=t._,N=t.ap,F=t.b4,W=t.bC},function(t){Z=t._},function(t){Y=t.dL,K=t.k,J=t.w,H=t.f,Q=t.j9,X=t.ja,$=t.R,tt=t.a3,et=t.G,nt=t.cZ,at=t.e,rt=t._,it=t.jb,ot=t.dq,lt=t.cO},function(t){ut=t.S,ct=t.b,st=t.d,dt=t.e,ft=t.f,pt=t.g}],execute:function(){var mt=H(),vt=i(localStorage.getItem("diskUnitType")||"KB/s"),yt=i(localStorage.getItem("networkUnitType")||"KB/s"),ht=i("all"),bt=i(7),gt=i(!1),wt=i(0),xt=i(0),kt=l({day:0,echartsId:"",echartsParams:{},echartsOption:{},topData:{}}),Dt=c(u({title:"CPU",active:!1,unitVisible:!1},Y(kt))),Tt=c(u({title:"内存",active:!1,unitVisible:!1},Y(kt))),At=c(u({title:"磁盘IO",active:!1,unitVisible:!0},Y(kt))),St=c(u({title:"网络IO:",active:!0,unitVisible:!0,selectVal:"",selectList:[{label:"全部",value:"all"}]},Y(kt))),_t=c(u({title:"平均负载",active:!1,unitVisible:!1},Y(kt))),It=i([]),Vt=new Worker(new URL(""+new URL("../format.worker-DmuulHBI.js?v=1777008528",r.meta.url).href,r.meta.url),{type:"module"}),Ot=new Map;Vt.onerror=function(t){console.error("Worker error:",t),Ot.forEach(function(e){return(0,e.reject)(t)}),Ot.clear()},Vt.onmessage=function(t){var e=t.data,n=e.id,a=e.status,r=e.data,i=e.error;if(Ot.has(n)){var o=Ot.get(n),l=o.resolve,u=o.reject;"success"===a?l(r):u(i),Ot.delete(n)}};var Ct=function(t,e){return new Promise(function(n,a){var r=Date.now()+Math.random().toString();Ot.set(r,{resolve:n,reject:a}),Vt.postMessage(u({id:r,type:t},e))})},Bt={axisLine:{lineStyle:{color:"#666"}},splitLine:{lineStyle:{color:"#ddd"}},axisLabel:{formatter:function(t){return Pt(t/1e3)}},nameTextStyle:{color:"#666",fontSize:12,align:"left"},series:{type:"line",smooth:!0,symbol:"circle",showSymbol:!1},table:[{title:"PID",width:"50px",index:1},{title:"进程名",index:2},{title:"CPU占用",index:0,unit:"%"},{title:"启动用户",index:4},{title:"cmd",index:3,width:"160px",custom:!0}]},Pt=function(t){var e=new Date(1e3*t),n=e.getMonth()+1,a=e.getDate(),r=e.getHours(),i=e.getMinutes();return"".concat(n.toString().padStart(2,"0"),"-").concat(a.toString().padStart(2,"0"),"\n").concat(r.toString().padStart(2,"0"),":").concat(i.toString().padStart(2,"0"))},Lt=function(){var t=o(a().m(function t(e,n){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,K({request:ft({start:e,end:n}),data:[Array,It]});case 1:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}(),jt=function(){var t=o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:K({request:ut({type:"-1"}),data:{status:[Boolean,gt],day:[Number,function(t){return wt.value=t,bt.value=t}],size:[Number,xt]}});case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),zt=function(){var t=o(a().m(function t(e){var n,r;return a().w(function(t){for(;;)switch(t.n){case 0:if(n=wt.value,r=gt.value?"1":"0",!(n<1)){t.n=1;break}return!0===e&&(gt.value=!gt.value),t.a(2,mt.error("保存天数不合法"));case 1:if(/^-?\d+$/.test(n+"")){t.n=2;break}return t.a(2,mt.error("保存天数必须为整数"));case 2:return t.n=3,K({loading:"正在设置监控状态,请稍后...",request:ut({type:r,day:n}),message:!0,success:function(){var t=o(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,ce();case 1:e.status&&(bt.value=n);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()});case 3:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),Et=function(t){var e=t.startTime;return{tooltip:{trigger:"axis",axisPointer:{type:"line"},enterable:!0,position:function(t,e,n,a,r){var i,o,l=0,u=0,c=(null===(i=window.__LAST_VIEWPORT_MOUSE__)||void 0===i?void 0:i.x)||0,s=(null===(o=window.__LAST_VIEWPORT_MOUSE__)||void 0===o?void 0:o.y)||0,d=c-t[0],f=s-t[1],p=r.contentSize[0]||0,m=r.contentSize[1]||0;return l=t[0]-p-20,u=t[1]-m-30,d<p&&(l=t[0]+20),f<m&&f<300&&(u=t[1]+20),c+p+20>window.innerWidth&&(l=t[0]-p-20),[l,u]}},grid:{bottom:80},xAxis:{type:"time",boundaryGap:["1%","0%"],minInterval:(t.endTime-e)/3*1e3,axisLine:Bt.axisLine,axisLabel:Bt.axisLabel},yAxis:{type:"value",boundaryGap:[0,"100%"],axisLine:Bt.axisLine,splitLine:Bt.splitLine},brush:{xAxisIndex:[0,1],brushType:"lineX",brushMode:"single",throttleType:"debounce",throttleDelay:1e3,toolbox:[]},dataZoom:[{type:"inside",start:0,end:100,zoomLock:!0},{bottom:10,start:0,end:100,handleIcon:"path://M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z",handleSize:"80%",handleStyle:{color:"#fff",shadowBlur:3,shadowColor:"rgba(var(--el-color-black-rgb), 0.6)",shadowOffsetX:2,shadowOffsetY:2}}],series:[{}]}},Mt=function(t,e){t.tooltip.padding=0,t.tooltip.backgroundColor="rgba(255,255,255,0.95)",t.tooltip.borderColor="var(--el-color-border-dark-tertiaryer)",e&&(t.tooltip.position=function(t,n,a,r,i){return o=e,c=(l={pos:t,size:i}).size.contentSize[0],s=l.size.contentSize[1],d=window.innerWidth,f=window.innerHeight,p=null===(u=document.getElementById(o))||void 0===u?void 0:u.getBoundingClientRect(),m=l.pos[0]+(null==p?void 0:p.left),v=l.pos[1]+(null==p?void 0:p.top),y=0,h=0,h=m+c+80<d?l.pos[0]+20:l.pos[0]-c-20,y=v+s+80<f?l.pos[1]+20:l.pos[1]-s-20,v-s<0&&(y=0-((null==p?void 0:p.top)||0)+10),[h,y];var o,l,u,c,s,d,f,p,m,v,y,h})},Gt=function(t){var e=t.time,n=t.legend,a="",r="",i="";void 0===t.data&&(t.data=[]),void 0===t.table&&(t.table=Bt.table);for(var o=0;o<t.data.length;o++){var l=t.data[o];0===o&&(a+="<tr>"),r+="<tr>";for(var u=0;u<t.table.length;u++){var c=t.table[u];0===o&&(a+='<th style="width:'.concat(c.width||"auto",'">').concat(c.title,"</th>"),i+="<col ".concat(c.width?'style="width:'.concat(c.width,'"'):"",">"));var s="",d=l[c.index];r+='<td title="'+(s="function"==typeof c.unit?c.unit(d):d+(c.unit||""))+'" '+(c.custom?'style="width:'+c.width+'"':"")+">"+s+"</td>"}0===o&&(a+="</tr>"),r+="</tr>"}return'<div class="echarts-tooltip" style="width:'.concat(t.width||"40rem",'">\n\t\t\t<div class="formatter-header">\n\t\t\t\t<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAAAgBJREFUWIXtWN1xgzAMlkQ3YoCaYaJji8AWPjJM3AEYCasPNT3XZ2xBk17b43uCiy190b8AOHHixN8GPkpQ3/cmfrfWukfIPUyw73vjvTci8oqIJndGRBwivk3TNPwoQWYeAOC689p4hOgugsFq971KYhBRt8f9pD3IzEOOnIg4ABiJqCOibpomBIARAMbw2xd47+/BAyqoLJiznIi4pmnGmjW2rK615IuGYEbBeLvdBs3dQALTuA0yqwZqageCYBOTOxLs8zy7tm0xltW2Lc7z7Er3qv+AmSV+DzF2GJfL5R6XpZqri0mSBjMRdd8hBwDQNM0Yv3vvTel8kaCIvEbPTpMQaUdJYa11cXbHOnIoJknsCkR8KxFbluW6WoOZi64LskyqI4dNC9YsEcN7f08VLcuy2WmIyGl1qQv1VuZuCUfEqrs1UBN8hLIVT2l1JWW5llYisqfVbRJMhZfKQVo6RMTtKUklixazOMxzJjxvloO1na1hUHNhmCE/dZTOFl0clxZN0FtrVbVSW76qBNNyUCodWqSDR62vFwkGa3zGFyKaPQGeInN3zJ2LoWr86cAAByaa3JqgGTxU8yARdYlrrsx81QydaxuEryObevBQj05bi9K6uQF8xNOaSJWNT+2BX780/a+1MwUzD5rFnYiq9fEpBGM869PHiRMn/jreAZxNPtSJHlfLAAAAAElFTkSuQmCC" alt="path" />\n\t\t\t\t<span>日期:').concat(e,'</span>\n\t\t\t</div>\n\t\t\t<div class="formatter-body">\n\t\t\t\t').concat(n,'\n\t\t\t\t<div class="process-top5 ').concat(t.data.length?"":"hide",'">\n\t\t\t\t<div class="process-header"></div>\n\t\t\t\t<table class="process-table">\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t').concat(i,"\n\t\t\t\t\t</colgroup>\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>").concat(a,"</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>").concat(r,"</tbody>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>")},Rt=function(t,e){var n={cpu:function(t){return n=(e=t).startTime,a=e.endTime,r=e.yData,i=e.topData,(o=c(Et({startTime:n,endTime:a}))).tooltip.formatter=function(t){for(var e="",n=0;n<t.length;n++){var a=t[n];e+='\n\t\t\t\t<div class="select-data">\n\t\t\t\t\t<span class="status" style="background-color: '.concat(a.color,'"></span>\n\t\t\t\t\t<span>').concat(a.seriesName,":").concat(tt(a.data[1])?a.data[1].toFixed(2):0,"%</span>\n\t\t\t\t</div>")}return Gt({time:t[0].axisValueLabel,data:i[t[0].axisValue],width:"51rem",legend:e})},Mt(o),o.yAxis.name="百分比",o.yAxis.min=0,o.yAxis.max=100,o.series=[u(u({name:"CPU"},Bt.series),{},{itemStyle:{color:"rgb(0, 153, 238)"},data:r})],o;var e,n,a,r,i,o},mem:function(t){return n=(e=t).startTime,a=e.endTime,r=e.zData,i=e.topData,o=e.echartsId,(l=c(Et({startTime:n,endTime:a}))).tooltip.formatter=function(t){for(var e="",n=0;n<t.length;n++){var a=t[n];e+='\n\t\t\t\t<div class="select-data">\n\t\t\t\t\t<span class="status" style="background-color: '.concat(a.color,'"></span>\n\t\t\t\t\t<span>').concat(a.seriesName,":").concat(tt(a.data[1])?a.data[1].toFixed(2):0,"%</span>\n\t\t\t\t</div>")}return Gt({time:t[0].axisValueLabel,data:i[t[0].axisValue],width:"55rem",table:[{title:"PID",width:"50px",index:1},{title:"进程名",width:"100px",index:2},{title:"内存占用",index:0},{title:"启动用户",index:4},{title:"cmd",index:3,width:"200px"}],legend:e})},l.tooltip.className="mem-tooltip",Mt(l,o),l.yAxis.name="百分比",l.yAxis.min=0,l.yAxis.max=100,l.series=[u(u({name:"内存"},Bt.series),{},{itemStyle:{color:"rgb(0, 153, 238)"},data:r})],l;var e,n,a,r,i,o,l},disk:function(t){return n=(e=t).unit,a=e.disableGB,r=e.startTime,i=e.endTime,o=e.rData,l=e.wData,s=e.zData,d=e.yData,f=e.topData,p=e.echartsId,m=c(Et({startTime:r,endTime:i})),v=n||"",m.tooltip.formatter=function(t){for(var e="",n=0;n<t.length;n++){var a=t[n],r="";"读写次数"===a.seriesName&&(r="次/s"),"读写延迟"===a.seriesName&&(r="ms"),"读取"!==a.seriesName&&"写入"!==a.seriesName||(r=v),e+='<div class="select-data"><span class="status" style="background-color: '+a.color+'"></span><span>'+a.seriesName+":"+(tt(a.data[1])?a.data[1].toFixed(2):0)+" "+r+"</span></div>"}var i=function(t){return"number"!=typeof t?"--":et(t)};return Gt({time:t[0].axisValueLabel,data:f[t[0].axisValue],width:"650px",table:[{title:"PID",width:"50px",index:3},{title:"进程名",width:"100px",index:4},{title:"磁盘占用",width:"70px",index:0,unit:i},{title:"读取",width:"70px",index:1,unit:i},{title:"写入",width:"70px",index:2,unit:i},{title:"启动用户",index:6},{title:"cmd",index:5,width:"200px"}],legend:e})},Mt(m,p),m.echartsParams={unit:n,disableGB:a},m.legend={top:"18px",data:["读取","写入","读写次数","读写延迟"]},m.series=[u(u({name:"读取"},Bt.series),{},{itemStyle:{color:"rgb(255, 70, 131)"},data:o}),u(u({name:"写入"},Bt.series),{},{itemStyle:{color:"rgba(46, 165, 186, .7)"},data:l}),u(u({name:"读写次数"},Bt.series),{},{itemStyle:{color:"rgba(30, 144, 255)"},data:d}),u(u({name:"读写延迟"},Bt.series),{},{itemStyle:{color:"rgba(255, 140, 0)"},data:s})],m;var e,n,a,r,i,o,l,s,d,f,p,m,v},network:function(t){return n=(e=t).unit,a=e.disableGB,r=e.startTime,i=e.endTime,o=e.yData,l=e.zData,s=e.echartsId,(d=c(Et({startTime:r,endTime:i}))).tooltip.formatter=function(t){var e=t[0].data[0];$(e/1e3);for(var a="",r=0;r<t.length;r++){var i=t[r];a+='\n\t\t\t\t<div class="select-data">\n\t\t\t\t\t<span class="status" style="background-color: '.concat(i.color,'"></span>\n\t\t\t\t\t<span>').concat(i.seriesName,":").concat(tt(i.data[1])?i.data[1].toFixed(3):0," ").concat(n,"</span>\n\t\t\t\t</div>")}return Gt({width:"280px",time:t[0].axisValueLabel,legend:a})},Mt(d,s),d.echartsParams={unit:n,disableGB:a},d.legend={top:"18px",data:["上行","下行"]},d.series=[u(u({name:"上行"},Bt.series),{},{itemStyle:{color:"rgb(255, 70, 131)"},data:o}),u(u({name:"下行"},Bt.series),{},{itemStyle:{color:"rgba(46, 165, 186, .7)"},data:l})],d;var e,n,a,r,i,o,l,s,d},load:function(t){return n=(e=t).startTime,a=e.endTime,r=e.yData,i=e.zData,o=e.aData,l=e.bData,s=e.topData,d=e.echartsId,f=c(Et({startTime:n,endTime:a})),p=(a-n)/3*1e3,f.tooltip.formatter=function(t){for(var e="",n="",a=0;a<t.length;a++){var r=t[a];switch(r.seriesName){case"1分钟":case"5分钟":case"15分钟":e+='\n\t\t\t\t\t\t<div class="select-data">\n\t\t\t\t\t\t\t<span class="status" style="background-color: '.concat(r.color,'"></span>\n\t\t\t\t\t\t\t<span>').concat(r.seriesName,":").concat(tt(r.data[1])?r.data[1].toFixed(2):0,"</span>\n\t\t\t\t\t\t</div>");break;case"资源使用率":n=tt(r.data[1])?r.data[1].toFixed(2):"0"}}return Gt({time:t[0].axisValueLabel,data:s[t[0].axisValue],width:"50rem",legend:'\n\t\t\t\t<div class="select-data">\n\t\t\t\t\t<span class="status"></span>\n\t\t\t\t\t<span>资源使用率:'.concat(n,'%</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="').concat("资源使用率"===t[0].seriesName?"hide":"",'">\n\t\t\t\t\t').concat(e,"\n\t\t\t\t</div>\n\t\t\t")})},Mt(f,d),f.legend={data:["1分钟","5分钟","15分钟"],right:"16%",top:"10px"},f.axisPointer={link:{xAxisIndex:"all"},lineStyle:{color:"#aaaa",width:1}},f.grid=[{left:"5%",bottom:80,right:"55%",width:"40%",height:"auto"},{bottom:80,left:"55%",width:"40%",height:"auto"}],f.xAxis=[{type:"time",boundaryGap:["1%","0%"],minInterval:p,axisLine:Bt.axisLine,axisLabel:Bt.axisLabel},{type:"time",gridIndex:1,boundaryGap:["1%","0%"],minInterval:p,axisLine:Bt.axisLine,axisLabel:Bt.axisLabel}],f.yAxis=[{scale:!0,name:"资源使用率",min:0,max:function(t){return t.max>=100?Math.ceil(t.max):t.max>=80?100:parseInt((t.max+10).toString().slice(0,1)+"0")},splitLine:u(u({},Bt.splitLine),{},{show:!0}),nameTextStyle:Bt.nameTextStyle,axisLine:Bt.axisLine},{scale:!0,name:"负载详情",gridIndex:1,splitLine:u(u({},Bt.splitLine),{},{show:!0}),nameTextStyle:Bt.nameTextStyle,axisLine:Bt.axisLine}],f.dataZoom[0].xAxisIndex=[0,1],f.dataZoom[1].type="slider",f.dataZoom[1].left="5%",f.dataZoom[1].right="5%",f.dataZoom[1].xAxisIndex=[0,1],f.series=[u(u({name:"资源使用率"},Bt.series),{},{lineStyle:{itemStyle:{width:2,color:"rgb(255, 140, 0)"}},itemStyle:{color:"rgb(255, 140, 0)"},data:r}),u(u({xAxisIndex:1,yAxisIndex:1,name:"1分钟"},Bt.series),{},{lineStyle:{itemStyle:{width:2,color:"rgb(30, 144, 255)"}},itemStyle:{color:"rgb(30, 144, 255)"},data:i}),u(u({xAxisIndex:1,yAxisIndex:1,name:"5分钟"},Bt.series),{},{lineStyle:{itemStyle:{width:2,color:"rgb(0, 178, 45)"}},itemStyle:{color:"rgb(0, 178, 45)"},data:o}),{xAxisIndex:1,yAxisIndex:1,name:"15分钟",type:"line",smooth:!0,symbol:"circle",showSymbol:!1,lineStyle:{itemStyle:{width:2,color:"rgb(147, 38, 255)"}},itemStyle:{color:"rgb(147, 38, 255)"},data:l}],f.textStyle={color:"#666",fontSize:12},f;var e,n,a,r,i,o,l,s,d,f,p}};return n[e](t)},Ut=function(t,e){var n={cpu:Dt,mem:Tt,disk:At,network:St,load:_t}[e];n.echartsOption=Rt(u(u({},t),{},{topData:n.topData,echartsId:n.echartsId}),e)},qt=function(){var t=new Date;return $(t.getTime()/1e3,"yyyy/MM/dd")},Nt=function(t){var e=new Date(qt()).getTime();return $((e-24*t*3600*1e3)/1e3,"yyyy/MM/dd")},Ft=function(t){var e=0,n=Math.floor((new Date).getTime()/1e3);return 0==t?e=new Date(qt()+" 00:00:00").getTime()/1e3:1==t?(e=new Date(Nt(t)+" 00:00:00").getTime()/1e3,n=new Date(Nt(t)+" 23:59:59").getTime()/1e3):e=new Date(Nt(t-1)+" 00:00:00").getTime()/1e3,{b:e=Math.floor(e),e:n=Math.floor(n)}},Wt=function(){var t=o(a().m(function t(e,n,r){var i,o,l,u;return a().w(function(t){for(;;)switch(t.n){case 0:return i=Ft(e),o=i.b,l=i.e,u={cpu:Dt,mem:Tt,disk:At,network:St,load:_t}[r],t.n=1,n(o,l);case 1:Ut(u.echartsParams,r);case 2:return t.a(2)}},t)}));return function(e,n,a){return t.apply(this,arguments)}}(),Zt=function(t,e){var n=e.split(" ")[0].split("/");parseInt(n[0],10),parseInt(n[1],10);var a=new Date,r=t.split(" "),i=r[0].split("/"),o=r[1].split(":"),l=parseInt(i[0],10),u=parseInt(i[1],10),c=parseInt(o[0],10),s=parseInt(o[1],10),d=a.getFullYear(),f=a.getMonth()+1,p=a.getDate();return(l>f||l===f&&u>p)&&(d-=1),new Date(d,l-1,u,c,s).getTime()},Yt=function(t){if(void 0!==t&&t.length>0)for(var e,n=0;n<t.length;n++)"number"!=typeof t[n].addtime&&(e=Zt(t[n].addtime,t[t.length-1].addtime),t[n].addtime=e)},Kt=function(t,e){return Pt(t).slice(0,5)!==Pt(e).slice(0,5)},Jt=function(){var t=o(a().m(function t(e,n,r,i){var o,l,u,c,s,d,f,p,m,v,y;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,o=[],i){t.n=1;break}return t.n=1,Lt(e,n);case 1:if(0!==(o=It.value).length){t.n=2;break}return"CPU"===r?Dt.echartsParams={startTime:0,endTime:0,yData:[]}:Tt.echartsParams={startTime:0,endTime:0,zData:[]},t.a(2);case 2:if(Yt(o),Kt(o[o.length-1].addtime/1e3,e),"CPU"===r){if(l=[],o.length>0){for(u=0;u<o.length;u++)c=o[u],l.push([c.addtime,c.pro]),void 0===Dt.topData&&(Dt.topData={}),Dt.topData[c.addtime]=c.cpu_top;s=o[0].addtime,d=o[o.length-1].addtime,l.sort(function(t,e){return t[0]-e[0]}),Dt.echartsParams={startTime:s,endTime:d,yData:l}}}else if(f=[],o.length>0){for(u=0;u<o.length;u++)p=o[u],f.push([p.addtime,p.mem]),void 0===Tt.topData&&(Tt.topData={}),Tt.topData[p.addtime]=p.memory_top.map(function(t){return tt(t[0])&&(t[0]=et(t[0])),t});m=o[0].addtime,v=o[o.length-1].addtime,f.sort(function(t,e){return t[0]-e[0]}),Tt.echartsParams={startTime:m,endTime:v,zData:f}}t.n=4;break;case 3:t.p=3,y=t.v,console.log(y);case 4:return t.a(2)}},t,null,[[0,3]])}));return function(e,n,a,r){return t.apply(this,arguments)}}(),Ht=function(){var t=o(a().m(function t(){return a().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,J({type:"calc",title:"清空记录",width:"35rem",content:"您真的要清空所有监控记录吗?"});case 1:K({request:ut({type:"del"}),message:!0,success:function(){window.location.reload()}}),t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}));return function(){return t.apply(this,arguments)}}(),Qt=function(t){return t>=1048576?"GB/s":t>=1024?"MB/s":"KB/s"},Xt=function(t,e){if(!t||0===t.length)return{rData:[],wData:[],zData:[],yData:[],topData:{},unit:"Auto"===e?"KB/s":e,disableGB:!1};var n=0;t.forEach(function(t){var e=t.read_bytes/1024,a=t.write_bytes/1024;e>n&&(n=e),a>n&&(n=a)});var a=n<1048576,r=e;"Auto"===r&&(r=Qt(n));var i=1;switch(r){case"MB/s":i=1024;break;case"GB/s":i=1048576;break;default:i=1}var o=[],l=[],u=[],c=[],s={};t.forEach(function(t){var e=t.read_bytes/1024,n=t.write_bytes/1024;o.push([t.addtime,e/i]),l.push([t.addtime,n/i]),c.push([t.addtime,t.read_count+t.write_count]),u.push([t.addtime,t.read_time+t.write_time]),s[t.addtime]=t.disk_top});var d=function(t,e){return t[0]-e[0]};return o.sort(d),l.sort(d),c.sort(d),u.sort(d),{rData:o,wData:l,zData:u,yData:c,topData:s,unit:r,disableGB:a}},$t=function(t,e,a){if(!t||0===t.length)return{yData:[],zData:[],unit:"Auto"===e?"KB/s":e,disableGB:!1};var r=a||"";"all"===r&&(r="");var i=0;t.forEach(function(t){var e=t.up,a=t.down;""!==r&&("object"===n(t.up_packets)&&(e=t.up_packets[r]||0),"object"===n(t.down_packets)&&(a=t.down_packets[r]||0)),e>i&&(i=e),a>i&&(i=a)});var o=i<1048576,l=e;"Auto"===l&&(l=Qt(i));var u=1;switch(l){case"MB/s":u=1024;break;case"GB/s":u=1048576;break;default:u=1}var c=[],s=[];t.forEach(function(t){if("object"===n(t.down_packets)){var e=0,a=0;e=""!==r&&"object"===n(t.down_packets)?t.down_packets[r]||0:t.down,a=""!==r&&"object"===n(t.up_packets)?t.up_packets[r]||0:t.up,s.push([t.addtime,e/u]),c.push([t.addtime,a/u])}});var d=function(t,e){return t[0]-e[0]};return c.sort(d),s.sort(d),{yData:c,zData:s,unit:l,disableGB:o}},te=function(){var t=o(a().m(function t(e,n,r){var i;return a().w(function(t){for(;;)switch(t.n){case 0:return i=function(){var t=o(a().m(function t(n,r){var i;return a().w(function(t){for(;;)switch(t.n){case 0:if((i={cpu:Dt,mem:Tt,disk:At,network:St,load:_t}[r]).day=e,!Array.isArray(e)){t.n=2;break}return t.n=1,n(e[0],e[1]);case 1:Ut(i.echartsParams,r),t.n=3;break;case 2:return t.n=3,Wt(i.day,n,r);case 3:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}(),t.n=1,Q([[X("cpu"),o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i(function(t,e){return Jt(t,e,"CPU",r)},"cpu");case 1:return t.a(2,t.v)}},t)}))],[X("mem"),o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i(function(t,e){return Jt(t,e,"内存",r)},"mem");case 1:return t.a(2,t.v)}},t)}))],[X("disk"),o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i(ee,"disk");case 1:return t.a(2,t.v)}},t)}))],[X("network"),o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i(ne,"network");case 1:return t.a(2,t.v)}},t)}))],[X("load"),o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i(ae,"load");case 1:return t.a(2,t.v)}},t)}))]])(n);case 1:return t.a(2)}},t)}));return function(e,n,a){return t.apply(this,arguments)}}(),ee=function(){var t=o(a().m(function t(e,n){var r,i,o,l,u,c,s,d,f,p,m,v,y;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:return r=[],t.n=1,K({request:ct({start:e,end:n}),data:[Array,function(t){return r=t}]});case 1:if(0!==r.length){t.n=2;break}return At.echartsParams={unit:"Auto"===vt.value?"KB/s":vt.value,startTime:0,endTime:0,rData:[],wData:[],zData:[],yData:[]},t.a(2);case 2:return Yt(r),Kt(r[r.length-1].addtime/1e3,e),t.p=3,t.n=4,Ct("disk",{data:r,unitType:vt.value});case 4:i=t.v,t.n=6;break;case 5:t.p=5,y=t.v,console.error("Worker failed, using local fallback",y),i=Xt(r,vt.value);case 6:l=(o=i).rData,u=o.wData,c=o.zData,s=o.yData,d=o.topData,f=o.unit,p=o.disableGB,void 0===At.topData&&(At.topData={}),Object.assign(At.topData,d),r.length>0&&(m=r[0].addtime/1e3,v=r[r.length-1].addtime/1e3,At.echartsParams={unit:f,disableGB:p,startTime:m,endTime:v,rData:l,wData:u,zData:c,yData:s});case 7:return t.a(2)}},t,null,[[3,5]])}));return function(e,n){return t.apply(this,arguments)}}(),ne=function(){var t=o(a().m(function t(e,n){var r,i,o,l,u,c,s,d,f,p;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:return r=[],t.n=1,K({request:st({start:e,end:n}),data:[Array,function(t){return r=t}]});case 1:if(0!==r.length){t.n=2;break}return St.echartsParams={unit:"Auto"===yt.value?"KB/s":yt.value,startTime:0,endTime:0,yData:[],zData:[]},t.a(2);case 2:return 1===St.selectList.length&&Object.keys(r[0].down_packets).forEach(function(t){St.selectList.push({title:t,value:t})}),Yt(r),Kt(r[r.length-1].addtime/1e3,e),t.p=3,t.n=4,Ct("network",{data:r,unitType:yt.value,networkIoKey:ht.value});case 4:i=t.v,t.n=6;break;case 5:t.p=5,p=t.v,console.error("Worker failed, using local fallback",p),i=$t(r,yt.value,ht.value);case 6:l=(o=i).yData,u=o.zData,c=o.unit,s=o.disableGB,r.length>0&&(d=r[0].addtime/1e3,f=r[r.length-1].addtime/1e3,St.echartsParams={unit:c,disableGB:s,startTime:d,endTime:f,yData:l,zData:u});case 7:return t.a(2)}},t,null,[[3,5]])}));return function(e,n){return t.apply(this,arguments)}}(),ae=function(){var t=o(a().m(function t(e,n){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,K({request:dt({start:e,end:n}),data:Array,success:function(t){if(0!==t.length){Yt(t),Kt(t[t.length-1].addtime/1e3,e);var n=[],a=[],r=[],i=[];if(void 0!==t&&(null==t||t.forEach(function(t){i.push([t.addtime,t.one]),r.push([t.addtime,t.pro]),n.push([t.addtime,t.five]),a.push([t.addtime,t.fifteen]),void 0===_t.topData&&(_t.topData={}),_t.topData[t.addtime]=t.cpu_top}),t.length>0)){var o=t[0].addtime/1e3,l=t[t.length-1].addtime/1e3;r.sort(function(t,e){return t[0]-e[0]}),i.sort(function(t,e){return t[0]-e[0]}),n.sort(function(t,e){return t[0]-e[0]}),a.sort(function(t,e){return t[0]-e[0]}),_t.echartsParams={startTime:o,endTime:l,yData:r,zData:i,aData:n,bData:a}}}else _t.echartsParams={startTime:0,endTime:0,yData:[],zData:[],aData:[],bData:[]}}});case 1:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}(),re=function(t){ht.value="all"===t?"":t,Wt(St.day,ne,"network")},ie=s(function(){Wt(St.day,ne,"network")},300),oe=function(t){yt.value=t,localStorage.setItem("networkUnitType",t),ie()},le=s(function(){Wt(At.day,ee,"disk")},300),ue=function(t){vt.value=t,localStorage.setItem("diskUnitType",t),le()},ce=function(){var t=o(a().m(function t(e){var n,r,i;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&"cpu"!==e){t.n=1;break}return t.n=1,te(Dt.day,"cpu");case 1:return n=[{condition:!e||"load"===e,day:_t.day,key:"load"},{condition:!e||"mem"===e,day:Tt.day,key:"mem",notRequest:!e},{condition:!e||"network"===e,day:St.day,key:"network"},{condition:!e||"disk"===e,day:At.day,key:"disk"}],r=n.filter(function(t){return t.condition}).map(function(t){return te(t.day,t.key,null==t?void 0:t.notRequest)}),t.n=2,Promise.allSettled(r);case 2:t.n=4;break;case 3:t.p=3,i=t.v,console.log("初始化数据时出错:",i);case 4:return t.a(2)}},t,null,[[0,3]])}));return function(e){return t.apply(this,arguments)}}(),se={class:"flex items-center"},de={class:"whitespace-nowrap"},fe=d({__name:"card-title",props:{type:{default:"network"},title:{default:"网络IO"},active:{type:Boolean,default:!1},selectList:{}},emits:["cut-day-click"],setup:function(t,e){var n=e.emit,a=i(ht.value||"all"),r=i(),o=function(){var t;null===(t=r.value)||void 0===t||t.focus(),n("cut-day-click"),A(function(){document.querySelectorAll(".custom-day-picker").forEach(function(t){t.style.display="none"})})};return function(e,n){var i=S,l=_;return f(),p("div",se,[m("span",de,v(t.title),1),y(b(l,{onClick:o,modelValue:D(a),"onUpdate:modelValue":n[0]||(n[0]=function(t){return T(a)?a.value=t:null}),teleported:!1,ref_key:"selectRef",ref:r,style:{width:"8rem"},size:"small",class:"2xl:w-[10rem] <2xl:w-[6rem] lt-lg:w-[10rem] text-left",onChange:n[1]||(n[1]=function(t){return D(re)(D(a))}),placeholder:"请选择"},{default:g(function(){return[(f(!0),p(w,null,x(t.selectList,function(t){return f(),k(i,{key:t.value,label:t.label,value:t.value},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"]),[[h,t.active]])])}}}),pe=nt(fe,[["__scopeId","data-v-ce2a758b"]]),me={class:"time-control flex relative"},ve=d({__name:"card-day",props:{type:{default:"network"}},emits:["cut-day-click"],setup:function(t,e){var n=e.emit,a=i(""),r=i(1),o=i(),l=i([]),u=c({disabledDate:function(t){var e=new Date;e.setHours(23,59,59,999);var n=e.getTime(),a=new Date(e.getTime()-24*bt.value*3600*1e3);return t.getTime()<a.getTime()||t.getTime()>n},defaultTime:[new Date,new Date]}),s=function(t){t||document.querySelectorAll(".custom-day-picker").forEach(function(t){t.style.display="none"})};return function(e,i){var c=V,d=O,m=C;return f(),p("div",me,[b(d,{class:"control-btn"},{default:g(function(){return[(f(!0),p(w,null,x((e=t.type,[{content:"昨天",active:!1,event:function(){r.value=0,te(1,e)}},{content:"今天",active:!0,event:function(){r.value=1,te(0,e)}},{content:"最近七天",active:!1,event:function(){r.value=2,a.value="最近七天",te(7,e)}},{content:"自定义时间",active:!1,event:function(){r.value=3,o.value.focus(),n("cut-day-click");var t=document.querySelectorAll(".custom-day-picker"),e=[];t.forEach(function(t){e.push(t.style.zIndex)});var a=e.reduce(function(t,e,n,a){return e>a[t]?n:t},0);t.forEach(function(t,e){e!==a&&(t.style.display="none")})}}]),function(t,e){return f(),k(c,{key:e,type:D(r)===e?"primary":"",onClick:t.event},{default:g(function(){return[I(v(t.content),1)]}),_:2},1032,["type","onClick"])}),128))];var e}),_:1}),b(m,{type:"daterange",modelValue:D(l),"onUpdate:modelValue":i[0]||(i[0]=function(t){return T(l)?l.value=t:null}),"range-separator":"","start-placeholder":"开始日期","end-placeholder":"结束日期",teleported:!1,"show-after":100,ref_key:"player",ref:o,class:"!absolute -z-1 !w-[92px] !h-[30px] right-0","popper-class":"custom-day-picker","default-time":D(u).defaultTime,"disabled-date":D(u).disabledDate,format:"YYYY/MM/DD","value-format":"x",onChange:i[1]||(i[1]=function(e){return n=D(l),r=t.type,a.value="自定义时间",n[0]=new Date(n[0]).setHours(0,0,0,0),n[1]=new Date(n[1]).setHours(23,59,59,0),n=[Math.floor(n[0]/1e3),Math.floor(n[1]/1e3)],void te(n,r);var n,r}),onVisibleChange:s},null,8,["modelValue","default-time","disabled-date"])])}}}),ye=nt(ve,[["__scopeId","data-v-d5b4d512"]]),he=function(){gt.value=!0},be=function(){var t=o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,at({isAsync:!0,title:"网络IO总流量统计",area:[70,50],component:function(){return rt(function(){return r.import("./network-day-dialog-legacy.js?v=1777008528")},void 0,r.meta.url)}});case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ge=function(t){document.fullscreenElement?A(o(a().m(function e(){return a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,be();case 1:document.querySelector(".el-overlay")&&t.$el.appendChild(document.querySelector(".el-overlay"));case 2:return e.a(2)}},e)}))):be()},we=(e("t",i([{label:"时间",prop:"time"},{label:"上行",prop:"total_up",render:function(t){return et(t.total_up)}},{label:"下行",prop:"total_down",render:function(t){return et(t.total_down)}}])),e("l",i(!1))),xe=new it,ke=e("d",i(30)),De=e("a",i([])),Te=(e("c",s(function(t){var e=Number(t);!Number.isInteger(e)||e<=0?ke.value=1:(ke.value=e,Te(t))},500)),e("g",function(){var t=o(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:xe.removePending({method:"post",url:"/ajax?action=GetNetWorkIoByDay"}),K({request:pt({day:e}),data:[Array,De],loading:we});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())),Ae={class:"module-ui-header"},Se={class:"flex items-center"},_e={key:0,class:"flex items-center"},Ie={class:"flex items-center ml-[1rem]"},Ve={class:"module-ui-body"},Oe={key:0,class:"show flex items-center"},Ce=d({__name:"index",props:{title:{default:"默认"},active:{type:Boolean,default:!1},compData:{default:function(){}},controlValue:{type:Boolean,default:!1},type:{default:""},unitVisible:{type:Boolean,default:!1},unitType:{default:"Auto"}},emits:["accept-echarts-id","reset","change-unit"],setup:function(e,n){var r,l,u,c=n.expose,s=n.emit,d=null!==(r=null===(l=crypto)||void 0===l||null===(u=l.randomUUID)||void 0===u?void 0:u.call(l))&&void 0!==r?r:Math.random().toString(36).slice(2),v=e,x=B(function(){return Object.keys(v.compData).includes("series")&&void 0===v.compData.series[0].data}),T=B(function(){var t;return null===(t=v.compData)||void 0===t||null===(t=t.echartsParams)||void 0===t?void 0:t.disableGB}),O=B(function(){if("Auto"===v.unitType){var t,e=null===(t=v.compData)||void 0===t||null===(t=t.echartsParams)||void 0===t?void 0:t.unit;return e?"自动 (".concat(e,")"):"自动"}return"自动"}),C=i(),q=i(),N=i(!1),F=i(),W=i("34rem"),Z=ot({options:{xAxis:{type:"category",boundaryGap:!1,data:[]},yAxis:{boundaryGap:[0,"50%"],type:"value"},tooltip:{extraCssText:"background-color: transparent!important;"},series:[{name:"成交",type:"line",smooth:!0,symbol:"none",stack:"a",data:[]}]}}),Y=Z.BtECharts,K=Z.getEChart,J=Z.setOption,H=(Z.setQuickOption,function(){var t=o(a().m(function t(e){var n;return a().w(function(t){for(;;)switch(t.n){case 0:return J(e),t.n=1,K();case 1:q.value=t.v,null===(n=q.value)||void 0===n||n.resize();case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()),Q=i(!1),X={x:0,y:0},$=i(!1),tt=i(!1),et=function(t){if($.value){var e=q.value.getDom().querySelector(".echarts-tooltip");e&&e.contains(t.target)||(ft(),document.removeEventListener("click",et))}},nt=function(t){tt.value||X&&($.value?ft():(q.value.setOption({backgroundColor:"transparent",tooltip:{alwaysShowContent:!0,extraCssText:"background-color: transparent!important;"}}),$.value=!0,document.removeEventListener("click",et),setTimeout(function(){document.addEventListener("click",et)},100)))},at=function(t){var e,n=t.areas&&t.areas[0];if(n){var a=n.coordRange||n.range;if(a&&!(a.length<2)){var r=n.coordRange?n.coordRange[0]:q.value.convertFromPixel({xAxisIndex:0},a[0]),i=n.coordRange?n.coordRange[1]:q.value.convertFromPixel({xAxisIndex:0},a[1]);setTimeout(function(){var t;null===(t=q.value)||void 0===t||t.dispatchAction({type:"brush",areas:[]}),q.value.resize()},50),null===(e=q.value)||void 0===e||e.dispatchAction({type:"dataZoom",xAxisIndex:[0,1],startValue:r,endValue:i}),s("reset",d)}}},rt=function(){q.value&&(setTimeout(function(){var t;null===(t=q.value)||void 0===t||t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"lineX",brushMode:"single"}}),q.value.resize(),Q.value=!0},500),q.value.off("brushEnd",at),q.value.on("brushEnd",at),q.value.getZr().off("click"),q.value.getZr().on("click",nt),q.value.off("legendselectchanged"),q.value.on("legendselectchanged",function(){tt.value=!0,Promise.resolve().then(function(){tt.value=!1})}))};P(N,function(t){t?W.value=it():(W.value="34rem",A(function(){var t;null===(t=q.value)||void 0===t||t.resize()}))});var it=function(){var t=34;N.value&&(t=(window.screen.height-60)/10);return"".concat(t,"rem")},lt=function(){var t,e;N.value=!1,null===(t=document)||void 0===t||t.exitFullscreen(),C.value.removeAttribute("style"),null===(e=q.value)||void 0===e||e.resize()},ut=function(){N.value=!0,F.value.hide(),A(function(){C.value.requestFullscreen&&(C.value.style.backgroundColor="var(--el-fill-color-lighter)",C.value.requestFullscreen())})},ct=function(){var t=!!document.fullscreenElement;return null==t&&(t=!1),t},st=function(){ct()&&A(o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:document.querySelector(".el-select-dropdown.el-popper")&&A(function(){C.value.$el.appendChild(document.querySelector(".el-select-dropdown.el-popper"))});case 1:return t.a(2)}},t)})))},dt=function(t,e){try{A(function(){H(t),rt()}),function(t,e){switch(e){case"cpu":Dt.echartsId=t;break;case"mem":Tt.echartsId=t;break;case"disk":At.echartsId=t;break;case"network":St.echartsId=t;break;case"load":_t.echartsId=t}}(q.value.id,e)}catch(n){}};P(function(){return[v.compData,q.value]},function(){try{var t;if(H(v.compData),q.value)null===(t=q.value)||void 0===t||t.resize(),Q.value=!1,A(function(){rt()})}catch(e){}});var ft=function(){var t=o(a().m(function t(e){var n;return a().w(function(t){for(;;)switch(t.n){case 0:if(!e||d!==e){t.n=1;break}return t.a(2);case 1:return $.value=!1,t.n=2,K();case 2:(n=t.v).clear(),n.setOption({backgroundColor:"transparent",tooltip:{extraCssText:"background-color: transparent!important;"}}),H(v.compData),A(function(){rt()});case 3:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return L(function(){dt(v.compData,v.type),window.addEventListener("fullscreenchange",function(){ct()||(N.value=!1,document.fullscreenElement&&document.exitFullscreen().catch(console.error))},{passive:!0})}),j(function(){var t,e,n,a;q.value&&(null===(t=q.value)||void 0===t||t.off("brushEnd"),null===(e=q.value)||void 0===e||null===(e=e.getZr())||void 0===e||e.off("dblclick"),null===(n=q.value)||void 0===n||null===(n=n.getZr())||void 0===n||n.off("mousedown"),null===(a=q.value)||void 0===a||null===(a=a.getZr())||void 0===a||a.off("mouseup"))}),c({setConfig:J,echartRef:q,closeTooltip:ft,selfId:d}),function(n,a){var r=R,i=V,o=U,l=S,u=_,c=z("bt-loading");return f(),p("div",{class:"module-ui",ref_key:"chartModulesRef",ref:C},[m("div",Ae,[m("div",Se,[b(pe,E({type:e.type,title:v.title,active:v.active},n.$attrs,{onCutDayClick:st}),null,16,["type","title","active"]),b(r,{ref_key:"tooltipFull",ref:F,effect:"dark",content:"全屏展示",placement:"top",trigger:"hover"},{default:g(function(){return[D(N)||D(x)?M("",!0):(f(),p("i",{key:0,class:"full-icon svgtofont-el-fullscreen-expand hover:text-primary",onClick:ut}))]}),_:1},512)]),D(x)?M("",!0):(f(),p("div",_e,["网络IO:"===v.title?(f(),k(i,{key:0,class:"!<2xl:hidden !2xl:inline-block",type:"default",onClick:a[0]||(a[0]=function(t){return D(ge)(D(C))})},{default:g(function(){return t(a[5]||(a[5]=[I("统计 ",-1)]))}),_:1})):M("",!0),"网络IO:"===v.title?(f(),k(r,{key:1,effect:"dark",content:"网络IO统计",placement:"top-start"},{default:g(function(){return[m("i",{onClick:a[1]||(a[1]=function(t){return D(ge)(D(C))}),class:"cursor-pointer svgtofont-left-control hover:text-primary <2xl:inline-block 2xl:hidden",title:"网络IO统计"})]}),_:1})):M("",!0),m("div",Ie,[b(r,{effect:"dark",content:"点击刷新数据",placement:"top-start"},{default:g(function(){return[b(i,{type:"default",onClick:a[2]||(a[2]=function(t){return D(ce)(v.type)}),class:"!<2xl:hidden !2xl:inline-block"},{default:g(function(){return t(a[6]||(a[6]=[m("i",{class:"svgtofont-el-refresh text-medium"},null,-1)]))}),_:1})]}),_:1}),b(ye,{class:"ml-[1rem]",type:e.type,onCutDayClick:st},null,8,["type"]),D(N)?(f(),p("i",{key:0,title:"退出全屏",class:"mt-2px text-large svgtofont-el-close cursor-pointer ml-[.5rem] hover:text-primary",onClick:lt})):M("",!0)])]))]),m("div",Ve,[D(x)?(f(),p(w,{key:0},[v.controlValue||void 0!==v.compData.series[0].data?(f(),k(o,{key:1,class:"w-[100%]",description:"我们正在努力为您收集数据,请耐心等待1-2分钟后再尝试查看。"})):(f(),k(o,{key:0,class:"w-[100%]",description:"未开启监控,暂无数据"},{default:g(function(){return[m("span",{class:"bt-link",onClick:a[3]||(a[3]=function(){return D(he)&&D(he).apply(void 0,arguments)})},"点击开启监控 ")]}),_:1}))],64)):M("",!0),y((f(),p("div",{style:G([{height:D(W)},{position:"relative"}]),class:"percentage w-full"},[b(D(Y),{class:"!h-full"}),v.unitVisible?(f(),p("div",Oe,[a[7]||(a[7]=m("span",{class:"mr-2"},"单位:",-1)),b(u,{"model-value":v.unitType,onChange:a[4]||(a[4]=function(t){return s("change-unit",t)}),class:"!w-[10rem]",size:"small"},{default:g(function(){return[b(l,{label:D(O),value:"Auto"},null,8,["label"]),b(l,{label:"KB/s",value:"KB/s"}),b(l,{label:"MB/s",value:"MB/s"}),b(l,{label:"GB/s",value:"GB/s",disabled:D(T)},null,8,["disabled"])]}),_:1},8,["model-value"])])):M("",!0)],4)),[[h,!D(x)],[c,"{}"===JSON.stringify(v.compData)]])])],512)}}}),Be={class:"w-full flex justify-start items-center top_all text-small"},Pe={class:"monitor"},Le={class:"flex items-center flex-row ml-8px"},je={class:"mr-[3.125rem]"},ze=d({__name:"index",setup:function(e){var n=q("loadRef"),r=q("cpuRef"),i=q("memRef"),l=q("diskRef"),u=q("networkRef"),c=function(t){var e,a,o,c,s;null===(e=n.value)||void 0===e||e.closeTooltip(t),null===(a=r.value)||void 0===a||a.closeTooltip(t),null===(o=i.value)||void 0===o||o.closeTooltip(t),null===(c=l.value)||void 0===c||c.closeTooltip(t),null===(s=u.value)||void 0===s||s.closeTooltip(t)};return L(o(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,jt();case 1:ce();case 2:return t.a(2)}},t)}))),function(e,a){var o=N,s=lt,d=V,y=Z,h=F,w=W;return f(),p("section",null,[b(w,{span:24,class:"module-ui !rounded-medium !px-[1.6rem] !py-[1.2rem]"},{default:g(function(){return[b(h,{span:24,class:"flex"},{default:g(function(){return[m("div",Be,[m("div",Pe,[a[10]||(a[10]=m("span",{class:"mr-8px align-middle"},"开启监控",-1)),b(o,{modelValue:D(gt),"onUpdate:modelValue":a[0]||(a[0]=function(t){return T(gt)?gt.value=t:null}),checked:"",onChange:a[1]||(a[1]=function(t){return D(zt)(!0)})},null,8,["modelValue"])]),m("div",Le,[a[12]||(a[12]=m("span",{class:"whitespace-nowrap"},"保存天数:",-1)),b(s,{width:"8.4rem",type:"number",modelValue:D(wt),"onUpdate:modelValue":a[2]||(a[2]=function(t){return T(wt)?wt.value=t:null})},null,8,["modelValue"]),b(d,{class:"ml-8px",onClick:a[3]||(a[3]=function(t){return D(zt)()}),type:""},{default:g(function(){return t(a[11]||(a[11]=[I("更改",-1)]))}),_:1})]),b(y,{style:{margin:"0 2rem",height:"2rem"}}),m("span",je,"监控日志大小:"+v(D(et)(D(xt))),1),b(d,{onClick:a[4]||(a[4]=function(t){return D(Ht)()})},{default:g(function(){return t(a[13]||(a[13]=[I("清空记录",-1)]))}),_:1})])]}),_:1})]}),_:1}),b(w,{class:"mt-[1.2rem]"},{default:g(function(){return[b(h,{span:24},{default:g(function(){return[b(Ce,{ref_key:"loadRef",ref:n,controlValue:D(gt),"onUpdate:controlValue":a[5]||(a[5]=function(t){return T(gt)?gt.value=t:null}),title:D(_t).title,active:D(_t).active,compData:D(_t).echartsOption,unitVisible:D(_t).unitVisible,type:"load",onReset:c},null,8,["controlValue","title","active","compData","unitVisible"])]}),_:1})]}),_:1}),b(w,{class:"mt-[1.2rem]",gutter:24,span:24},{default:g(function(){return[b(h,{md:12,sm:24,span:12,xs:24},{default:g(function(){return[b(Ce,{ref_key:"cpuRef",ref:r,controlValue:D(gt),"onUpdate:controlValue":a[6]||(a[6]=function(t){return T(gt)?gt.value=t:null}),title:D(Dt).title,active:D(Dt).active,compData:D(Dt).echartsOption,unitVisible:D(Dt).unitVisible,type:"cpu",onReset:c},null,8,["controlValue","title","active","compData","unitVisible"])]}),_:1}),b(h,{md:12,sm:24,span:12,xs:24},{default:g(function(){return[b(Ce,{ref_key:"memRef",ref:i,controlValue:D(gt),"onUpdate:controlValue":a[7]||(a[7]=function(t){return T(gt)?gt.value=t:null}),title:D(Tt).title,active:D(Tt).active,compData:D(Tt).echartsOption,unitVisible:D(Tt).unitVisible,type:"mem",onReset:c},null,8,["controlValue","title","active","compData","unitVisible"])]}),_:1})]}),_:1}),b(w,{class:"mt-[1.2rem]",gutter:24,span:24},{default:g(function(){return[b(h,{md:24,sm:24,lg:12,span:12,xs:24},{default:g(function(){return[b(Ce,{ref_key:"diskRef",ref:l,controlValue:D(gt),"onUpdate:controlValue":a[8]||(a[8]=function(t){return T(gt)?gt.value=t:null}),title:D(At).title,active:D(At).active,compData:D(At).echartsOption,unitVisible:D(At).unitVisible,unitType:D(vt),type:"disk",onReset:c,onChangeUnit:D(ue)},null,8,["controlValue","title","active","compData","unitVisible","unitType","onChangeUnit"])]}),_:1}),b(h,{md:24,lg:12,sm:24,span:12,xs:24},{default:g(function(){return[b(Ce,{ref_key:"networkRef",ref:u,controlValue:D(gt),"onUpdate:controlValue":a[9]||(a[9]=function(t){return T(gt)?gt.value=t:null}),title:D(St).title,active:D(St).active,compData:D(St).echartsOption,unitVisible:D(St).unitVisible,selectList:D(St).selectList,unitType:D(yt),type:"network",onReset:c,onChangeUnit:D(oe)},null,8,["controlValue","title","active","compData","unitVisible","selectList","unitType","onChangeUnit"])]}),_:1})]}),_:1})])}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:ze},Symbol.toStringTag,{value:"Module"}));e("i",Ee)}}})}();