2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
(function(o){function e(e){for(var s,n,l=e[0],c=e[1],a=e[2],d=0,p=[];d<l.length;d++)n=l[d],Object.prototype.hasOwnProperty.call(r,n)&&r[n]&&p.push(r[n][0]),r[n]=0;for(s in c)Object.prototype.hasOwnProperty.call(c,s)&&(o[s]=c[s]);f&&f(e);while(p.length)p.shift()();return i.push.apply(i,a||[]),t()}function t(){for(var o,e=0;e<i.length;e++){for(var t=i[e],s=!0,l=1;l<t.length;l++){var c=t[l];0!==r[c]&&(s=!1)}s&&(i.splice(e--,1),o=n(n.s=t[0]))}return o}var s={},r={app:0},i=[];function n(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}n.m=o,n.c=s,n.d=function(o,e,t){n.o(o,e)||Object.defineProperty(o,e,{enumerable:!0,get:t})},n.r=function(o){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,e){if(1&e&&(o=n(o)),8&e)return o;if(4&e&&"object"===typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var s in o)n.d(t,s,function(e){return o[e]}.bind(null,s));return t},n.n=function(o){var e=o&&o.__esModule?function(){return o["default"]}:function(){return o};return n.d(e,"a",e),e},n.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},n.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],c=l.push.bind(l);l.push=e,l=l.slice();for(var a=0;a<l.length;a++)e(l[a]);var f=c;i.push([0,"chunk-vendors"]),t()})({0:function(o,e,t){o.exports=t("56d7")},"034f":function(o,e,t){"use strict";t("85ec")},"088f":function(o,e,t){"use strict";t("2563")},2563:function(o,e,t){},"56d7":function(o,e,t){"use strict";t.r(e);t("e260"),t("e6cf"),t("cca6"),t("a79d");var s=t("2b0e"),r=function(){var o=this,e=o.$createElement,t=o._self._c||e;return t("div",{attrs:{id:"app"}},[t("Panel",{staticClass:"panel"}),t("Processlist",{staticClass:"processlist"})],1)},i=[],n=function(){var o=this,e=o.$createElement,t=o._self._c||e;return t("div",{staticClass:"panel",style:{background:o.backgroundColor}},[t("div",{style:{color:o.foregroundColor}},[t("vue-ellipse-progress",{staticClass:"memory-info",attrs:{progress:o.info.memory.percent,dot:o.memoryDotClass,id:"timer-example",determinate:o.determinate,line:"butt",color:o.emptyColor,"empty-color":o.foregroundColor,emptyColorFill:o.emptyColorFill,thickness:"46",emptyThickness:"8",size:180,dash:"strict 60 0.8",lineMode:"in -8",legend:!1,legendClass:"legend-custom-style",fontSize:"1.5rem","font-color":"white",loading:!1,"no-data":o.noData}},[t("span",{attrs:{slot:"legend-caption"},slot:"legend-caption"},[o._v(" "+o._s(o.info.memory.percent)+" % ")])]),t("div",{staticClass:"memory-number"},[o._v(" MEM: "+o._s(o.info.memory.used)+" / "+o._s(o.info.memory.total)+" ")])],1),t("div",[t("apexchart",{ref:"chart",attrs:{width:"100%",type:"line",options:o.chartOptions}})],1),t("div",{style:{color:o.foregroundColor}},[o._v(" CPU: "+o._s(o.info.cpu.percent)+"% ( "+o._s(o.info.cpu.count)+" cores ) ")])])},l=[],c=(t("d81d"),t("a9e3"),{name:"Panel",components:{},data:function(){return{info:{},backgroundColor:"",foregroundColor:"",progress:0,emptyColor:{radial:!0,colors:[]},emptyColorFill:{radial:!0,colors:[]},chartOptions:{chart:{id:"realtime",toolbar:{show:!1},animations:{enabled:!0,easing:"linear",speed:1e3,animateGradually:{enabled:!1,delay:150},dynamicAnimation:{enabled:!1,speed:350}}},dataLabels:{enabled:!1},stroke:{curve:"smooth",width:2},yaxis:{show:!1,showAlways:!0,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,tickAmount:6,min:0,max:100,forceNiceScale:!1,floating:!1,decimalsInFloat:void 0,labels:{show:!1,align:"right",minWidth:0,maxWidth:160,style:{colors:[],fontSize:"12px",fontFamily:"Helvetica, Arial, sans-serif",fontWeight:400,cssClass:"apexcharts-yaxis-label"},offsetX:0,offsetY:0,rotate:0,formatter:function(o){return o}},axisBorder:{show:!1,color:"#78909C",offsetX:0,offsetY:0},axisTicks:{show:!1,borderType:"solid",color:"#78909C",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontFamily:"Helvetica, Arial, sans-serif",fontWeight:600,cssClass:"apexcharts-yaxis-title"}},crosshairs:{show:!1,position:"back",stroke:{color:"#b6b6b6",width:1,dashArray:0}},tooltip:{enabled:!1,offsetX:0}},xaxis:{type:"category",categories:[],labels:{show:!1,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,showDuplicates:!1,trim:!1,minHeight:void 0,maxHeight:120,style:{colors:[],fontSize:"12px",fontFamily:"Helvetica, Arial, sans-serif",fontWeight:400,cssClass:"apexcharts-xaxis-label"},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!1,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm"}},axisBorder:{show:!1,color:"#78909C",height:1,width:"100%",offsetX:0,offsetY:0},axisTicks:{show:!1,borderType:"solid",color:"#78909C",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"between",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontFamily:"Helvetica, Arial, sans-serif",fontWeight:600,cssClass:"apexcharts-xaxis-title"}},crosshairs:{show:!1,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:0,dashArray:0},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,top:0,left:0,blur:1,opacity:.4}},tooltip:{enabled:!1,formatter:void 0,offsetY:0,style:{fontSize:0,fontFamily:0}}},legend:{show:!1},grid:{show:!1,borderColor:"#90A4AE",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!1}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:0,bottom:0,left:0}}},cpuSampling:20,series:[]}},computed:{memoryDotClass:function(){return{size:46,backgroundColor:this.foregroundColor,width:"2px"}}},props:{},mounted:function(){window.initPanelColor=this.initPanelColor,window.updatePanelInfo=this.updatePanelInfo},methods:{initPanelColor:function(o,e){this.backgroundColor=o,this.foregroundColor=e;var t=[{color:this.foregroundColor,offset:"50",opacity:"0.15"},{color:this.foregroundColor,offset:"70",opacity:"0.15"},{color:this.foregroundColor,offset:"70",opacity:"0.1"},{color:this.foregroundColor,offset:"90",opacity:"1"},{color:this.foregroundColor,offset:"60",opacity:"1"},{color:this.foregroundColor,offset:"0",opacity:"0"}];this.emptyColor.colors=t;var s=[{color:this.foregroundColor,offset:"50",opacity:"0.2"},{color:this.foregroundColor,offset:"50",opacity:"0.15"},{color:this.foregroundColor,offset:"70",opacity:"0.15"},{color:this.foregroundColor,offset:"70",opacity:"0.1"},{color:this.foregroundColor,offset:"90",opacity:"0.1"},{color:"transparent",offset:"90",opacity:"0.1"},{color:"transparent",offset:"95",opacity:"0.1"},{color:"transparent",offset:"95",opacity:"0.1"}];this.emptyColorFill.colors=s},updatePanelInfo:function(o){var e;if(this.info=o,this.series.length>0)for(e=0;e<this.info.cpu.percents.length;e++)this.series[e].data.push(this.info.cpu.percents[e]),this.series[e].data.length>this.cpuSampling&&this.series[e].data.shift();else for(this.series=[],e=0;e<this.info.cpu.percents.length;e++){var t=Array.apply(null,new Array(this.cpuSampling-1)).map(Number.prototype.valueOf,0);t.push(this.info.cpu.percents[e]);var s={name:e,data:t};this.series.push(s)}this.$refs.chart.updateSeries(this.series)}}}),a=c,f=(t("088f"),t("2877")),d=Object(f["a"])(a,n,l,!1,null,"9e30cc3e",null),p=d.exports,u=function(){var o=this,e=o.$createElement,t=o._self._c||e;return t("div",{ref:"processlist",staticClass:"processlist"},o._l(o.processInfos,(function(e){return t("div",{key:e.path,staticClass:"item",style:{background:o.itemBackgroundColor(e),color:o.itemForegroundColor(e)},on:{click:function(t){return o.selectProcess(e)}}},[t("div",{staticClass:"item-cpu"},[o._v(" "+o._s(e.cpu_percent)+"% ")]),t("div",{staticClass:"item-memory"},[o._v(" "+o._s(e.memory)+" ")]),t("div",{staticClass:"item-pid"},[o._v(" "+o._s(e.pid)+" ")]),t("div",{staticClass:"item-username"},[o._v(" "+o._s(e.username)+" ")]),t("div",{staticClass:"item-name"},[o._v(" "+o._s(e.name)+" ")]),t("div",{staticClass:"item-cmdline"},[o._v(" "+o._s(e.cmdline)+" ")])])})),0)},h=[],m=t("2f62"),y={name:"Processlist",data:function(){return{backgroundColor:"",foregroundColor:""}},computed:Object(m["b"])(["currentProcess","currentProcessIndex","processInfos"]),props:{},mounted:function(){window.initProcesslistColor=this.initProcesslistColor,window.updateProcessInfo=this.updateProcessInfo,window.scrollUp=this.scrollUp,window.scrollDown=this.scrollDown,window.scrollUpPage=this.scrollUpPage,window.scrollDownPage=this.scrollDownPage,window.scrollToBegin=this.scrollToBegin,window.scrollToBottom=this.scrollToBottom},methods:{initProcesslistColor:function(o,e){this.backgroundColor=o,this.foregroundColor=e},updateProcessInfo:function(o){this.$store.commit("updateProcessInfos",o)},selectProcess:function(o){this.$store.commit("updateCurrentProcess",o)},itemBackgroundColor:function(o){return o.pid==this.currentProcess?this.foregroundColor:this.backgroundColor},itemForegroundColor:function(o){return o.pid==this.currentProcess?this.backgroundColor:this.foregroundColor},scrollUp:function(){this.$refs.processlist.scrollTop+=30},scrollDown:function(){this.$refs.processlist.scrollTop-=30},scrollUpPage:function(){this.$refs.processlist.scrollTop+=this.$refs.processlist.offsetHeight},scrollDownPage:function(){this.$refs.processlist.scrollTop-=this.$refs.processlist.offsetHeight},scrollToBegin:function(){this.$refs.processlist.scrollTop=0},scrollToBottom:function(){this.$refs.processlist.scrollTop=this.$refs.processlist.scrollHeight}}},g=y,v=(t("8cd1"),Object(f["a"])(g,u,h,!1,null,"12583d35",null)),C=v.exports,b={name:"App",components:{Processlist:C,Panel:p},data:function(){return{}},props:{},mounted:function(){}},w=b,P=(t("034f"),Object(f["a"])(w,r,i,!1,null,null,null)),x=P.exports,_=t("ecee"),k=t("c074"),T=t("ad3d");s["a"].use(m["a"]);var I=new m["a"].Store({state:{currentProcess:0,currentProcessIndex:0,processInfos:[]},getters:{currentProcess:function(o){return o.currentProcess},currentProcessIndex:function(o){return o.currentProcessIndex},processInfos:function(o){return o.processInfos}},mutations:{updateCurrentProcess:function(o,e){o.currentProcess=e.pid;var t=o.processInfos.map((function(o){return o.pid}));o.currentProcessIndex=t.indexOf(o.currentProcess)},updateProcessInfos:function(o,e){o.processInfos=e}}}),O=I,S=t("9949"),F=t.n(S),A=t("1321"),$=t.n(A);s["a"].use($.a),s["a"].component("apexchart",$.a),_["c"].add(k["b"],k["a"],k["d"],k["c"]),s["a"].component("font-awesome-icon",T["a"]),s["a"].use(F.a),s["a"].config.productionTip=!1,new s["a"]({render:function(o){return o(x)},store:O}).$mount("#app")},"85ec":function(o,e,t){},"8cd1":function(o,e,t){"use strict";t("bbed")},bbed:function(o,e,t){}});
|
|
//# sourceMappingURL=app.392dc8de.js.map
|