UNPKG

@runeya/runeya

Version:

Monitor processes as a stack

2 lines (1 loc) 785 B
import{a6 as o,r as a,k as e}from"./index-CXxIspfv.js";function s(){this.infos=o({cpu:0,mem:0}),this.globalInfos=o({nbCpus:0,totalmem:0,freemem:0,memPercentage:0,cpu:0}),this.version=a("0.0.0")}s.prototype.getInfos=async function(t){const{data:n}=await e.get(`/system/${t}/infos`);return this.infos=n,this.infos};s.prototype.proxyImg=function(t){return`${e.defaults.baseURL==="/"?"":e.defaults.baseURL}/system/proxy-img?url=${encodeURIComponent(t)}`};s.prototype.getVersion=async function(){const{data:t}=await e.get("/version");return this.version.value=t,this.version.value};s.prototype.disconnect=async function(){return e.get("/system/disconnect")};s.prototype.hasUpdate=async function(){const{data:t}=await e.get("/stack/has-update");return t};const i=new s;export{i as default};