← Back
Editing: store-legacy4.js
!function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;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:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}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 r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var t,e={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.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(t){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),s=new T(r||[]);return a(i,"_invoke",{value:P(t,n,s)}),i}function v(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",h="suspendedYield",g="executing",d="completed",y={};function w(){}function b(){}function _(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(D([])));I&&I!==o&&i.call(I,c)&&(x=I);var k=_.prototype=w.prototype=Object.create(x);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,s,c){var u=v(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function P(e,n,r){var o=m;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var u=v(e,n,r);if("normal"===u.type){if(o=r.done?d:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=d,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=v(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function E(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function D(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,a=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=_,a(k,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(j.prototype),f(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new j(p(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),f(k,l,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.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&&i.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 a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},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),y},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),N(n),y}},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;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function o(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,c,"next",t)}function c(t){o(a,r,i,s,c,"throw",t)}s(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER"],(function(o,a){"use strict";var s,c,u,l,f,p,v,m,h,g,d,y,w,b,_,x,O,I,k,L,j,P,S,E,N,T,D;return{setters:[function(t){s=t.e,c=t.u,u=t.n,l=t.L,f=t.cH,p=t.cI,v=t.cJ,m=t.cK,h=t.ai,g=t.cL},function(t){d=t.j,y=t.r,w=t.c,b=t.s,_=t.p,x=t.q,O=t.v,I=t.y,k=t.B,L=t.z,j=t.x,P=t.M,S=t.A,E=t.C,N=t.aQ,T=t.bG,D=t.aB}],execute:function(){var G=d("HOME-LOGIN-PROMPT-STORE",(function(){var t=y({ip_info:{ip:"",info:""},last_login:{ip_info:{ip:"",info:""},login_time_str:""}});return{loginInfo:t,initData:function(){var e=JSON.parse(sessionStorage.getItem("loginInfo"));t.value=e||t.value}}})),U={class:"login-message"},B={class:"login-message-row"},C={class:"login-message-content"},M={class:"login-message-row"},R={class:"login-message-content"},F={class:"login-message"},H={class:"login-message-row"},A={class:"login-message-content"},V={class:"login-message-row"},J={class:"login-message-content"},z={class:"login-message-row"},Q={class:"login-message-content"},K=s(w({__name:"index",setup:function(t){var e=G(),n=b(e).loginInfo;return _((function(){return e.initData()})),function(t,e){var r=N;return x(),O("div",null,[I("div",null,[e[2]||(e[2]=k(" 当前登录信息: ")),I("div",U,[I("div",B,[e[0]||(e[0]=I("span",{class:"login-message-title"},"IP",-1)),I("span",C,L(j(n).ip_info.ip),1)]),I("div",M,[e[1]||(e[1]=I("span",{class:"login-message-title"},"归属地",-1)),I("span",R,L(j(n).ip_info.info),1)])])]),I("div",null,[e[7]||(e[7]=k(" 上次登录信息: ")),I("div",F,[I("div",H,[e[4]||(e[4]=I("span",{class:"login-message-title"},"IP",-1)),I("span",A,[k(L(j(n).last_login.ip_info.ip)+" ",1),j(n).last_login.ip_info.ip!==j(n).ip_info.ip?(x(),P(r,{key:0,content:"登录异常",effect:"dark",placement:"top"},{default:S((function(){return e[3]||(e[3]=[I("i",{class:"svgtofont-el-warning text-orange cursor-pointer ml-[8px]"},null,-1)])})),_:1})):E("",!0)])]),I("div",V,[e[5]||(e[5]=I("span",{class:"login-message-title"},"归属地",-1)),I("span",J,L(j(n).last_login.ip_info.info),1)]),I("div",z,[e[6]||(e[6]=I("span",{class:"login-message-title"},"时间",-1)),I("span",Q,L(j(n).last_login.login_time_str),1)])])])])}}}),[["__scopeId","data-v-a62a8a43"]]);o("H",d("HOME-STORE",(function(){var o=c().getGlobalInfo,s=y(0),d=y(!1),w=y({name:"",simpleName:""}),b=y(0),_=y({runningDays:0,isBeta:!1,isUpgrade:!1,cloudBeta:!1,betaInfo:null,officialInfo:null,grayscale:1,isSetup:!0,isRestart:!1,upgrade:0,currentInfo:null,accountVersionInfo:null}),x=y({one:0,max:0,five:0,fifteen:0}),O=y({occupy:"",framework:"",coresOccupy:[0,0,0],cpuNumber:0,logicCores:0,cores:0,process:[0,0]}),I=y({}),k=y({memRealUsed:0,memRealUsedList:[],memTotalList:[],memTotal:0,memFree:0,memShared:0,memAvailable:0,memBuffers:0,memCached:0}),L=y({cpuBaseInfo:{active_processes:0,cpu_name:"Common KVM processor * 2",load_avg:{},logical_cpu:0,num_phys_cores:0,physical_cpu:0,total_processes:0},cpuProcess:[],memProcess:[]}),j=y([]),P=y([]),S=y([]),E=y([]),N=y([]),G=y([]),U=y([]),B=y(!1),C=function(){var t=i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u({component:function(){return l((function(){return a.import("./index-legacy318.js?v=VERSION_NUMBER")}),void 0,a.meta.url)},title:'<div class="flex items-center justify-between text-[1.2rem]"><span>初始化推荐配置</span><span class="close-ad">不再显示推荐</span></div>',area:105,closeBtn:2}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=i(r().mark((function t(){var e,n,o,i,a,s=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=s.length>0&&void 0!==s[0]?s[0]:{},t.prev=1,t.next=4,f(e);case 4:if(n=t.sent,o=n.data,i=o.status,a=o.msg,!i||!a){t.next=10;break}return R(a),t.abrupt("return",a);case 10:return t.abrupt("return",!1);case 13:t.prev=13,t.t0=t.catch(1);case 16:case"end":return t.stop()}}),t,null,[[1,13]])})));return function(){return t.apply(this,arguments)}}(),R=function(t){var e=window.vite_public_version,n=e.split(".").pop(),r=parseInt(n).toString()===n&&2===n.length,o=t.is_beta,i=t.version,a=t.beta,s=t.downUrl,c=t.updateMsg,u=t.uptime,l=t.grayscale_test;Object.assign(_.value,{isBeta:r,isUpgrade:!p(e,r?a.version:i),cloudBeta:o,betaInfo:a,officialInfo:{downUrl:s,updateMsg:c,version:i,uptime:u},grayscale:l})},F=function(){var t=i(r().mark((function t(){var e,n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,v({check:!0});case 3:return e=t.sent,(n=e.data)&&H(n),t.abrupt("return",n);case 9:t.prev=9,t.t0=t.catch(0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),H=function(t){var e=t.local,n=t.cloud,r=t.upgrade,o=2===r?null==n?void 0:n.OfficialVersionLatest:1===r?null==n?void 0:n.OfficialVersion:e,i=null==n?void 0:n.AccountVersion;Object.assign(_.value,{upgrade:r,currentInfo:o,accountVersionInfo:i})},A=function(){var t=i(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o();case 2:"object"===n(e=t.sent)&&e&&(_.value.isSetup=e.isSetup),e.migration&&u({area:45,component:function(){return l((function(){return a.import("./index-legacy313.js?v=VERSION_NUMBER")}),void 0,a.meta.url)}});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),V=function(){var t=i(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,m();case 3:e=t.sent,s.value=(new Date).getTime(),J(e.data),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}(),J=function(n){var r=n.disk,o=n.mem,i=n.network,a=n.iostat,s=n.cpu,c=n.installed,u=n.cpu_times,l=n.down,f=n.up,p=n.downPackets,v=n.upPackets,m=n.downTotal,h=n.upTotal,g=n.system,y=n.simple_system,L=n.time,j=n.docker_run,P=function(n){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))}))}return n}({ALL:{down:l,up:f,downPackets:p,upPackets:v,downTotal:m,upTotal:h}},i);z(r);var S=Date.now();d.value=c,k.value=o,E.value=P,N.value=a,B.value=!!j,O.value={occupy:s[0],cores:s[1],coresOccupy:s[2],framework:s[3],logicCores:s[4],cpuNumber:s[5],process:[u["活动进程数"],u["总进程数"]]},I.value=u,x.value=n.load,b.value=S,w.value.name=y,w.value.simpleName=g,_.value.runningDays=L},z=function(t){var e,n=[],r=[];t.forEach((function(t){var e=t.path,o=t.size,i=h(o),a=i?0:parseInt(o[3].substring(0,o[3].lastIndexOf("%"))),s={total:o[0].split(" "),used:o[1].split(" ")};n.push({show:!1,data:t,info:{type:"disk",title:i?"未挂载":e,range:a,desc:{total:s.total[0],used:s.used[0],total_unit:s.total[1],used_unit:s.used[1]}}}),r.push({diskName:e,diskQuota:Number.parseFloat(o[0].split("G")[0])})})),G.value=(null===(e=t[0])||void 0===e?void 0:e.size)||[],j.value=n,P.value=r,localStorage.setItem("checkWarnInfo",JSON.stringify(n[0]))},Q=function(){var t=i(r().mark((function t(){var e,n,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null!=(e=sessionStorage.getItem("loginInfo"))&&null!=(o=JSON.parse(e))&&""!=o&&null!=o&&null!==(n=o.last_login)&&void 0!==n&&n.login_time_str&&o.login_origin&&T({title:"登录成功",message:D(K),type:"success",position:"bottom-right",dangerouslyUseHTMLString:!0,customClass:"login-success",onClose:function(){return sessionStorage.removeItem("loginInfo")}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){var t=i(r().mark((function t(){var e,n,o,i,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,g();case 3:e=t.sent,n=e.data,o=n.info,i=n.CPU_high_occupancy_software_list,a=n.memory_high_occupancy_software_list,Object.assign(L.value,{cpuBaseInfo:o,cpuProcess:i,memProcess:a,refresh:Date.now()}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(){return t.apply(this,arguments)}}();return{panelInfo:_,memory:k,systemInfo:w,refreshTime:b,load:x,cpu:O,cpuTimes:I,disk:j,diskQuota:P,isDockerPanel:B,recommendSoft:S,network:E,diskIo:N,diskUsage:G,overviewShowList:U,isRefreshData:s,recommendInstall:d,specificResource:L,recommendInstallDialog:C,getUpdateInfo:M,getUpdateInfoNew:F,getHomeConfig:A,getSystemInfo:V,monitorLoginInfo:Q,getHomeProcessInfo:Y,$reset:function(){j.value=[],P.value=[],S.value=[],E.value=[],N.value=[],U.value=[],Object.assign(L.value,{cpuProcess:[],memProcess:[]})}}}),{persist:!0,storage:localStorage,omit:["systemInfo"]}))}}}))}();
Save File
Cancel